From 0d8afaff767228136c118013f7826552fd8ee9f8 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 27 Dec 2023 21:57:46 +0100 Subject: [PATCH] Fix 'initial_properties' warning --- src/enchanting.lua | 16 +++++++++------- src/itemframe.lua | 14 ++++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/enchanting.lua b/src/enchanting.lua index a22e971..5a69643 100644 --- a/src/enchanting.lua +++ b/src/enchanting.lua @@ -248,13 +248,15 @@ xdecor.register("enchantment_table", { }) minetest.register_entity("xdecor:book_open", { - visual = "sprite", - visual_size = {x=0.75, y=0.75}, - collisionbox = {0,0,0,0,0,0}, - pointable = false, - physical = false, - textures = {"xdecor_book_open.png"}, - static_save = false, + initial_properties = { + visual = "sprite", + visual_size = {x=0.75, y=0.75}, + collisionbox = {0,0,0,0,0,0}, + pointable = false, + physical = false, + textures = {"xdecor_book_open.png"}, + static_save = false, + }, }) minetest.register_lbm({ diff --git a/src/itemframe.lua b/src/itemframe.lua index 5a501b8..2903da6 100644 --- a/src/itemframe.lua +++ b/src/itemframe.lua @@ -181,12 +181,14 @@ xdecor.register("itemframe", { }) minetest.register_entity("xdecor:f_item", { - visual = "wielditem", - visual_size = {x = 0.33, y = 0.33}, - collisionbox = {0,0,0,0,0,0}, - pointable = false, - physical = false, - textures = {"air"}, + initial_properties = { + visual = "wielditem", + visual_size = {x = 0.33, y = 0.33}, + collisionbox = {0,0,0,0,0,0}, + pointable = false, + physical = false, + textures = {"air"}, + }, on_activate = function(self, staticdata) local pos = self.object:get_pos() if minetest.get_node(pos).name ~= "xdecor:itemframe" then