9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-29 03:49:15 +00:00

修改空判断

This commit is contained in:
XiaoMoMi
2025-08-13 21:56:08 +08:00
parent 0ebbd5068e
commit 70b8cab056
5 changed files with 20 additions and 7 deletions

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 == MItems.AIR) {
if (item == MItems.AIR && !id.equals(ItemKeys.AIR)) {
return null;
}
return FastNMS.INSTANCE.method$CraftItemStack$asCraftMirror(FastNMS.INSTANCE.constructor$ItemStack(item, 1));