13
0
geforkt von Mirrors/Paper

Use setMessage instead of arraycopy

setMessage affects messages, filteredMessage, and renderMessages, we were only doing an arraycopy for messages

fixes #7774
Dieser Commit ist enthalten in:
Jason Penilla 2022-04-28 19:51:06 -07:00
Ursprung 56d8a72eee
Commit 6a846e2c40

Datei anzeigen

@ -2424,7 +2424,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ SignBlockEntity sign = new SignBlockEntity(new BlockPos(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), Blocks.OAK_SIGN.defaultBlockState());
+ sign.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData()));
+ sign.setHasGlowingText(hasGlowingText);
+ System.arraycopy(components, 0, sign.messages, 0, sign.messages.length);
+ for (int i = 0; i < components.length; i++) {
+ sign.setMessage(i, components[i]);
+ }
+
+ getHandle().connection.send(sign.getUpdatePacket());
+ }