Started by
Cendi
on
Topic category: Help with Minecraft modding (Java Edition)
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 :/
I think that this will be possible in 2020.4, because of the new “condition” feature, put I’ll have to check.
I can confirm, it will be possible.
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.
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