From 867f83b07364b27189a58c1b35583edc036a9924 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 19 Jul 2015 16:59:13 +0100 Subject: [PATCH] Code tidy --- api.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/api.lua b/api.lua index 5ecc1df..752e206 100644 --- a/api.lua +++ b/api.lua @@ -21,7 +21,7 @@ function mobs:register_mob(name, def) jump_height = def.jump_height or 6, jump_chance = def.jump_chance or 0, rotate = def.rotate or 0, -- 0=front, 1.5=side, 3.0=back, 4.5=side2 - lifetimer = def.lifetimer or 180, -- was 600 + lifetimer = def.lifetimer or 180, -- 3 minutes hp_min = def.hp_min or 5, hp_max = def.hp_max or 10, physical = true, @@ -1182,8 +1182,8 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, inter action = function(pos, node, _, active_object_count_wider) -- do not spawn if too many active entities in area if active_object_count_wider > active_object_count - or not mobs.spawning_mobs[name] - or not pos then + or not mobs.spawning_mobs[name] then + --or not pos then return end @@ -1347,7 +1347,6 @@ function check_for_death(self) return end local pos = self.object:getpos() - pos.y = pos.y + 0.5 -- drop items half a block higher self.object:remove() local obj = nil for _,drop in ipairs(self.drops) do @@ -1370,7 +1369,6 @@ function check_for_death(self) }) end if self.on_die then - pos.y = pos.y - 0.5 self.on_die(self, pos) end end