Started by
FluvKii
on
Topic category: Help with Minecraft modding (Java Edition)
So, I am making a mod (From Dusk 'Till Dawn (FDTD)) that's heavily based off of Terraria with it's progression system, the Ender Dragon being the only boss standing between you and the PDS (Post Dragon State, this FDTD's Hardmode). I added loot flags, which work like the Terraria treasure bags. I want every player that dealt damage to the Dragon to get it's loot flag, but I don't know how to do this.. Can anyone help me? It would be much appreciated! :D
This would be complicated, but I believe it would work. (Though you may be able to simplify it:
Step 1: Make it so that when a boss dies, it increases a global variable by the number of players (I think there is a number thingy for that).
Step 2: Do a code block along the lines of (pun not intended): On entity tick update if entity is player if said global variable is 1 or higher, give item and decrease variable by 1.
This would not work completely because it might causes some players to get more of the item then others but it is the best I can do.