summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-12-29 19:12:57 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2016-12-29 19:12:57 +0000
commit9f62234e42fa7d74dd0139685e2b621fba84febd (patch)
tree2f79a1f30f3be9ab7c2bce99385cf35f25c00682
parentf7798e1b29c6d4620d8dd8c8053ef4c110d2a9fc (diff)
mobs standing on "ignore" just wait for world to load around them
-rw-r--r--api.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/api.lua b/api.lua
index f171398..71f47ba 100644
--- a/api.lua
+++ b/api.lua
@@ -1,5 +1,5 @@
--- Mobs Api (27th December 2016)
+-- Mobs Api (29th December 2016)
mobs = {}
mobs.mod = "redo"
@@ -517,6 +517,12 @@ do_env_damage = function(self)
self.standing_in = node_ok(pos, "air").name
--print ("standing in " .. self.standing_in)
+ -- don't fall when on ignore, just stand still
+ if self.standing_in == "ignore" then
+ self.object:setvelocity({x = 0, y = 0, z = 0})
+ --print ("--- stopping on ignore")
+ end
+
if self.water_damage ~= 0
or self.lava_damage ~= 0 then