Package net.minecraft.world.level
Class BaseCommandBlock
java.lang.Object
net.minecraft.world.level.BaseCommandBlock
- All Implemented Interfaces:
CommandSource
- Direct Known Subclasses:
MinecartCommandBlock.MinecartCommandBase
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
private Component
private static final Component
private long
private Component
private int
private static final SimpleDateFormat
private boolean
private boolean
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
abstract CommandSourceStack
abstract ServerLevel
getLevel()
getName()
abstract Vec3
int
boolean
abstract boolean
isValid()
void
load
(CompoundTag p_45432_, HolderLookup.Provider p_331513_) abstract void
boolean
performCommand
(Level p_45415_) save
(CompoundTag p_45422_, HolderLookup.Provider p_330850_) void
sendSystemMessage
(Component p_220330_) void
setCommand
(String p_45420_) void
setCustomName
(Component p_331531_) void
setLastOutput
(Component p_45434_) void
setSuccessCount
(int p_45411_) void
setTrackOutput
(boolean p_45429_) boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.commands.CommandSource
alwaysAccepts
-
Field Details
-
TIME_FORMAT
-
DEFAULT_NAME
-
lastExecution
private long lastExecution -
updateLastExecution
private boolean updateLastExecution -
successCount
private int successCount -
trackOutput
private boolean trackOutput -
lastOutput
-
command
-
customName
-
-
Constructor Details
-
BaseCommandBlock
public BaseCommandBlock()
-
-
Method Details
-
getSuccessCount
public int getSuccessCount() -
setSuccessCount
public void setSuccessCount(int p_45411_) -
getLastOutput
-
save
-
load
-
setCommand
-
getCommand
-
performCommand
-
getName
-
getCustomName
-
setCustomName
-
sendSystemMessage
- Specified by:
sendSystemMessage
in interfaceCommandSource
-
getLevel
-
onUpdated
public abstract void onUpdated() -
setLastOutput
-
setTrackOutput
public void setTrackOutput(boolean p_45429_) -
isTrackOutput
public boolean isTrackOutput() -
usedBy
-
getPosition
-
createCommandSourceStack
-
acceptsSuccess
public boolean acceptsSuccess()- Specified by:
acceptsSuccess
in interfaceCommandSource
-
acceptsFailure
public boolean acceptsFailure()- Specified by:
acceptsFailure
in interfaceCommandSource
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdmins
in interfaceCommandSource
-
isValid
public abstract boolean isValid()
-