Started by
Catz
on
Topic category: Help with modding (Java Edition)
Title of the post. I'm trying to make it so that when an armor item gets destroyed (from any mod, not just Vanilla) one of my mod's items will attempt to fill the armor slot the destroyed armor previously was in.
Also using MCreator 2022.2 version because future versions dropped 1.18.2 support.
No, I am not downloading a newer MCreator version until it gets 1.18 support. 1.19/1.20 chat reporting can stick it.
This version likely has many bugs including this one that were fixed in later versions. I would advise updating and using newer Minecraft version
Still broken in 2023.3 (using community plugin to run MC 1.18.2 on this version)
Does anyone in the community have a workaround?
Wait hold up, this might be an issue with Minecraft Forge itself rather than anything specific to MCreator. Just took at look at the Forge PlayerDestroyItemEvent class which is what triggers the "Item is destroyed" global trigger. A comment states that one of the event's properties "may be null if [the] player destroys the item by any use besides holding it"
So since armor doesn't get destroyed while in the player's hand, instead being destroyed in an armor slot, it probably doesn't get detected for that reason. Gonna repost this issue on Forge's forums, maybe someone has a workaround to this.
I don't think they will be fixing bug for 1.18.2