File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
spigot/src/main/java/de/sean/blockprot/bukkit/listeners Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,12 @@ public void onShulkerBoxBreak(BlockBreakEvent event) {
122122 // The block_entity_data tag works like the BlockEntityTag used to, but requires an "id" field for the type of block.
123123 final var nbt = NBT .itemStackToNBT (item );
124124 final var entityData = nbt .getOrCreateCompound ("components" ).getOrCreateCompound ("minecraft:block_entity_data" );
125- entityData .setString ("id" , item .getType ().getKey ().toString ());
125+ if (MinecraftVersion .isAtLeastVersion (MinecraftVersion .MC1_20_R4 )) {
126+ // See https://github.com/spnda/BlockProt/issues/339#issuecomment-3690954598
127+ entityData .setString ("id" , "minecraft:shulker_box" );
128+ } else {
129+ entityData .setString ("id" , item .getType ().getKey ().toString ());
130+ }
126131 entityData .getOrCreateCompound ("PublicBukkitValues" ).mergeCompound (handler .getNbtCopy ());
127132 item = Objects .requireNonNull (NBT .itemStackFromNBT (nbt ));
128133 } else {
You can’t perform that action at this time.
0 commit comments