Have an entity replace another entity with a _ in _ chance

Started by TosNoom on

Topic category: Help with modding (Java Edition)

Last seen on 19:40, 15. Dec 2023
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Have an entity replace another entity with a _ in _ chance

I can't figure out how to do this. Can someone help?

Last seen on 00:15, 20. May 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use the global trigger when…
Sun, 07/16/2023 - 15:36

Use the global trigger when entity spawns, and use if blocks and not blocks to check if provided world is not client side, also check if event/target entity is sub/type of the entity that you want to replace, and finally add the procedure template for 'do with 70% chance' and replace the 0.7 with whatever percentage chance divided by 100 you want(50%=0.5, 10%=0.1, 83%=0.83, etc)  If all of those conditions are true(either using and blocks or nested if blocks) despawn event/target entity and spawn in the entity you want.

 

That should work, if it does, edit the name of this forum topic to include the word solved.