Started by
SunnyBoyWTF
on
Topic category: Help with Minecraft modding (Java Edition)
I have a model I just dont know what to do now whats the next step? How do I go about this?
Topic category: Help with Minecraft modding (Java Edition)
I have a model I just dont know what to do now whats the next step? How do I go about this?
...Depends on how you want it to work? There's really a lot of ways you could do this.
You'll probably want to classify your asteroid as some type of projectile, then randomly spawn it very high up somewhere in the vicinity of a player. You could make a procedure with a very small chance of triggering on player-update tick, which picks a random x and z offset for the asteroid. (And, again depending on how you want it to work, should probably have minimum values for the offset so it doesn't spawn directly on top of the player.) You could make a procedure that, on impact with a block, explodes, or generates particles, plays sound effects, etc.
If you want more control over the path/speed of the asteroid, you could make a custom entity instead of a projectile, as there's quite a lot more tools available to tamper with these, though you'd have to make sure to disable AI and whatnot.
I want to make it a entity
So, what you can do is "on player tick update", have a check that if a random number is between like 1 and 10 000, then it spawns a meteor around the player. How would you do that? simple, you get the player's X and Z coords, and add/remove a random number between, for example, a random number between 200 and -200, and then set the Y coord to about 330, and voilà! you should be done, hope this helps
...Just keep in mind that if it's too far, it won't work, you need it to spawn in loaded chunks.