Fix endermen dropping node AND taking it
This commit is contained in:
parent
511b7030e1
commit
b6ab815adc
|
@ -395,8 +395,9 @@ mobs:register_mob("mobs_mc:enderman", {
|
||||||
local node = minetest.get_node(take_pos)
|
local node = minetest.get_node(take_pos)
|
||||||
-- Don't destroy protected stuff.
|
-- Don't destroy protected stuff.
|
||||||
if not minetest.is_protected(take_pos, "") then
|
if not minetest.is_protected(take_pos, "") then
|
||||||
local dug = minetest.dig_node(take_pos)
|
minetest.remove_node(take_pos)
|
||||||
if dug then
|
local dug = minetest.get_node_or_nil(take_pos)
|
||||||
|
if dug and dug.name == "air" then
|
||||||
if mobs_mc.enderman_replace_on_take[node.name] then
|
if mobs_mc.enderman_replace_on_take[node.name] then
|
||||||
self._taken_node = mobs_mc.enderman_replace_on_take[node.name]
|
self._taken_node = mobs_mc.enderman_replace_on_take[node.name]
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user