Help getting a mob to spawn underground

Started by TheFool on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help getting a mob to spawn underground

Read a lot of posts with the same issue as me but they're all outdated and I can't find a good explanation on how to do this.

I'm trying to create a mob that spawns only in caves by either being in cave_air or below a certain Y level, but would persist outside of them too (via spawned with command, spawn egg or by leaving the cave). I've attempted to do so with the Custom Spawning Condition but I can't figure out how to get what I'm after. Anyone got tips or even a tutorial that'd help out?