How to disable custom monster spawning in caves

Started by Smakced on

Topic category: Help with modding (Java Edition)

Last seen on 02:05, 30. May 2021
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to disable custom monster spawning in caves
Wed, 10/23/2019 - 04:26 (edited)

I have the mob spawning type to "monster" so they only spawn at night, but this also makes them spawn in caves too which I don't want. When I put the mob spawning type to creature and restrict sun in the AI, the mob doesn't spawn at all. Does anyone know how to disable spawning in caves?

Edited by Smakced on Wed, 10/23/2019 - 04:26
Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Possibly you could despawn…
Wed, 10/23/2019 - 13:17

Possibly you could despawn them when they are in light levels lower than x and the world time is between 13000-22000 or something.

Last seen on 02:05, 30. May 2021
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for your help that…
Wed, 10/23/2019 - 22:24

Thanks for your help that worked. For anyone wondering how to do this you need to create a procedure for "on Initial Entity Spawn" that looks like this:

procedure

Last seen on 02:05, 30. May 2021
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here is an improved version…
Fri, 10/25/2019 - 17:03

Here is an improved version of the procedure. Use this one instead of the one posted above.

procedure