diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/recipes/RecipeType.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/recipes/RecipeType.java index cc12025d9e..1db98b7e6e 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/recipes/RecipeType.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/recipes/RecipeType.java @@ -6,6 +6,7 @@ import java.util.HashSet; import java.util.List; import java.util.Locale; +import java.util.Optional; import java.util.Set; import java.util.function.BiConsumer; @@ -99,21 +100,12 @@ public RecipeType(NamespacedKey key, ItemStack item, BiConsumer itemId = Slimefun.getItemDataService().getItemData(item); + this.machine = itemId.orElse(""); } public RecipeType(NamespacedKey key, ItemStack item) { - this.key = key; - this.item = item; - - SlimefunItem slimefunItem = SlimefunItem.getByItem(item); - this.machine = slimefunItem != null ? slimefunItem.getId() : ""; + this(key, item, null); } public RecipeType(MinecraftRecipe recipe) {