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.String
command
private static ITextComponent
DEFAULT_NAME
private long
lastExecution
private ITextComponent
lastOutput
private ITextComponent
name
private int
successCount
private static java.text.SimpleDateFormat
TIME_FORMAT
private boolean
trackOutput
private boolean
updateLastExecution
-
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 boolean
acceptsFailure()
boolean
acceptsSuccess()
abstract CommandSource
createCommandSourceStack()
java.lang.String
getCommand()
ITextComponent
getLastOutput()
abstract ServerWorld
getLevel()
ITextComponent
getName()
abstract Vector3d
getPosition()
int
getSuccessCount()
boolean
isTrackOutput()
void
load(CompoundNBT p_145759_1_)
abstract void
onUpdated()
boolean
performCommand(World p_145755_1_)
CompoundNBT
save(CompoundNBT p_189510_1_)
void
sendMessage(ITextComponent p_145747_1_, java.util.UUID p_145747_2_)
void
setCommand(java.lang.String p_145752_1_)
void
setLastOutput(ITextComponent p_145750_1_)
void
setName(ITextComponent p_207405_1_)
void
setSuccessCount(int p_184167_1_)
void
setTrackOutput(boolean p_175573_1_)
boolean
shouldInformAdmins()
ActionResultType
usedBy(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:
sendMessage
in 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:
acceptsSuccess
in interfaceICommandSource
-
acceptsFailure
public boolean acceptsFailure()
- Specified by:
acceptsFailure
in interfaceICommandSource
-
shouldInformAdmins
public boolean shouldInformAdmins()
- Specified by:
shouldInformAdmins
in interfaceICommandSource
-
-