From 55009c257e253c49dacf017e4bd56bc36aca2e10 Mon Sep 17 00:00:00 2001 From: kabou Date: Sat, 19 Feb 2022 16:15:36 +0100 Subject: [PATCH] Use new vectors * Use vector.new instead of xyz table. --- mods/ITEMS/mcl_composters/init.lua | 2 +- mods/ITEMS/mcl_hoppers/init.lua | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_composters/init.lua b/mods/ITEMS/mcl_composters/init.lua index abcc7fcb4..7b6e9243b 100644 --- a/mods/ITEMS/mcl_composters/init.lua +++ b/mods/ITEMS/mcl_composters/init.lua @@ -159,7 +159,7 @@ local function composter_add_item(pos, node, player, itemstack, pointed_thing) local node_defs = minetest.registered_nodes[node.name] local level = node_defs["_mcl_compost_level"] -- spawn green particles above new layer - mcl_dye.add_bone_meal_particle(vector.add(pos, {x=0, y=level/8, z=0})) + mcl_dye.add_bone_meal_particle(vector.add(pos, vector.new(0, level/8, 0))) -- TODO: play some sounds -- update composter block if level < 7 then diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index 36a21ad95..8245a0b26 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -343,7 +343,7 @@ minetest.register_abm({ local abovenode = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}) if not minetest.registered_items[abovenode.name] then return end -- Don't bother checking item enties if node above is a container (should save some CPU) - if minetest.registered_items[abovenode.name].groups.container then + if minetest.get_item_group(abovenode.name, "container") then return end local meta = minetest.get_meta(pos) @@ -397,7 +397,7 @@ minetest.register_abm({ -- Suck an item from the container above into the hopper local upnode = minetest.get_node(uppos) if not minetest.registered_nodes[upnode.name] then return end - local g = minetest.registered_nodes[upnode.name].groups.container + local g = minetest.get_item_group(upnode.name, "container") local sucked = mcl_util.move_item_container(uppos, pos) -- Also suck in non-fuel items from furnace fuel slot @@ -442,7 +442,7 @@ minetest.register_abm({ -- Suck an item from the container above into the hopper local abovenode = minetest.get_node(above) if not minetest.registered_nodes[abovenode.name] then return end - local g = minetest.registered_nodes[abovenode.name].groups.container + local g = minetest.get_item_group(abovenode.name, "container") local sucked = mcl_util.move_item_container(above, pos) -- Also suck in non-fuel items from furnace fuel slot @@ -454,7 +454,7 @@ minetest.register_abm({ end -- Move an item from the hopper into the container to which the hopper points to - local g = minetest.registered_nodes[frontnode.name].groups.container + local g = minetest.get_item_group(frontnode.name, "container") if g == 2 or g == 3 or g == 5 or g == 6 then mcl_util.move_item_container(pos, front) elseif g == 4 then