How do i make mobs to only spawn in caves?

Started by Callofmc on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i make mobs to only spawn in caves?

I have this mob i want to only spawn underground/caves however i do not see a way to do it now i could be blind but i don't see a way to do it

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a more simple…
Fri, 01/22/2021 - 17:40

There is a more simple alternative to thes procedures:

Add a additionnal condition to entity spawn. To make that, create a procedure in which you add a "Return [...]" block, and in it add either the option A or B, and then set this procedure to "Custom spawning condition" in "Spawning". This will only apply when the mob try to naturaly spawn, and not when you use a spawn egg. I made like this in my own mod and it work greatly.

PS: Sorry for my bad english, I am french. And I don't know how to add screenshots.

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
*these procedures
Fri, 01/22/2021 - 17:41

*these procedures

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yo, does anyone also know…
Sun, 05/02/2021 - 21:07

yo, does anyone also know how to do the same thing, but if your wearing a helmet you dont burn? i am making a mod and having a hard time with that