How do I add an Achievement for killing a specific mob ?

Started by JojoMichelDu59 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I add an Achievement for killing a specific mob ?

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)

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here is how: (You have to…
Mon, 08/05/2019 - 19:50

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.

Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alternatively, you could do…
Wed, 08/07/2019 - 12:12

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

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, but this way there…
Thu, 08/08/2019 - 17:05

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"

Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Agreed. It would be really…
Thu, 08/08/2019 - 17:12

Agreed. It would be really useful,they would have to implement a way to differentiate between the two entities though.

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Today, a year later, you can…
Sat, 05/16/2020 - 14:27

Today, a year later, you can do this easily because there is a mob killed by player trigger. Hope you figure it out!

Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
there is? 
Tue, 05/26/2020 - 17:25

there is? 

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Where is the trigger?
Tue, 08/04/2020 - 15:02

Where is the trigger?