diff --git a/src/main/java/mezz/jei/plugins/vanilla/ingredients/EnchantDataHelper.java b/src/main/java/mezz/jei/plugins/vanilla/ingredients/EnchantDataHelper.java index fd3bef935..085c3d082 100644 --- a/src/main/java/mezz/jei/plugins/vanilla/ingredients/EnchantDataHelper.java +++ b/src/main/java/mezz/jei/plugins/vanilla/ingredients/EnchantDataHelper.java @@ -8,7 +8,6 @@ import com.google.common.base.MoreObjects; import mezz.jei.api.ingredients.IIngredientHelper; import net.minecraft.enchantment.EnchantmentData; -import net.minecraft.init.Items; import net.minecraft.item.ItemEnchantedBook; import net.minecraft.item.ItemStack; @@ -62,9 +61,7 @@ public String getResourceId(EnchantmentData ingredient) { @Override public ItemStack getCheatItemStack(EnchantmentData ingredient) { - ItemStack enchantedBook = new ItemStack(Items.ENCHANTED_BOOK); - ItemEnchantedBook.addEnchantment(enchantedBook, ingredient); - return enchantedBook; + return ItemEnchantedBook.getEnchantedItemStack(ingredient); } @Override @@ -84,4 +81,4 @@ public String getErrorInfo(@Nullable EnchantmentData ingredient) { return toStringHelper.toString(); } -} \ No newline at end of file +}