[SPIGOT-6963] CraftMetaBlockState#getBlockState sets outdated TileEntity ids in the item meta's blockEntityTag Created: 12/Mar/22  Updated: 25/Dec/24  Resolved: 15/Mar/22

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: blablubbabc Assignee: blablubbabc
Resolution: Fixed Votes: 0
Labels: ItemMeta

Version: This server is running CraftBukkit version dev-Spigot-ffceeae-9ed7e4f (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java#240

This code is from 2016 and was probably missing some update to use TileEntity ids with the `minecraft:` namespace prefix.

The bug can for example be triggered by a plugin calling `getBlockState` on the ItemMeta of a shulker box item with stored block state.

One effect of this bug is for example that two ItemStack, for example one with the usual `minecraft:shulker_box` and the other with the modified `shulker_box` id, are not considered equal.



 Comments   
Comment by Yannick Lamprecht [ 15/Mar/22 ]

Seems like the ticket didn't get closed automatically.
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/2c47af0cb0561e33dad81ebc1344faa2ebffcfaf

Generated at Sat Dec 13 15:27:19 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.