Class TileFluidHandler
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraftforge.fluids.capability.TileFluidHandler
- All Implemented Interfaces:
ICapabilityProvider,ICapabilitySerializable<CompoundTag>,IForgeBlockEntity,INBTSerializable<CompoundTag>
-
Field Summary
FieldsFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionTileFluidHandler(BlockEntityType<?> blockEntityType, BlockPos pos, BlockState state) -
Method Summary
Modifier and TypeMethodDescription<T> LazyOptional<T>getCapability(Capability<T> capability, Direction facing)Retrieves the Optional handler for the capability requested on the specific side.voidload(CompoundTag tag)save(CompoundTag tag)Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Field Details
-
tank
-
holder
-
-
Constructor Details
-
TileFluidHandler
public TileFluidHandler(@Nonnull BlockEntityType<?> blockEntityType, BlockPos pos, BlockState state)
-
-
Method Details
-
load
- Overrides:
loadin classBlockEntity
-
save
- Overrides:
savein classBlockEntity
-
getCapability
@Nonnull public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> capability, @Nullable Direction facing)Description copied from interface:ICapabilityProviderRetrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- Specified by:
getCapabilityin interfaceICapabilityProvider- Overrides:
getCapabilityin classCapabilityProvider<BlockEntity>- Parameters:
capability- The capability to checkfacing- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'- Returns:
- The requested an optional holding the requested capability.
-