Class CommandBlockEntity

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

public class CommandBlockEntity extends BlockEntity
  • Field Details

    • powered

      private boolean powered
    • auto

      private boolean auto
    • conditionMet

      private boolean conditionMet
    • sendToClient

      private boolean sendToClient
    • commandBlock

      private final BaseCommandBlock commandBlock
  • Constructor Details

    • CommandBlockEntity

      public CommandBlockEntity(BlockPos p_155380_, BlockState p_155381_)
  • Method Details

    • save

      public CompoundTag save(CompoundTag p_59134_)
      Overrides:
      save in class BlockEntity
    • load

      public void load(CompoundTag p_155383_)
      Overrides:
      load in class BlockEntity
    • getUpdatePacket

      @Nullable public ClientboundBlockEntityDataPacket getUpdatePacket()
      Overrides:
      getUpdatePacket in class BlockEntity
    • onlyOpCanSetNbt

      public boolean onlyOpCanSetNbt()
      Overrides:
      onlyOpCanSetNbt in class BlockEntity
    • getCommandBlock

      public BaseCommandBlock getCommandBlock()
    • setPowered

      public void setPowered(boolean p_59136_)
    • isPowered

      public boolean isPowered()
    • isAutomatic

      public boolean isAutomatic()
    • setAutomatic

      public void setAutomatic(boolean p_59138_)
    • onModeSwitch

      public void onModeSwitch()
    • scheduleTick

      private void scheduleTick()
    • wasConditionMet

      public boolean wasConditionMet()
    • markConditionMet

      public boolean markConditionMet()
    • isSendToClient

      public boolean isSendToClient()
    • setSendToClient

      public void setSendToClient(boolean p_59140_)
    • getMode

      public CommandBlockEntity.Mode getMode()
    • isConditional

      public boolean isConditional()