[mobs_mc] Remove `goto` from enderman.lua

This commit is contained in:
kay27 2021-04-11 01:59:13 +04:00
parent 38d89edeb6
commit d710539ff2
1 changed files with 19 additions and 20 deletions

View File

@ -346,8 +346,7 @@ mobs:register_mob("mobs_mc:enderman", {
--skip player if they have no data - log it --skip player if they have no data - log it
if not player_eye_height then if not player_eye_height then
minetest.log("error", "Enderman at location: ".. dump(enderpos).." has indexed a null player!") minetest.log("error", "Enderman at location: ".. dump(enderpos).." has indexed a null player!")
goto continue else
end
--calculate very quickly the exact location the player is looking --calculate very quickly the exact location the player is looking
--within the distance between the two "heads" (player and enderman) --within the distance between the two "heads" (player and enderman)
@ -368,7 +367,7 @@ mobs:register_mob("mobs_mc:enderman", {
end end
end end
::continue:: -- this is a sweep over statement, this can be used to continue even when errors occurred end
end end
end end
end end