Class BlockPropertyTests.LightBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.neoforged.neoforge.debug.block.BlockPropertyTests.LightBlockEntity
- All Implemented Interfaces:
IAttachmentHolder
,IBlockEntityExtension
,INBTSerializable<CompoundTag>
- Enclosing class:
BlockPropertyTests
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
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 TypeMethodDescriptionvoid
Called when the chunk's TE update tag, gotten fromBlockEntity.getUpdateTag()
, is received on the client.void
load
(CompoundTag tag) void
Called when you receive a TileEntityData packet for the location this TileEntity is currently in.protected void
private void
setLit
(boolean lit) void
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, removeData, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
areAttachmentsCompatible, deserializeAttachments, getData, 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, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
deserializeNBT, getModelData, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onLoad, requestModelDataUpdate, serializeNBT
-
Field Details
-
lit
private boolean lit
-
-
Constructor Details
-
LightBlockEntity
-
-
Method Details
-
switchLight
public void switchLight() -
setLit
private void setLit(boolean lit) -
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
onDataPacket
Description copied from interface:IBlockEntityExtension
Called when you receive a TileEntityData packet for the location this TileEntity is currently in. On the client, the NetworkManager will always be the remote server. On the server, it will be whomever is responsible for sending the packet.- Parameters:
net
- The NetworkManager the packet originated frompkt
- The data packet
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
handleUpdateTag
Description copied from interface:IBlockEntityExtension
Called when the chunk's TE update tag, gotten fromBlockEntity.getUpdateTag()
, is received on the client.Used to handle this tag in a special way. By default this simply calls
BlockEntity.load(CompoundTag)
.- Parameters:
tag
- TheCompoundTag
sent fromBlockEntity.getUpdateTag()
-
load
- Overrides:
load
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-