Started by
JojoMichelDu59
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I want to create a mod that adds an Achievement called "Aw Man" when I kill a Creeper. How do I that ? (I am really bad at procedure-making, so explain it simply)
Here is how: (You have to use a custom mob, sadly)
1.Make a mob
2.Add an event for when it's killed to give you an advancement (you need create the actual advancement first)
Hope this helped.
Alternatively, you could do it by using two procedures (with two separate external triggers) and a global variable. This would allow you to use the vanilla creeper entity. However, since you would be using a variable, this would only work in single-player.
First, you would create a global logic variable (name it whatever you like), then create the achievement.
For the first procedure, select Entity Dies as the external trigger. The actual blocks you need will look like this:
If: Is current entity subtype of EntityCreeper = true
Do: Set Global: (Name Of Variable) to true
For the second procedure, select On Player Tick Update as the external trigger. The actual blocks you need will look like this:
If: Get Global: (iName of Variable) = true and has provided entity completed achievement: CUSTOM: (achievement name) = false
Do: Add achievement to provided entityPlayer: CUSTOM: (achievement name)
If this confused you, check out here: https://mcreator.net/node/52002
Yes, but this way there would be a lot of lag and the player would get the advancement even if the mob died naturally or was killed by someone else :/
I think they should add a "on mob killed by player trigger"
Agreed. It would be really useful,they would have to implement a way to differentiate between the two entities though.
Today, a year later, you can do this easily because there is a mob killed by player trigger. Hope you figure it out!
there is?
Yes
Where is the trigger?