From b6ab815adccf8d08e4c5b95f0441ea9da424c634 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 22 Apr 2022 01:02:20 +0200 Subject: [PATCH] Fix endermen dropping node AND taking it --- mods/ENTITIES/mobs_mc/enderman.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index 6ab3763664..2af96b7268 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -395,8 +395,9 @@ mobs:register_mob("mobs_mc:enderman", { local node = minetest.get_node(take_pos) -- Don't destroy protected stuff. if not minetest.is_protected(take_pos, "") then - local dug = minetest.dig_node(take_pos) - if dug then + minetest.remove_node(take_pos) + 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 self._taken_node = mobs_mc.enderman_replace_on_take[node.name] else