Posted October 25, 20186 yr I have an item which takes durability damage in the crafting table after each crafting. I have it registered in the ore dictionary using the WILDCARD_VALUE. When I use the item in a shaped recipe, the item takes durability damage and is reusable just as it's supposed to be. But if I make a shapeless recipe, it becomes completely useless after only being used once. Can someone help me figure out where I goofed up with this? Thank you. The item class: public class ItemMortarAndPestle extends Item { private Item containerItem; public ItemMortarAndPestle(String name) { setUnlocalizedName(name); setRegistryName(name); setMaxStackSize(1); setMaxDamage(64); setNoRepair(); } @Override public boolean hasContainerItem() { return true; } @Override public ItemStack getContainerItem(ItemStack itemStack) { return itemStack.getItemDamage() < itemStack.getMaxDamage() ? new ItemStack(itemStack.getItem(), 1, itemStack.getItemDamage() + 1) : ItemStack.EMPTY; } } The item's Ore Dictionary registry entry: OreDictionary.registerOre("mortar_and_pestle", new ItemStack(ItemInit.mortar_n_pestle, 1, OreDictionary.WILDCARD_VALUE)); And lastly, an example of a shapeless recipe in which the item is used: (This example stops working after one use) { "type": "minecraft:crafting_shapeless", "ingredients": [ { "item": "maidensmaterials:amethyst_chunk" }, { "type": "forge:ore_dict", "ore": "mortar_and_pestle" } ], "result": { "item": "maidensmaterials:amethyst_fragments", "count": 8 } }
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.