Interface BlockEntityExtension
public interface BlockEntityExtension
Extensions to
BlockEntity
, implement this on to your class.-
Method Summary
Modifier and TypeMethodDescriptionvoid
loadClientData
(net.minecraft.world.level.block.state.BlockState pos, net.minecraft.nbt.CompoundTag tag) Handles data sent bysaveClientData(CompoundTag)
on the server.net.minecraft.nbt.CompoundTag
saveClientData
(net.minecraft.nbt.CompoundTag tag) Writes data to sync to the client.default void
syncData()
Sync data to the clients bysaveClientData(CompoundTag)
andloadClientData(BlockState, CompoundTag)
.
-
Method Details
-
loadClientData
@Environment(CLIENT) void loadClientData(net.minecraft.world.level.block.state.BlockState pos, net.minecraft.nbt.CompoundTag tag) Handles data sent bysaveClientData(CompoundTag)
on the server. -
saveClientData
net.minecraft.nbt.CompoundTag saveClientData(net.minecraft.nbt.CompoundTag tag) Writes data to sync to the client. -
syncData
@NonExtendable default void syncData()Sync data to the clients bysaveClientData(CompoundTag)
andloadClientData(BlockState, CompoundTag)
.
-