yoggiou Posted December 1, 2024 Posted December 1, 2024 (edited) Hi, i'm trying to add a recipe that lowers the durability of a tool in the crafting table but i can't figure out how to do it. Here is an example of the basic json file where a melon is cut into 4 slices with an axe { "type": "minecraft:crafting_shapeless", "category": "misc", "ingredients": [ [ "minecraft:melon" ], "#minecraft:axes" ], "result": { "id": "minecraft:melon_slice", "count": 4 } } The axe disappears with this method, how do i get to lower the durability of the axe? Edited December 1, 2024 by yoggiou fix typo Quote
Choonster Posted December 3, 2024 Posted December 3, 2024 You need to create a custom recipe type that overrides IRecipe#getRemainingItems to return a copy of the axe with its durability reduced. I've got a very similar recipe implementation here, there's code in other parts of the repository to handle things like registration and data generation. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Recommended Posts
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.