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 TypeMethodDescription<T> TgetHandler(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, ornullfor the holder as a whole (alwaysnullfor most entity lookups)- Returns:
- the handler, or
nullif this holder has none of that type on that side
-