Affects Version/s: Minecraft 1.11, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w07c, Minecraft 18w11a, Minecraft 1.13, Minecraft 18w30a, Minecraft 18w30b, Minecraft 1.13.1
Fix Version/s: None
- Give yourself a written_book with the following command:
- Open it
→ You will see your name written at the top
- Remove that book from your inventory and /give you this book again
- Place it in your offhand
- Open it
→ You will see @p the first time. Close and reopen it again. This time you will see your name.
This issue concern also @a, @e, @r... and scores display.
Based on 1.11 decompiled using MCP 9.35 rc1
The problem is that the method net.minecraft.item.ItemWrittenBook.resolveContents(ItemStack, EntityPlayer) tests if the player is holding the item in the mainhand and only if this is the case sends a SPacketSetSlot packet.
This condition does not really make sense because the item is modified anyways, the client inventory just won't be updated. This can be seen by dropping the book, picking it back up and opening it in the offhand again.
The best way to fix this would probably be to remove this condition.