Interface IMultiblockLogic

All Superinterfaces:
INbtWritable
All Known Subinterfaces:
IMultiblockLogicAlveary, IMultiblockLogicFarm

public interface IMultiblockLogic extends INbtWritable
Multiblock Logic implements the basic logic for IMultiblockComponent tile entities. Instances must come from MultiblockManager.logicFactory, most of the implementation is hidden.

IMultiblockComponent tile entities must wire up the methods in the "Updating and Synchronization" section. As a starting point, you can use MultiblockTileEntityBase.

  • Method Details

    • isConnected

      boolean isConnected()
      Returns:
      True if this block is connected to a multiblock controller. False otherwise.
    • getController

      IMultiblockController getController()
      Returns:
      the multiblock controller for this logic
    • validate

      void validate(net.minecraft.world.level.Level world, IMultiblockComponent part)
      call on Tile.validate()
    • invalidate

      void invalidate(net.minecraft.world.level.Level world, IMultiblockComponent part)
      call on Tile.invalidate()
    • onChunkUnload

      void onChunkUnload(net.minecraft.world.level.Level world, IMultiblockComponent part)
      call on Tile.onChunkUnload()
    • encodeDescriptionPacket

      void encodeDescriptionPacket(net.minecraft.nbt.CompoundTag packetData)
      Writes data for client synchronization. Use this in Tile.getDescriptionPacket()
    • decodeDescriptionPacket

      void decodeDescriptionPacket(net.minecraft.nbt.CompoundTag packetData)
      Reads data for client synchronization. Use this in Tile.onDataPacket()
    • readFromNBT

      void readFromNBT(net.minecraft.nbt.CompoundTag CompoundNBT)
      Read the logic's data from file. Use this in Tile.read()
    • write

      net.minecraft.nbt.CompoundTag write(net.minecraft.nbt.CompoundTag CompoundNBT)
      Write the logic's data to file. Use this in Tile.write()
      Specified by:
      write in interface INbtWritable