Started by
JoseRicardo_YT
on
Topic category: Help with Minecraft modding (Java Edition)
hi i'd like to make a naturally spawned mob on lava, like the strider from 1.16 I want my mob to breed in lava, but I'm not sure how I can do it. something like the spawn and the behavior of this gentleman here:
Edited by JoseRicardo_YT on Tue, 04/13/2021 - 15:33
All you have to do is limit the blocks it can spawn on to lava (there is a section on the mobs spawn conditions page for this)
ok, and how do I limit the blocks in which my mob can generate?
Spawn and generate are the same thing?
I think the term "spawn" is commonly used for living entities that naturally appear under certain conditions (like nighttime for monsters), while "generate" is usually for structures, ores, plants, etc. which are parts or features of a world you want to appear somewhere.
if you want a mob to naturally spawn on lava, you'd have to override its natural spawning condition which can be done using a simple procedure, even if you don't code. in your mob's "natural entity spawning condition" condition, add this procedure:
which checks for lava underneath the mob and returns either true or false. if true is returned, your entity will then spawn on lava.
it seems that the code names have changed for these data blocks, anybody have a new solution?