Light Levels do not work as they logically should (documentation needs updating, or mod has a bug / logical flaw)
kit-sunei opened this issue ยท 5 comments
according to the incontrol wiki, on the topic of spawns:
minlight: integer value (between 0 and 15) indicating the minimum light level on the given block
maxlight: maximum light level
this is, admittedly, vague, but it does not function as one might expect, in my testing and attempts
the way vanila treats block lightlevel (which is implied based on the wording of this) is separate from sky light level. as far as i can tell, InControl conflates the two, and picks the highest number
using "maxlight": 1 in my potential spawn disables all surface spawns, because the blocklight level is ignored, and the skylight level is used, when it is larger
expected treatment of this feature would be to smoothly interpolate between the sky-light level and the block-light level based on in game time of day, which admittedly is a harder thing to implement, but would make the rule files much more intuitive.
as it stands, the wiki here: https://wiki.mcjty.eu/mods/index.php?title=ControlMods#Potential_Spawn
is entirely misleading and needs a rewording, if this is not to be reworked.
a simpler solution would be to have maxSkyLight and minSkyLight and maxBlockLight and minBlockLight
maxlight is working as intended though. The maximum of skylight and blocklight is also what vanilla uses to control mob spawning which is why In Control uses that
@McJty it doesnt function in the manner vanilla does, however, in my tests on latest version: the skylight is what is taken, if higher
this means, at night, it still is taking full daytime skylight and i can't do what i want to do: make mobs spawn at zero light level. this means, in the pitch black of night, an unlit tile on blocklightlevel returns skylight level
either that or my scripts are wrong which i doubt because i did an explicit test to try to ensure this was the issue, and the mobs spawn just fine underground where blocklight level is the only lightlevel to worry about
note: latest version as of time of the original post's writing, could no longer be the case
@McJty it doesnt function in the manner vanilla does, however, in my tests on latest version: the skylight is what is taken, if higher
this means, at night, it still is taking full daytime skylight and i can't do what i want to do: make mobs spawn at zero light level. this means, in the pitch black of night, an unlit tile on blocklightlevel returns skylight level
either that or my scripts are wrong which i doubt because i did an explicit test to try to ensure this was the issue, and the mobs spawn just fine underground where blocklight level is the only lightlevel to worry about
Err... are you wanting 0 light level spawns to also spawn on the surface, where light level would be 4 at night? If yes, make an extra rule that checks if the sky is viewable ("seesky": true,) and if light level is 4 or lower, then allow spawns. It won't affect your underground 0 light level mobs, but will allow surface spawns in moonlight.