How i remove the spawn of custom mobs from the underground?

Started by Cendi on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How i remove the spawn of custom mobs from the underground?

I have a trouble: I want to remove the spawn of my mobs from underground. But i don't want to do if Y < 60 for example. I want to do in this way: If Get Sky < 13 do Despawn entity for example. The trouble is that: "Get the light level" is the light of the sun or the torches for example, while i want the Skylight, so when i go in a block underground, if i press F3, i can see the voice Light (Sky 14) for example. I want to do an If with this parameter.

Sorry my english is not perfect, im italian :/

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think that this will be…
Sat, 07/11/2020 - 13:35

I think that this will be possible in 2020.4, because of the new “condition” feature, put I’ll have to check.

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can confirm, it will be…
Sat, 07/11/2020 - 13:36

I can confirm, it will be possible. 

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But... you can do this right…
Sat, 07/11/2020 - 13:39

But... you can do this right now with procedures, 

If: Block at x y z = cave air,

   Do: despawn entity

The trigger for this should be “on entity spawn”, but I don’t think that that is one, so you’ll have to use on entity tick, but that would get rid of the entity when it walks into a cave.

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If i do this procedure:…
Wed, 07/15/2020 - 07:11

If i do this procedure: block at x y z = cave air, don't run, because i tested that in the underground, there isn't only cave air but there is a lot of normal air and the mobs don't despawn