Package net.minecraft.tileentity
Class CommandBlockTileEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
-
- net.minecraft.tileentity.TileEntity
-
- net.minecraft.tileentity.CommandBlockTileEntity
-
- All Implemented Interfaces:
ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
public class CommandBlockTileEntity extends TileEntity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommandBlockTileEntity.Mode
-
Field Summary
Fields Modifier and Type Field Description private boolean
auto
private CommandBlockLogic
commandBlock
private boolean
conditionMet
private boolean
powered
private boolean
sendToClient
-
Fields inherited from class net.minecraft.tileentity.TileEntity
level, remove, worldPosition
-
Fields inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
INFINITE_EXTENT_AABB
-
-
Constructor Summary
Constructors Constructor Description CommandBlockTileEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearRemoved()
CommandBlockLogic
getCommandBlock()
CommandBlockTileEntity.Mode
getMode()
SUpdateTileEntityPacket
getUpdatePacket()
boolean
isAutomatic()
boolean
isConditional()
boolean
isPowered()
boolean
isSendToClient()
void
load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
boolean
markConditionMet()
boolean
onlyOpCanSetNbt()
void
onModeSwitch()
CompoundNBT
save(CompoundNBT p_189515_1_)
private void
scheduleTick()
void
setAutomatic(boolean p_184253_1_)
void
setPowered(boolean p_184250_1_)
void
setSendToClient(boolean p_184252_1_)
boolean
wasConditionMet()
-
Methods inherited from class net.minecraft.tileentity.TileEntity
clearCache, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdateTag, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
-
-
-
Field Detail
-
powered
private boolean powered
-
auto
private boolean auto
-
conditionMet
private boolean conditionMet
-
sendToClient
private boolean sendToClient
-
commandBlock
private final CommandBlockLogic commandBlock
-
-
Method Detail
-
save
public CompoundNBT save(CompoundNBT p_189515_1_)
- Overrides:
save
in classTileEntity
-
load
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
- Overrides:
load
in classTileEntity
-
getUpdatePacket
@Nullable public SUpdateTileEntityPacket getUpdatePacket()
- Overrides:
getUpdatePacket
in classTileEntity
-
onlyOpCanSetNbt
public boolean onlyOpCanSetNbt()
- Overrides:
onlyOpCanSetNbt
in classTileEntity
-
getCommandBlock
public CommandBlockLogic getCommandBlock()
-
setPowered
public void setPowered(boolean p_184250_1_)
-
isPowered
public boolean isPowered()
-
isAutomatic
public boolean isAutomatic()
-
setAutomatic
public void setAutomatic(boolean p_184253_1_)
-
onModeSwitch
public void onModeSwitch()
-
scheduleTick
private void scheduleTick()
-
wasConditionMet
public boolean wasConditionMet()
-
markConditionMet
public boolean markConditionMet()
-
isSendToClient
public boolean isSendToClient()
-
setSendToClient
public void setSendToClient(boolean p_184252_1_)
-
getMode
public CommandBlockTileEntity.Mode getMode()
-
isConditional
public boolean isConditional()
-
clearRemoved
public void clearRemoved()
- Overrides:
clearRemoved
in classTileEntity
-
-