Started by
DarkParty
on
Topic category: Help with Minecraft modding (Java Edition)
So I have some bosses that are said to drop a certain weapon/armor that they wield. But then (since they have the weapon/armor on) they sometimes drop 2. So how without either making them not have the item or making the item have only a chance to drop would I make sure only one would drop.
Maybe try removing the equipped items when the entity dies. Although I'm not positive if the built-in entity trigger runs before the loot would drop or if you would need to experiment with global triggers (possibly using the entity attacked global trigger, or on entity tick update and some calculations to figure out if the entity is about to die)
maybe like "If get health of event target entity <10, set item in armor slot/mainhand to air?
Yeah, probably something like that. You could also experiment with the number some to test if the trigger you are using runs before or after the mob dies. Try if health =< 0, and if that doesn't work, go back to 10.