How Do You Make An Entity Only Spawn After An Achievement Is Completed?

Started by Abdullah33 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How Do You Make An Entity Only Spawn After An Achievement Is Completed?
Thu, 12/08/2022 - 16:24 (edited)

I am trying to make an entity that spawns only after the ender dragon has been defeated using a natural entity spawning condition

 

My condition looks like this

https://www.mediafire.com/view/d8d1bzhi6e4j0jl/image%25286%2529.png/file

yet it still says missing dependencies in the dropdown menu of my entity although it ends with a return statement

https://www.mediafire.com/view/sb957xymq5ttwk8/image%25285%2529.png/file

My MCreator version is 2022.2 and the minecraft version is 1.16.5 if that helps

I thought the problem was that the Event/target entity was not specified so i added the global trigger On player tick update yet it still does not work

I tried looking for the same problem but most users are forgetting a return statement

Please help me with this problem

Let me know if it is or isn't possible so i can try doing it another way

Edited by Abdullah33 on Thu, 12/08/2022 - 16:24
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The problem is likely to do…
Sun, 12/18/2022 - 17:13

The problem is likely to do with the target entity not being specified. Conditional procedures probably don't work well with global triggers, because even though it works fine when triggered by a global trigger, it then doesn't send the result anywhere. When the procedure is called in the spawning conditions, then it doesn't have a target entity.
A solution would be creating a global variable that starts as false and then switches to true once any player gets that advancement this could be done with a global triggered procedure
IF (player gets advancement) AND (player has the killing the dragon advancement)
THEN (set that variable to true)

Should work