Achievement for killing a certain mob

Started by SirBadger on

Topic category: Help with modding (Java Edition)

Last seen on 01:02, 5. Oct 2020
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Achievement for killing a certain mob

I'm trying to give the player an achievement for killing a certain mob, but it's not working. Does this not work anymore? I looked up multiple guides and they all have the "Add achievement to provided (entity)player" and I have "Add achievement to Event/target entity" which isn't working for me. I know this is a version thing but what do I do to make it work in my version? Thanks a lot!

Last seen on 15:43, 1. Jan 2024
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Should be pretty simple…
Sat, 10/03/2020 - 23:31

Should be pretty simple. Have it so under the mobs "When entity dies"  trigger, have the "Add advancement to ____".
Replace the Event/target Entity with Source Entity, and you should be good. You could also add some other things to it, but these are the basics.

Last seen on 01:02, 5. Oct 2020
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have the event trigger…
Sun, 10/04/2020 - 02:40

I have the event trigger under when entity dies, and under that is "Add achievement to source entity" with my achievement after it, but when I kill my mob nothing happens. The achievement is under the advancements tab but I'm not able to get it. Do you know anything that can cause issues with stuff like this?

Last seen on 15:43, 1. Jan 2024
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I could've gotten something…
Sun, 10/04/2020 - 03:01

I could've gotten something wrong. But the only thing I can think of right now is perhaps you already have the advancement? You can use commands to get rid of it if you do. Such would be "/advancement revoke username only mod_id:advancement_name".

If I did get something wrong, there's a chance you could have it under when entity takes damage, and have it check if the mobs HP is less than one. Though, I would assume this would have either the same effect as when entity dies, or not work as well.

Two possible alternatives to giving the player who kills the mob the advancement. Replacing source entity with "get nearest entity at X: Y: Z: of type Player" should give the nearest player the advancement, though, its not as ideal as the actual player who kills the mob may not get it if they are further than another player.
You could also have it work similarly to the advancement the Wither gives from beating it, where the item itself gives the advancement, rather than slaying the Wither.

Last seen on 01:02, 5. Oct 2020
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know what I did, but…
Sun, 10/04/2020 - 13:05

I don't know what I did, but I remade the mob and the achievement and it works now. Thank you for the help!!

Last seen on 20:50, 16. Mar 2023
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i can't find "when entity…
Thu, 03/02/2023 - 20:25

i can't find "when entity dies" trigger in advancement tab, advancement trigger builder

Last seen on 03:02, 8. Oct 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think they meant for the…
Fri, 03/03/2023 - 03:36

I think they meant for the mob your trying to get the advancement from.

Last seen on 14:04, 5. Mar 2023
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@gxywastaken You have to do…
Fri, 03/03/2023 - 13:43

@gxywastaken You have to do that by the entity itself

 

Last seen on 03:26, 21. Mar 2023
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@GXYwasTakenthe when entity…
Thu, 03/09/2023 - 16:47

@GXYwasTaken
the when entity dies is a global trigger, not accually a procedure block, also in the code of the advancement, you have to set it to "Custom Trigger" and make a procedure.