Started by
TrueFreesia
on
Topic category: Help with Minecraft modding (Java Edition)
Hey, I'm making a mod based all around stars and angels.
Is there some way to make it so an item randomly spawns throughout the world? Or would I need to do it through loot tables?
First of all, make a custom entity with a rare spawn rate. (Make it invisible)
Then inside entity spawning procedure you do the following:
Teleport the custom entity into the sky. (maybe y=300)
Then you despawn it.
After despawning it, you spawn a gem item and choose the item you want it to drop from the sky.
You must teleport the entity into the sky first before spawning the item, or else it would spawn on the ground