diff --git a/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutTileEntityData.patch b/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutTileEntityData.patch new file mode 100644 index 000000000..bd1b43dc2 --- /dev/null +++ b/nms-patches/net/minecraft/network/protocol/game/PacketPlayOutTileEntityData.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/protocol/game/PacketPlayOutTileEntityData.java ++++ b/net/minecraft/network/protocol/game/PacketPlayOutTileEntityData.java +@@ -30,7 +30,7 @@ + return create(tileentity, TileEntity::getUpdateTag); + } + +- private PacketPlayOutTileEntityData(BlockPosition blockposition, TileEntityTypes tileentitytypes, NBTTagCompound nbttagcompound) { ++ public PacketPlayOutTileEntityData(BlockPosition blockposition, TileEntityTypes tileentitytypes, NBTTagCompound nbttagcompound) { // PAIL - private->public + this.pos = blockposition; + this.type = tileentitytypes; + this.tag = nbttagcompound; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index d58407041..7b9141530 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -79,6 +79,7 @@ import net.minecraft.network.protocol.game.PacketPlayOutPlayerListHeaderFooter; import net.minecraft.network.protocol.game.PacketPlayOutRemoveEntityEffect; import net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition; import net.minecraft.network.protocol.game.PacketPlayOutStopSound; +import net.minecraft.network.protocol.game.PacketPlayOutTileEntityData; import net.minecraft.network.protocol.game.PacketPlayOutUpdateAttributes; import net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth; import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent; @@ -800,7 +801,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { IChatBaseComponent[] components = CraftSign.sanitizeLines(lines); TileEntitySign sign = new TileEntitySign(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState()); - sign.setLevel(getHandle().level()); SignText text = sign.getFrontText(); text = text.setColor(EnumColor.byId(dyeColor.getWoolData())); text = text.setHasGlowingText(hasGlowingText); @@ -809,7 +809,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } sign.setText(text, true); - getHandle().connection.send(sign.getUpdatePacket()); + getHandle().connection.send(new PacketPlayOutTileEntityData(sign.getBlockPos(), sign.getType(), sign.getUpdateTag(getHandle().registryAccess()))); } @Override