diff --git a/mods/ENTITIES/mcl_burning/api.lua b/mods/ENTITIES/mcl_burning/api.lua index 2a4c6cc4d..75cb0d934 100644 --- a/mods/ENTITIES/mcl_burning/api.lua +++ b/mods/ENTITIES/mcl_burning/api.lua @@ -15,6 +15,7 @@ end function mcl_burning.is_affected_by_rain(obj) local pos = obj:get_pos() + if not pos then return false end return mcl_weather.rain.raining and mcl_weather.is_outdoor(pos) and mcl_weather.has_rain(pos) end @@ -22,6 +23,7 @@ function mcl_burning.is_affected_by_sunlight(obj, threshold) threshold = threshold or core.LIGHT_MAX local pos = obj:get_pos() + if not pos then return false end local _,dim = mcl_worlds.y_to_layer(pos.y) if dim ~= "overworld" then return false end diff --git a/mods/ENTITIES/mcl_mobs/physics.lua b/mods/ENTITIES/mcl_mobs/physics.lua index 7cbbfe08b..ea470d722 100644 --- a/mods/ENTITIES/mcl_mobs/physics.lua +++ b/mods/ENTITIES/mcl_mobs/physics.lua @@ -635,7 +635,7 @@ function mob_class:do_env_damage() end -- Simple light damage - if self.light_damage or 0 > 0 and mcl_burning.is_affected_by_sunlight(self.object, 12) then + if (self.light_damage or 0) > 0 and mcl_burning.is_affected_by_sunlight(self.object, 12) then if self:deal_light_damage(pos, self.light_damage) then return true end diff --git a/mods/ENTITIES/mobs_mc/rover.lua b/mods/ENTITIES/mobs_mc/rover.lua index efb57b253..3a07f2d36 100644 --- a/mods/ENTITIES/mobs_mc/rover.lua +++ b/mods/ENTITIES/mobs_mc/rover.lua @@ -158,7 +158,7 @@ mcl_mobs.register_mob("mobs_mc:rover", { local dim = mcl_worlds.pos_to_dimension(enderpos) if dim == "overworld" and mcl_burning.is_affected_by_rain(self.object) then self.state = "" - --rain hurts enderman + --rain hurts rovers self.object:punch(self.object, 1.0, { full_punch_interval=1.0, damage_groups={fleshy=self.rain_damage},