slime spawn crash the server when light is nil #3975
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-Minecraft feature
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#3975
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
MineClone2 version:
master branch commit
f941817c39
What happened?
it crash when light value is
nil
Okay - question... Are you using the very latest master snapshot? Like, from an hour ago?
And, if so, is it with or without the Minecraft 1.18+ light levels enabled?
also, @Codiac (because reasons)
It seems it is the latest master, look at the commit. Yeah, this one will be very interesting.
Also @Codiac again
Ahh, okay. You're right.
So, the question then remains -- Was the new light levels setting enabled or no?
local art_light = minetest.get_artificial_light(my_node.param1)
seems to be zero.
I'm wondering if the node in question doesn't have paramtype = "light" and whether this isn't guaranteed to always return a value, so the spawn check needs to take this into consideration.
https://github.com/minetest/minetest/blob/master/doc/lua_api.md
These would seem the most likely cause. The question then becomes what to do about the light check for that node?
You could: pass the check, fail the check, use gotten_light is the same check. Thoughts?
Actually looks like git cherry pick fail on my part; it's probably because the declaration of swamp_light_max wasn't moved above the new function.