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

Started by TosNoom on

Topic category: Help with Minecraft modding (Java Edition)

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?

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.