Class CommandBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.CommandBlockEntity
- All Implemented Interfaces:
IAttachmentHolder
,IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private final BaseCommandBlock
private boolean
private boolean
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
getMode()
boolean
boolean
boolean
protected void
loadAdditional
(CompoundTag p_338502_, HolderLookup.Provider p_338638_) boolean
boolean
void
void
removeComponentsFromTag
(CompoundTag p_331967_) protected void
saveAdditional
(CompoundTag p_187491_, HolderLookup.Provider p_324575_) private void
void
setAutomatic
(boolean p_59138_) void
setPowered
(boolean p_59136_) boolean
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
powered
private boolean powered -
auto
private boolean auto -
conditionMet
private boolean conditionMet -
commandBlock
-
-
Constructor Details
-
CommandBlockEntity
-
-
Method Details
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-
onlyOpCanSetNbt
public boolean onlyOpCanSetNbt()- Overrides:
onlyOpCanSetNbt
in classBlockEntity
-
getCommandBlock
-
setPowered
public void setPowered(boolean p_59136_) -
isPowered
public boolean isPowered() -
isAutomatic
public boolean isAutomatic() -
setAutomatic
public void setAutomatic(boolean p_59138_) -
onModeSwitch
public void onModeSwitch() -
scheduleTick
private void scheduleTick() -
wasConditionMet
public boolean wasConditionMet() -
markConditionMet
public boolean markConditionMet() -
getMode
-
isConditional
public boolean isConditional() -
applyImplicitComponents
- Overrides:
applyImplicitComponents
in classBlockEntity
-
collectImplicitComponents
- Overrides:
collectImplicitComponents
in classBlockEntity
-
removeComponentsFromTag
- Overrides:
removeComponentsFromTag
in classBlockEntity
-