13
0
geforkt von Mirrors/Paper

SPIGOT-7626: sendSignChange() has no effect

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2024-04-24 18:10:39 +10:00
Ursprung e190aa6b33
Commit 4862893bef
2 geänderte Dateien mit 13 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -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;

Datei anzeigen

@ -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