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
- Enclosing class:
BlockPropertyTests
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUpdateTag(HolderLookup.Provider holderLookup) voidloadAdditional(CompoundTag tag, HolderLookup.Provider holderLookup) voidonDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt, HolderLookup.Provider holderLookup) Called when you receive a TileEntityData packet for the location this TileEntity is currently in.protected voidsaveAdditional(CompoundTag tag, HolderLookup.Provider holderLookup) private voidsetLit(boolean lit) voidMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onLoad, requestModelDataUpdate
-
Field Details
-
lit
private boolean lit
-
-
Constructor Details
-
LightBlockEntity
-
-
Method Details
-
switchLight
public void switchLight() -
setLit
private void setLit(boolean lit) -
getUpdatePacket
- Overrides:
getUpdatePacketin classBlockEntity
-
onDataPacket
public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt, HolderLookup.Provider holderLookup) Description copied from interface:IBlockEntityExtensionCalled 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:
getUpdateTagin classBlockEntity
-
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-