public interface BlockEntityClientSerializable
Modifier and Type | Method and Description |
---|---|
void |
fromClientTag(net.minecraft.nbt.CompoundTag tag) |
default void |
sync()
When called on the server, schedules a BlockEntity sync to client.
|
net.minecraft.nbt.CompoundTag |
toClientTag(net.minecraft.nbt.CompoundTag tag) |
void fromClientTag(net.minecraft.nbt.CompoundTag tag)
net.minecraft.nbt.CompoundTag toClientTag(net.minecraft.nbt.CompoundTag tag)
default void sync()
toClientTag(CompoundTag)
to be called on the
server to generate the packet data, and then
fromClientTag(CompoundTag)
on the client to decode that data.
This is preferable to
World.updateListeners(net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, net.minecraft.block.BlockState, int)
because it does not cause entities to update their pathing as a side effect.