From c4e7d148888b57aea0520cc762bbc47ccec75ba5 Mon Sep 17 00:00:00 2001 From: naqaden Date: Thu, 29 Nov 2018 15:10:57 -0700 Subject: [PATCH] Use ItemEnchantedBook#getEnchantedItemStack --- .../jei/plugins/vanilla/ingredients/EnchantDataHelper.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 +}