I've canceled repairing elytra using leather, and now want to make it use a modded item to repair it? I think I can use the AnvilRepairEvent for this, but how?
Rollback Post to RevisionRollBack
Checkout my mod about Craftable End Portal frames!
Typically when you use mod items to repair Vanilla Items, you set up a Handler. In your case, an AnvilHandler. Create your Handler similar to what the AnvilUpdateEvent does, setting Items to use for repair, rename cost(if applicable), repair cost, output, checking to see if Item is a valid Item to repair, is repairable, and so on.
I've canceled repairing elytra using leather, and now want to make it use a modded item to repair it? I think I can use the AnvilRepairEvent for this, but how?
Checkout my mod about Craftable End Portal frames!
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2656035-craftable-end-portal-frames
Check out my YT Channel https://www.youtube.com/channel/UCaJyJFtI-BkO1a2OJTZbofw Please subscribe and like my vidz!
Typically when you use mod items to repair Vanilla Items, you set up a Handler. In your case, an AnvilHandler. Create your Handler similar to what the AnvilUpdateEvent does, setting Items to use for repair, rename cost(if applicable), repair cost, output, checking to see if Item is a valid Item to repair, is repairable, and so on.
I got it done but I need to set the cost properly, I want to make it so it uses the vanilla system for calculating cost, how do I do that?
Checkout my mod about Craftable End Portal frames!
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2656035-craftable-end-portal-frames
Check out my YT Channel https://www.youtube.com/channel/UCaJyJFtI-BkO1a2OJTZbofw Please subscribe and like my vidz!
I got this at the moment, but it's not working as intended. It works for Elytra with durability more than half, but less than half it's not working.
Checkout my mod about Craftable End Portal frames!
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2656035-craftable-end-portal-frames
Check out my YT Channel https://www.youtube.com/channel/UCaJyJFtI-BkO1a2OJTZbofw Please subscribe and like my vidz!