From 7bf70becacd2f52654a0de23bbe6335f708a859e Mon Sep 17 00:00:00 2001 From: Niklp <89982526+Niklp09@users.noreply.github.com> Date: Sun, 11 Sep 2022 20:02:51 +0200 Subject: [PATCH 1/2] Fix deprecation warnings in animations.lua (#156) This bumps the minimal required Minetest version to 5.4.0 --- README.md | 2 +- handlers/animations.lua | 10 +++++----- mod.conf | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 05340a2..2565fdd 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ It adds a bunch of cute cubes, various mechanisms and stuff for [cutting](https: This mod is a lightweight alternative to HomeDecor and MoreBlocks. ### Requirements ### -This mod requires at least version 5.1 of Minetest. +This mod requires at least version 5.4 of Minetest. ### Credits ### diff --git a/handlers/animations.lua b/handlers/animations.lua index 2849667..e41d2d9 100644 --- a/handlers/animations.lua +++ b/handlers/animations.lua @@ -7,7 +7,7 @@ function xdecor.sit(pos, node, clicker, pointed_thing) if not top_face(pointed_thing) then return end local player_name = clicker:get_player_name() local objs = minetest.get_objects_inside_radius(pos, 0.1) - local vel = clicker:get_player_velocity() + local vel = clicker:get_velocity() local ctrl = clicker:get_player_control() for _, obj in pairs(objs) do @@ -34,13 +34,13 @@ function xdecor.sit(pos, node, clicker, pointed_thing) default.player_set_animation(clicker, "sit", 30) if node.param2 == 0 then - clicker:set_look_yaw(3.15) + clicker:set_look_horizontal(3.15) elseif node.param2 == 1 then - clicker:set_look_yaw(7.9) + clicker:set_look_horizontal(7.9) elseif node.param2 == 2 then - clicker:set_look_yaw(6.28) + clicker:set_look_horizontal(6.28) elseif node.param2 == 3 then - clicker:set_look_yaw(4.75) + clicker:set_look_horizontal(4.75) end end end diff --git a/mod.conf b/mod.conf index 62a4a4d..d7d2582 100644 --- a/mod.conf +++ b/mod.conf @@ -2,4 +2,4 @@ name = xdecor description = A decoration mod meant to be simple and well-featured. depends = default, bucket, doors, farming, stairs, xpanes optional_depends = fire, oresplus, moreblocks, mesecons -min_minetest_version = 5.1.0 +min_minetest_version = 5.4.0 From b546d69322103d8c9262f9129dda182f68bcb2c3 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Tue, 13 Sep 2022 00:51:24 +0200 Subject: [PATCH 2/2] Revert "Fix deprecation warnings in animations.lua (#156)" This reverts commit 7bf70becacd2f52654a0de23bbe6335f708a859e. --- README.md | 2 +- handlers/animations.lua | 10 +++++----- mod.conf | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2565fdd..05340a2 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ It adds a bunch of cute cubes, various mechanisms and stuff for [cutting](https: This mod is a lightweight alternative to HomeDecor and MoreBlocks. ### Requirements ### -This mod requires at least version 5.4 of Minetest. +This mod requires at least version 5.1 of Minetest. ### Credits ### diff --git a/handlers/animations.lua b/handlers/animations.lua index e41d2d9..2849667 100644 --- a/handlers/animations.lua +++ b/handlers/animations.lua @@ -7,7 +7,7 @@ function xdecor.sit(pos, node, clicker, pointed_thing) if not top_face(pointed_thing) then return end local player_name = clicker:get_player_name() local objs = minetest.get_objects_inside_radius(pos, 0.1) - local vel = clicker:get_velocity() + local vel = clicker:get_player_velocity() local ctrl = clicker:get_player_control() for _, obj in pairs(objs) do @@ -34,13 +34,13 @@ function xdecor.sit(pos, node, clicker, pointed_thing) default.player_set_animation(clicker, "sit", 30) if node.param2 == 0 then - clicker:set_look_horizontal(3.15) + clicker:set_look_yaw(3.15) elseif node.param2 == 1 then - clicker:set_look_horizontal(7.9) + clicker:set_look_yaw(7.9) elseif node.param2 == 2 then - clicker:set_look_horizontal(6.28) + clicker:set_look_yaw(6.28) elseif node.param2 == 3 then - clicker:set_look_horizontal(4.75) + clicker:set_look_yaw(4.75) end end end diff --git a/mod.conf b/mod.conf index d7d2582..62a4a4d 100644 --- a/mod.conf +++ b/mod.conf @@ -2,4 +2,4 @@ name = xdecor description = A decoration mod meant to be simple and well-featured. depends = default, bucket, doors, farming, stairs, xpanes optional_depends = fire, oresplus, moreblocks, mesecons -min_minetest_version = 5.4.0 +min_minetest_version = 5.1.0