From dfafa6c9694b058e4a442f53b59c96c62cda1323 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 31 Jan 2018 19:10:14 +0100 Subject: [PATCH] Fix rotation of falling anvils --- mods/ENTITIES/mcl_falling_nodes/init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mods/ENTITIES/mcl_falling_nodes/init.lua b/mods/ENTITIES/mcl_falling_nodes/init.lua index e6915d3d..7bb3942d 100644 --- a/mods/ENTITIES/mcl_falling_nodes/init.lua +++ b/mods/ENTITIES/mcl_falling_nodes/init.lua @@ -19,6 +19,15 @@ minetest.register_entity(":__builtin:falling_node", { is_visible = true, textures = {node.name}, }) + local def = core.registered_nodes[node.name] + -- Set correct entity yaw + if node.param2 ~= 0 then + if (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") then + self.object:set_yaw(core.dir_to_yaw(core.facedir_to_dir(node.param2))) + elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted") then + self.object:set_yaw(core.dir_to_yaw(core.wallmounted_to_dir(node.param2))) + end + end end, get_staticdata = function(self)