Fixes error from ticket 1368 when crafting netherite stuff in smithing table. I wonder what else it fixes...

This commit is contained in:
Gunging 2021-04-02 00:22:49 -05:00
parent 191e747573
commit 2bea01c8be

View File

@ -384,7 +384,7 @@ public class CustomSmithingRecipe extends MythicRecipeOutput {
if (!getEnchantmentTreatment().equals(SmithingCombinationType.NONE)) {
// Get enchantment data
EnchantListData genEnchants = (EnchantListData) gen.getData(ItemStats.ENCHANTS);
EnchantListData genEnchants = (EnchantListData) gen.getData(ItemStats.ENCHANTS); if (genEnchants == null) { genEnchants = (EnchantListData) ItemStats.ENCHANTS.getClearStatData(); }
EnchantListData itemEnchants = item != null ? (EnchantListData) item.getData(ItemStats.ENCHANTS) : (EnchantListData) ItemStats.ENCHANTS.getClearStatData();
EnchantListData ingotEnchants = ingot != null ? (EnchantListData) ingot.getData(ItemStats.ENCHANTS) : (EnchantListData) ItemStats.ENCHANTS.getClearStatData();