1
0
Fork 0

Merge pull request 'Fix endermen dropping node AND taking it (#2122)' (#2130) from fix_enderman_dupe into master

Reviewed-on: MineClone2/MineClone2#2130
Reviewed-by: kabou <kabou@noreply.git.minetest.land>
This commit is contained in:
cora 2022-04-22 10:25:46 +00:00
commit 1bcbdfbc4c
1 changed files with 3 additions and 2 deletions

View File

@ -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