9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-25 09:59:20 +00:00

Update BukkitItemManager.java

This commit is contained in:
XiaoMoMi
2025-08-13 21:42:49 +08:00
parent fee3d2f1ac
commit 0ebbd5068e

View File

@@ -368,7 +368,7 @@ public class BukkitItemManager extends AbstractItemManager<ItemStack> {
@Nullable
private ItemStack createVanillaItemStack(Key id) {
Object item = FastNMS.INSTANCE.method$Registry$getValue(MBuiltInRegistries.ITEM, KeyUtils.toResourceLocation(id));
if (item == null || item == MItems.AIR) {
if (item == MItems.AIR) {
return null;
}
return FastNMS.INSTANCE.method$CraftItemStack$asCraftMirror(FastNMS.INSTANCE.constructor$ItemStack(item, 1));