Package net.minecraft.tileentity
Class CommandBlockLogic
- java.lang.Object
-
- net.minecraft.tileentity.CommandBlockLogic
-
- All Implemented Interfaces:
ICommandSource
- Direct Known Subclasses:
CommandBlockMinecartEntity.MinecartCommandLogic
public abstract class CommandBlockLogic extends java.lang.Object implements ICommandSource
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringcommandprivate static ITextComponentDEFAULT_NAMEprivate longlastExecutionprivate ITextComponentlastOutputprivate ITextComponentnameprivate intsuccessCountprivate static java.text.SimpleDateFormatTIME_FORMATprivate booleantrackOutputprivate booleanupdateLastExecution-
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
-
Constructor Summary
Constructors Constructor Description CommandBlockLogic()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanacceptsFailure()booleanacceptsSuccess()abstract CommandSourcecreateCommandSourceStack()java.lang.StringgetCommand()ITextComponentgetLastOutput()abstract ServerWorldgetLevel()ITextComponentgetName()abstract Vector3dgetPosition()intgetSuccessCount()booleanisTrackOutput()voidload(CompoundNBT p_145759_1_)abstract voidonUpdated()booleanperformCommand(World p_145755_1_)CompoundNBTsave(CompoundNBT p_189510_1_)voidsendMessage(ITextComponent p_145747_1_, java.util.UUID p_145747_2_)voidsetCommand(java.lang.String p_145752_1_)voidsetLastOutput(ITextComponent p_145750_1_)voidsetName(ITextComponent p_207405_1_)voidsetSuccessCount(int p_184167_1_)voidsetTrackOutput(boolean p_175573_1_)booleanshouldInformAdmins()ActionResultTypeusedBy(PlayerEntity p_175574_1_)
-
-
-
Field Detail
-
TIME_FORMAT
private static final java.text.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 java.lang.String command
-
name
private ITextComponent name
-
-
Method Detail
-
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(java.lang.String p_145752_1_)
-
getCommand
public java.lang.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_, java.util.UUID p_145747_2_)
- Specified by:
sendMessagein interfaceICommandSource
-
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:
acceptsSuccessin interfaceICommandSource
-
acceptsFailure
public boolean acceptsFailure()
- Specified by:
acceptsFailurein interfaceICommandSource
-
shouldInformAdmins
public boolean shouldInformAdmins()
- Specified by:
shouldInformAdminsin interfaceICommandSource
-
-