Interface ISerializableTanks

All Known Implementing Classes:
AbstractFluidTankBlockEntity, AbstractFluidTankBlockEntity.Huge, AbstractFluidTankBlockEntity.Large, AbstractFluidTankBlockEntity.Medium, AbstractFluidTankBlockEntity.Small, AdvancedLiquidCompressorBlockEntity, EtchingTankBlockEntity, FluidMixerBlockEntity, GasLiftBlockEntity, KeroseneLampBlockEntity, LiquidCompressorBlockEntity, LiquidHopperBlockEntity, RefineryControllerBlockEntity, RefineryOutputBlockEntity, ThermopneumaticProcessingPlantBlockEntity, VacuumTrapBlockEntity
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ISerializableTanks
Represents a block entity which stores tank data that should be serialized onto the dropped item stack when the block is broken, and deserialized back to the block entity when the block is placed down again.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    deserializeTanks(net.minecraft.nbt.CompoundTag tag)
     
    Get a mapping of all tanks; this maps a tag name, which is used as the serialization key, to a fluid tank.
    default net.minecraft.nbt.CompoundTag
     
  • Method Details

    • getSerializableTanks

      @Nonnull Map<String,PNCFluidTank> getSerializableTanks()
      Get a mapping of all tanks; this maps a tag name, which is used as the serialization key, to a fluid tank.
      Returns:
      a map of tag names to tanks
    • deserializeTanks

      default void deserializeTanks(net.minecraft.nbt.CompoundTag tag)
    • serializeTanks

      default net.minecraft.nbt.CompoundTag serializeTanks()