From 8b15e41b1272ac75125e25323370a49c2c2896b4 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 10 Jan 2018 16:35:26 +0100 Subject: [PATCH] Set hopper redstone rules --- mods/ITEMS/mcl_hoppers/init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index 98e7f018f4..1689f08613 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -13,6 +13,14 @@ local mcl_hoppers_formspec = --[[ BEGIN OF NODE DEFINITIONS ]] +local redstone_rules = +{{x= 1, y= 0, z= 0}, + {x=-1, y= 0, z= 0}, + {x= 0, y= 1, z= 0}, + {x= 0, y= -1, z= 0}, + {x= 0, y= 0, z= 1}, + {x= 0, y= 0, z=-1}} + -- Downwards hopper (base definition) local def_hopper = { @@ -158,6 +166,7 @@ def_hopper_enabled.mesecons = { action_on = function(pos, node) minetest.swap_node(pos, {name="mcl_hoppers:hopper_disabled", param2=node.param2}) end, + rules = redstone_rules, }, } @@ -174,6 +183,7 @@ def_hopper_disabled.mesecons = { action_off = function(pos, node) minetest.swap_node(pos, {name="mcl_hoppers:hopper", param2=node.param2}) end, + rules = redstone_rules, }, } @@ -270,6 +280,7 @@ def_hopper_side_enabled.mesecons = { action_on = function(pos, node) minetest.swap_node(pos, {name="mcl_hoppers:hopper_side_disabled", param2=node.param2}) end, + rules = redstone_rules, }, } minetest.register_node("mcl_hoppers:hopper_side", def_hopper_side_enabled) @@ -281,6 +292,7 @@ def_hopper_side_disabled.mesecons = { action_off = function(pos, node) minetest.swap_node(pos, {name="mcl_hoppers:hopper_side", param2=node.param2}) end, + rules = redstone_rules, }, } minetest.register_node("mcl_hoppers:hopper_side_disabled", def_hopper_side_disabled)