June 5, 20223 yr Author In EnchantingPedestralTile.java, in the craft method, I changed ItemStack tool = iRecipe.getRecipeOutput(); to ItemStack tool = iRecipe.getCraftingResult(inv); And it works. It enchants the item and all but here, @Override public ItemStack getCraftingResult(IInventory inv) { ItemStack output = inv.getStackInSlot(0); int i = EnchantmentHelper.getEnchantmentLevel(enchant, output); int j = enchant.getMaxLevel(); if (output.isEnchantable() == true) { if (i != j) { output.addEnchantment(enchant, i + 1); } } return output; } It always enchants with level 1 enchantment, instead of getting the current enchantment level and incrementing it by one and then applying it to the item. Why does this happen? What do I do?
June 5, 20223 yr Author Sorry if I sound like a novice, but how do I use debugger here (I'm not sure how to use debugger here)?
June 5, 20223 yr 7 hours ago, PadFoot2008 said: Sorry if I sound like a novice, but how do I use debugger here (I'm not sure how to use debugger here)? https://www.eclipse.org/community/eclipse_newsletter/2017/june/article1.php Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
June 7, 20223 yr Author Thanks a lot, the debugger method worked. It turns out that ItemStack#isEnchantible() returns false if the item already has an enchantment. So I removed it. Edited June 8, 20223 yr by PadFoot2008
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.