Class BlockEntityBehaviour

java.lang.Object
com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
Direct Known Subclasses:
AbstractComputerBehaviour, AdvancementBehaviour, AnimatedContainerBehaviour, BeltProcessingBehaviour, BracketedBlockEntityBehaviour, CapManipulationBehaviourBase, DeferralBehaviour, DepotBehaviour, DirectBeltInputBehaviour, DoorControlBehaviour, EdgeInteractionBehaviour, FactoryPanelSupportBehaviour, FilteringBehaviour, FluidManipulationBehaviour, FluidTransportBehaviour, LinkBehaviour, LogisticallyLinkedBehaviour, ScrollValueBehaviour, SmartFluidTankBehaviour, TrackTargetingBehaviour, TransportedItemStackHandlerBehaviour, VersionedInventoryTrackerBehaviour

public abstract class BlockEntityBehaviour extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • getType

      public abstract BehaviourType<?> getType()
    • initialize

      public void initialize()
    • tick

      public void tick()
    • read

      public void read(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
    • write

      public void write(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
    • writeSafe

      public void writeSafe(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries)
      Called when isSafeNBT == true. Defaults to write()
    • isSafeNBT

      public boolean isSafeNBT()
    • getRequiredItems

      public ItemRequirement getRequiredItems()
    • onBlockChanged

      public void onBlockChanged(net.minecraft.world.level.block.state.BlockState oldState)
    • onNeighborChanged

      public void onNeighborChanged(net.minecraft.core.BlockPos neighborPos)
    • unload

      public void unload()
      Block destroyed or Chunk unloaded. Usually invalidates capabilities
    • destroy

      public void destroy()
      Block destroyed or removed. Requires block to call ITE::onRemove
    • setLazyTickRate

      public void setLazyTickRate(int slowTickRate)
    • lazyTick

      public void lazyTick()
    • getPos

      public net.minecraft.core.BlockPos getPos()
    • getWorld

      public net.minecraft.world.level.Level getWorld()
    • get

      public static <T extends BlockEntityBehaviour> T get(net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos, BehaviourType<T> type)
    • get

      public static <T extends BlockEntityBehaviour> T get(net.minecraft.world.level.block.entity.BlockEntity be, BehaviourType<T> type)