Looking for a way to implement 1.18 mob spawning behaviour in 1.17

Sorry if this is not the right place for my question.

I’m looking for a way to get light level sensitive spawning mobs to only spawn at light level 0, similar to 1.18 mob spawning. I’ve looked for plugins for bukkit/spigot/papermc and datapacks, but haven’t been able to find any. Could anyone recommend a plugin, datapack, or other means (I’m decent at programming, I might be able to make a small plugin myself if this can be achieved using the bukkit/spigot/papermc API).

Thanks in advance.

1 Like

Due to my impatience and boredom, I’ve already started looking at the API. I figure I can listen for a CreatureSpawnEvent and get the relevant entity from there, but the Entity class doesn’t seem to have a method to check for the light level at it’s origin or current position.

If there are no plugins or datapacks available, could someone explain to me how I can get an entities spawn light level? Also, I’m not sure if I’m going at this the right way. Canceling every spawn afterwards would be a lot more inefficient than not considering the area to begin with.

1 Like