Started by
pylonuclear
on
Topic category: Help with Minecraft modding (Java Edition)
I am planning to make a mod that makes it to where when you eat chicken, it give you a wishbone. Does anyone know how this can be achieved, or even if it can be achieved? Thanks in Advance!
Edited by pylonuclear on Thu, 10/29/2020 - 00:23
There is a global trigger named "Player right clicks with item". I think if you check if chicken is in the main hand of the player you can do something.
Or you can try to replace the vanilla chicken (item) by creating a new one and replacing the chicken (creature) loot table with your chicken (item). If you do that you can use the "when food eaten" food event.
I think the easyest way is the second one :3
in any case you will need a IF for each vanilla food. or one IF that includes them all
For those of you who find this post and want to know the best answer, I think I figured out the best solution.
You make an advancement (hide it from the player if you wish)
There is a trigger in the achievements where you can select the food you want to detect, and then you can add your custom item into the loot table of the advancement. So if you eat the food, it will give you the item(s) you wish.