Class BaseBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.refinedmods.refinedstorage.blockentity.BaseBlockEntity
- All Implemented Interfaces:
net.neoforged.neoforge.attachment.IAttachmentHolder
,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- Direct Known Subclasses:
ControllerBlockEntity
,NetworkNodeBlockEntity
,PortableGridBlockEntity
public abstract class BaseBlockEntity
extends net.minecraft.world.level.block.entity.BlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.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
ModifierConstructorDescriptionprotected
BaseBlockEntity
(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BlockEntitySynchronizationSpec syncSpec) -
Method Summary
Modifier and TypeMethodDescriptionfinal net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket
final net.minecraft.nbt.CompoundTag
void
handleUpdateTag
(net.minecraft.nbt.CompoundTag tag) void
final void
onDataPacket
(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet) protected void
void
readUpdate
(net.minecraft.nbt.CompoundTag tag) void
void
net.minecraft.nbt.CompoundTag
writeUpdate
(net.minecraft.nbt.CompoundTag tag) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, load, loadStatic, onlyOpCanSetNbt, saveAdditional, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setData, setLevel, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
areAttachmentsCompatible, deserializeAttachments, getData, 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, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
deserializeNBT, getModelData, hasCustomOutlineRendering, invalidateCapabilities, onLoad, requestModelDataUpdate, serializeNBT
-
Constructor Details
-
BaseBlockEntity
protected BaseBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BlockEntitySynchronizationSpec syncSpec)
-
-
Method Details
-
getDataManager
-
writeUpdate
public net.minecraft.nbt.CompoundTag writeUpdate(net.minecraft.nbt.CompoundTag tag) -
readUpdate
public void readUpdate(net.minecraft.nbt.CompoundTag tag) -
getUpdateTag
public final net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTag
in classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
public final net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()- Overrides:
getUpdatePacket
in classnet.minecraft.world.level.block.entity.BlockEntity
-
onDataPacket
public final void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet) -
handleUpdateTag
public void handleUpdateTag(net.minecraft.nbt.CompoundTag tag) -
setRemoved
public void setRemoved()- Overrides:
setRemoved
in classnet.minecraft.world.level.block.entity.BlockEntity
-
onRemovedNotDueToChunkUnload
protected void onRemovedNotDueToChunkUnload() -
onChunkUnloaded
public void onChunkUnloaded() -
setChanged
public void setChanged()- Overrides:
setChanged
in classnet.minecraft.world.level.block.entity.BlockEntity
-