Random event (falling meteor)

Started by DanilaWiedzmin on Thu, 05/19/2022 - 11:21

Topic category: Help with modding (Java Edition)

Last seen on 04:05, 5. Jun 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Random event (falling meteor)
Thu, 05/19/2022 - 11:21

Hello to all who read this forum message. I need help to create a random event. I want to make a falling meteor from high on any place and any biome. And with random chance, in example 1.3% at day, 4% at night. After falling they make small crater and 2-5 meteor blocks remain in it. I already have my own meteor block.
In example i can say if u remember mod who named "Falling Meteors!"
Please help, how can i do it? Sorry for bad English!

Last seen on 07:06, 24. Jun 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I did this before in my mod,…
Fri, 05/20/2022 - 23:17

I did this before in my mod, but it was completely random without percentage chance.

 

My falling meteor are custom entities that spawn naturally (like how normal mobs spawn) but very rarely. As soon as they are spawned, they get teleported hundreds of block above the surface block.

Also made it have a chance of exploding mid-air like it's burning up to make it even rarer. Basically made an if statement on update tick of the meteor entity if random chance of #% it despawns and spawns an explosion.