Fix item meta not being saved when including block state data (#4298)

This commit is contained in:
booky10 2024-12-06 18:53:53 +01:00 committed by GitHub
parent c9d5632143
commit 037410d405
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,6 +79,7 @@ public final class BukkitPickItemProvider extends PickItemProvider {
final ItemStack item = new ItemStack(block.getBlockData().getPlacementMaterial(), 1); final ItemStack item = new ItemStack(block.getBlockData().getPlacementMaterial(), 1);
if (includeData && item.getItemMeta() instanceof final BlockStateMeta blockStateMeta) { if (includeData && item.getItemMeta() instanceof final BlockStateMeta blockStateMeta) {
blockStateMeta.setBlockState(block.getState()); blockStateMeta.setBlockState(block.getState());
item.setItemMeta(blockStateMeta);
} }
return item; return item;
} else if (block.getType().isItem()) { } else if (block.getType().isItem()) {