visual_size = {x=0.75, y=0.75},
collisionbox = {0},
physical = false,
- textures = {"xdecor_book_open.png"}
+ textures = {"xdecor_book_open.png"},
+ on_activate = function(self)
+ local pos = self.object:getpos()
+ local pos_under = {x=pos.x, y=pos.y-1, z=pos.z}
+
+ if minetest.get_node(pos_under).name ~= "xdecor:enchantment_table" then
+ self.object:remove()
+ end
+ end
})
local function cap(S) return S:gsub("^%l", string.upper) end
physical = false,
textures = {"air"},
on_activate = function(self, staticdata)
+ local pos = self.object:getpos()
+ if minetest.get_node(pos).name ~= "xdecor:itemframe" then
+ self.object:remove()
+ end
+
if tmp.nodename and tmp.texture then
self.nodename = tmp.nodename
tmp.nodename = nil