Class CommandBlockEntity

All Implemented Interfaces:
IAttachmentHolder, IBlockEntityExtension, INBTSerializable<CompoundTag>

public class CommandBlockEntity extends BlockEntity
  • Field Details

    • powered

      private boolean powered
    • auto

      private boolean auto
    • conditionMet

      private boolean conditionMet
    • commandBlock

      private final BaseCommandBlock commandBlock
  • Constructor Details

    • CommandBlockEntity

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

    • saveAdditional

      protected void saveAdditional(CompoundTag p_187491_)
      Overrides:
      saveAdditional in class BlockEntity
    • load

      public void load(CompoundTag p_155383_)
      Overrides:
      load 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()
    • getMode

      public CommandBlockEntity.Mode getMode()
    • isConditional

      public boolean isConditional()