mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-08 00:21:50 +01:00
SPIGOT-7626: sendSignChange() has no effect
By: md_5 <git@md-5.net>
This commit is contained in:
parent
e190aa6b33
commit
4862893bef
@ -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;
|
@ -79,6 +79,7 @@ import net.minecraft.network.protocol.game.PacketPlayOutPlayerListHeaderFooter;
|
|||||||
import net.minecraft.network.protocol.game.PacketPlayOutRemoveEntityEffect;
|
import net.minecraft.network.protocol.game.PacketPlayOutRemoveEntityEffect;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition;
|
import net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutStopSound;
|
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.PacketPlayOutUpdateAttributes;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth;
|
import net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent;
|
import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent;
|
||||||
@ -800,7 +801,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
|
|
||||||
IChatBaseComponent[] components = CraftSign.sanitizeLines(lines);
|
IChatBaseComponent[] components = CraftSign.sanitizeLines(lines);
|
||||||
TileEntitySign sign = new TileEntitySign(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
|
TileEntitySign sign = new TileEntitySign(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
|
||||||
sign.setLevel(getHandle().level());
|
|
||||||
SignText text = sign.getFrontText();
|
SignText text = sign.getFrontText();
|
||||||
text = text.setColor(EnumColor.byId(dyeColor.getWoolData()));
|
text = text.setColor(EnumColor.byId(dyeColor.getWoolData()));
|
||||||
text = text.setHasGlowingText(hasGlowingText);
|
text = text.setHasGlowingText(hasGlowingText);
|
||||||
@ -809,7 +809,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
}
|
}
|
||||||
sign.setText(text, true);
|
sign.setText(text, true);
|
||||||
|
|
||||||
getHandle().connection.send(sign.getUpdatePacket());
|
getHandle().connection.send(new PacketPlayOutTileEntityData(sign.getBlockPos(), sign.getType(), sign.getUpdateTag(getHandle().registryAccess())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user