Set hopper redstone rules
This commit is contained in:
parent
bf5e4f0788
commit
8b15e41b12
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue