Class FluidHandlerBlockEntity

All Implemented Interfaces:
ICapabilityProvider, ICapabilityProviderImpl<BlockEntity>, ICapabilitySerializable<CompoundTag>, IForgeBlockEntity, INBTSerializable<CompoundTag>

public class FluidHandlerBlockEntity extends BlockEntity
  • Field Details

  • Constructor Details

  • Method Details

    • load

      public void load(CompoundTag tag)
      Overrides:
      load in class BlockEntity
    • saveAdditional

      protected void saveAdditional(CompoundTag tag)
      Overrides:
      saveAdditional in class BlockEntity
    • getCapability

      @NotNull public <T> @NotNull LazyOptional<T> getCapability(@NotNull @NotNull Capability<T> capability, @Nullable @Nullable Direction facing)
      Description copied from interface: ICapabilityProvider
      Retrieves 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:
      getCapability in interface ICapabilityProvider
      Overrides:
      getCapability in class CapabilityProvider<BlockEntity>
      Parameters:
      capability - The capability to check
      facing - 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.