Class CommandBlockLogic

java.lang.Object
net.minecraft.tileentity.CommandBlockLogic
All Implemented Interfaces:
ICommandSource
Direct Known Subclasses:
CommandBlockMinecartEntity.MinecartCommandLogic

public abstract class CommandBlockLogic extends Object implements ICommandSource
  • Field Details

    • TIME_FORMAT

      private static final SimpleDateFormat TIME_FORMAT
    • DEFAULT_NAME

      private static final ITextComponent DEFAULT_NAME
    • lastExecution

      private long lastExecution
    • updateLastExecution

      private boolean updateLastExecution
    • successCount

      private int successCount
    • trackOutput

      private boolean trackOutput
    • lastOutput

      @Nullable private ITextComponent lastOutput
    • command

      private String command
    • name

      private ITextComponent name
  • Constructor Details

    • CommandBlockLogic

      public CommandBlockLogic()
  • Method Details

    • getSuccessCount

      public int getSuccessCount()
    • setSuccessCount

      public void setSuccessCount(int p_184167_1_)
    • getLastOutput

      public ITextComponent getLastOutput()
    • save

      public CompoundNBT save(CompoundNBT p_189510_1_)
    • load

      public void load(CompoundNBT p_145759_1_)
    • setCommand

      public void setCommand(String p_145752_1_)
    • getCommand

      public String getCommand()
    • performCommand

      public boolean performCommand(World p_145755_1_)
    • getName

      public ITextComponent getName()
    • setName

      public void setName(@Nullable ITextComponent p_207405_1_)
    • sendMessage

      public void sendMessage(ITextComponent p_145747_1_, UUID p_145747_2_)
      Specified by:
      sendMessage in interface ICommandSource
    • getLevel

      public abstract ServerWorld getLevel()
    • onUpdated

      public abstract void onUpdated()
    • setLastOutput

      public void setLastOutput(@Nullable ITextComponent p_145750_1_)
    • setTrackOutput

      public void setTrackOutput(boolean p_175573_1_)
    • isTrackOutput

      public boolean isTrackOutput()
    • usedBy

      public ActionResultType usedBy(PlayerEntity p_175574_1_)
    • getPosition

      public abstract Vector3d getPosition()
    • createCommandSourceStack

      public abstract CommandSource createCommandSourceStack()
    • acceptsSuccess

      public boolean acceptsSuccess()
      Specified by:
      acceptsSuccess in interface ICommandSource
    • acceptsFailure

      public boolean acceptsFailure()
      Specified by:
      acceptsFailure in interface ICommandSource
    • shouldInformAdmins

      public boolean shouldInformAdmins()
      Specified by:
      shouldInformAdmins in interface ICommandSource