mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-25 09:59:20 +00:00
纠正创建原版物品itemstack
This commit is contained in:
@@ -365,9 +365,10 @@ public class BukkitItemManager extends AbstractItemManager<ItemStack> {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private ItemStack createVanillaItemStack(Key id) {
|
||||
Object item = FastNMS.INSTANCE.method$Registry$getValue(MBuiltInRegistries.ITEM, KeyUtils.toResourceLocation(id));
|
||||
if (item == null) {
|
||||
if (item == null || item == MItems.AIR) {
|
||||
return null;
|
||||
}
|
||||
return FastNMS.INSTANCE.method$CraftItemStack$asCraftMirror(FastNMS.INSTANCE.constructor$ItemStack(item, 1));
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
package net.momirealms.craftengine.bukkit.item.recipe;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.Recipe;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public interface BukkitRecipeConvertor<T extends Recipe<ItemStack>> {
|
||||
|
||||
Runnable convert(Key id, T recipe);
|
||||
}
|
||||
Reference in New Issue
Block a user