mob now jumps properly when building
This commit is contained in:
parent
0e32dd2a24
commit
73af82d0b7
2
api.lua
2
api.lua
@ -1500,7 +1500,7 @@ minetest.register_entity(name, {
|
|||||||
local node1=minetest.get_node(s).name;
|
local node1=minetest.get_node(s).name;
|
||||||
if node1~="air" then minetest.set_node(s,{name="air"});minetest.add_item(s,ItemStack(node1)) end
|
if node1~="air" then minetest.set_node(s,{name="air"});minetest.add_item(s,ItemStack(node1)) end
|
||||||
end
|
end
|
||||||
s.y=s.y-sheight;self.object:setpos({x=s.x,y=s.y+1,z=s.z});
|
s.y=s.y-sheight;self.object:setpos({x=s.x,y=s.y+2,z=s.z});
|
||||||
else
|
else
|
||||||
local yaw1= self.object:getyaw()+pi/2; -- dig 2 blocks to make door toward player direction
|
local yaw1= self.object:getyaw()+pi/2; -- dig 2 blocks to make door toward player direction
|
||||||
local p1 = {x=s.x+math.cos(yaw1),y=s.y,z=s.z+math.sin(yaw1)};
|
local p1 = {x=s.x+math.cos(yaw1),y=s.y,z=s.z+math.sin(yaw1)};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user