Class FluidTankMountedStorage

All Implemented Interfaces:
SyncedMountedStorage, net.neoforged.neoforge.fluids.capability.IFluidHandler

public class FluidTankMountedStorage extends WrapperMountedFluidStorage<FluidTankMountedStorage.Handler> implements SyncedMountedStorage
  • Field Details

  • Constructor Details

    • FluidTankMountedStorage

      protected FluidTankMountedStorage(MountedFluidStorageType<?> type, int capacity, net.neoforged.neoforge.fluids.FluidStack stack)
    • FluidTankMountedStorage

      protected FluidTankMountedStorage(int capacity, net.neoforged.neoforge.fluids.FluidStack stack)
  • Method Details

    • unmount

      public void unmount(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, @Nullable @Nullable net.minecraft.world.level.block.entity.BlockEntity be)
      Description copied from class: MountedFluidStorage
      Un-mount this storage back into the world. The expected storage type of the target block has already been checked to make sure it matches this storage's type.
      Specified by:
      unmount in class MountedFluidStorage
    • getFluid

      public net.neoforged.neoforge.fluids.FluidStack getFluid()
    • getCapacity

      public int getCapacity()
    • isDirty

      public boolean isDirty()
      Specified by:
      isDirty in interface SyncedMountedStorage
      Returns:
      true if this storage needs to be synced.
    • markClean

      public void markClean()
      Description copied from interface: SyncedMountedStorage
      Called after this storage has been synced.
      Specified by:
      markClean in interface SyncedMountedStorage
    • afterSync

      public void afterSync(Contraption contraption, net.minecraft.core.BlockPos localPos)
      Description copied from interface: SyncedMountedStorage
      Called on the client side after this storage has been synced from the server.
      Specified by:
      afterSync in interface SyncedMountedStorage
    • fromTank

      public static FluidTankMountedStorage fromTank(FluidTankBlockEntity tank)
    • fromLegacy

      public static FluidTankMountedStorage fromLegacy(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt)