Sych Posted April 6, 2023 Posted April 6, 2023 I want to add food item A and after it is consumed, I want it to leave in player inventory item B. Like with buckets or bowls in vanilla Minecraft, but the item that food will be leaving is not a bowl or bucket. Quote
warjort Posted April 6, 2023 Posted April 6, 2023 (edited) Override IForgeItem.hasCraftingRemainingItem() and getCraftingRemainingItem() for your Item implementation. https://github.com/MinecraftForge/MinecraftForge/blob/e6aaaff3f3d764c9dd92c4fc42d0f6e1b62071a5/src/main/java/net/minecraftforge/common/extensions/IForgeItem.java#L251 Edited April 6, 2023 by warjort Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
warjort Posted April 6, 2023 Posted April 6, 2023 Sorry, you said after eating, not crafting. Look at HoneyBottleItem.finishUsingItem() or one of the vanilla items that gives a remainder. 1 Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
Sych Posted April 10, 2023 Author Posted April 10, 2023 On 4/6/2023 at 6:49 PM, warjort said: Sorry, you said after eating, not crafting. Look at HoneyBottleItem.finishUsingItem() or one of the vanilla items that gives a remainder. Thank you, it helped! Quote
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.