Interface HandlerProvider

All Known Implementing Classes:
ExtendedBlockEntity, ExtendedContainerBlockEntity

public interface HandlerProvider
An entity or block entity that hands out its own handlers; HandlerType.find(Level, BlockPos, Direction) asks it before any registered provider. ExtendedBlockEntity implements it with a HandlerMap.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    getHandler(HandlerType<T> type, @Nullable net.minecraft.core.Direction side)
     
  • Method Details

    • getHandler

      @Nullable <T> T getHandler(HandlerType<T> type, @Nullable @Nullable net.minecraft.core.Direction side)
      Parameters:
      side - the face asked through, or null for the holder as a whole (always null for most entity lookups)
      Returns:
      the handler, or null if this holder has none of that type on that side