remove mesecons_pistons and mesecons_mvps

This commit is contained in:
goblin_mode 2024-10-26 17:06:22 +02:00 committed by cora
parent 80b8c339b0
commit b46042ce16
16 changed files with 0 additions and 1678 deletions

View File

@ -1,970 +0,0 @@
local GRAVITY = tonumber(minetest.settings:get("movement_gravity"))
local inv_nodes_movable = minetest.settings:get_bool("mcl_inv_nodes_movable", true)
--register stoppers for movestones/pistons
mesecon = {}
local alldirs = {
vector.new(1, 0, 0),
vector.new(-1, 0, 0),
vector.new(0, 1, 0),
vector.new(0, -1, 0),
vector.new(0, 0, 1),
vector.new(0, 0, -1)
}
local function join_table(t1, t2)
local rval = table.copy(t2)
for i, v in ipairs(t1) do
table.insert(rval, table.copy(v))
end
return rval
end
mesecon.mvps_stoppers = {}
mesecon.mvps_unsticky = {}
mesecon.mvps_droppers = {}
mesecon.on_mvps_move = {}
mesecon.mvps_unmov = {}
--- Objects (entities) that cannot be moved
function mesecon.register_mvps_unmov(objectname)
mesecon.mvps_unmov[objectname] = true;
end
function mesecon.is_mvps_unmov(objectname)
return mesecon.mvps_unmov[objectname]
end
function mesecon.is_mvps_dropper(node, pushdir, stack, stackid)
local get_dropper = mesecon.mvps_droppers[node.name]
if type (get_dropper) == "function" then
get_dropper = get_dropper(node, pushdir, stack, stackid)
end
if not get_dropper then
get_dropper = minetest.get_item_group(node.name, "dig_by_piston") == 1
end
return get_dropper
end
function mesecon.register_mvps_dropper(nodename, get_dropper)
if get_dropper == nil then
get_dropper = true
end
mesecon.mvps_droppers[nodename] = get_dropper
end
-- Nodes that cannot be pushed / pulled by movestones, pistons
function mesecon.is_mvps_stopper(node)
-- unknown nodes are always stoppers
return mesecon.mvps_stoppers[node.name] or not minetest.registered_nodes[node.name]
end
function mesecon.register_mvps_stopper(nodename)
mesecon.mvps_stoppers[nodename] = true
end
-- For nodes which ignore sticky sides.
-- They can't be pulled by sticky pistons and don't interact with slime blocks.
function mesecon.register_mvps_unsticky(nodename, get_unsticky)
if get_unsticky == nil then
get_unsticky = true
end
mesecon.mvps_unsticky[nodename] = get_unsticky
end
function mesecon.is_mvps_unsticky(node, pulldir, stack, stackid)
-- unknown nodes are always unsticky
if not minetest.registered_nodes[node.name] then
return true
end
local get_unsticky = mesecon.mvps_unsticky[node.name]
if type(get_unsticky) == "function" then
get_unsticky = get_unsticky(node, pulldir, stack, stackid)
end
return get_unsticky
end
-- Functions to be called on mvps movement
-- See also the callback
function mesecon.register_on_mvps_move(callback)
mesecon.on_mvps_move[#mesecon.on_mvps_move+1] = callback
end
local function on_mvps_move(moved_nodes)
for _, callback in ipairs(mesecon.on_mvps_move) do
callback(moved_nodes)
end
end
-- tests if the node can be pushed into, e.g. air, water, grass
local function node_replaceable(name)
if name == "ignore" then return true end
if minetest.registered_nodes[name] then
return minetest.registered_nodes[name].buildable_to or false
end
return false
end
local function is_available(pos)
local n = minetest.get_node(pos)
if not n then
return false, n
end
local name = n.name
if name == "ignore" then
minetest.get_voxel_manip():read_from_map(pos, pos)
n = minetest.get_node(pos)
if not n then
return false, n
end
name = n.name
end
if name == "ignore" then
return false, n
end
if minetest.registered_nodes[name] then
return minetest.registered_nodes[name].buildable_to or minetest.get_item_group(name, "dig_by_piston") == 1, n or false, n
end
return false, n
end
function mesecon.mvps_get_stack(pos, dir, maximum, piston_pos)
-- determine the number of nodes to be pushed
local nodes = {}
local dig_nodes = {}
local frontiers = {pos}
while #frontiers > 0 do
local np = frontiers[1]
local nn = minetest.get_node(np)
if nn.name == "ignore" then
minetest.get_voxel_manip():read_from_map(np, np)
nn = minetest.get_node(np)
end
if mesecon.is_mvps_stopper(nn) then
return
end
if minetest.get_item_group(nn.name, "dig_by_piston") == 1 then
-- if we want the node to drop, e.g. sugar cane, do not count towards push limit
table.insert(dig_nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}})
else
if not node_replaceable(nn.name) then
table.insert(nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}})
if #nodes > maximum then return nil, nil, false, true end
-- add connected nodes to frontiers, connected is a vector list
-- the vectors must be absolute positions
local connected = {}
local has_loop
if minetest.registered_nodes[nn.name] and minetest.registered_nodes[nn.name].mvps_sticky then
connected, has_loop = minetest.registered_nodes[nn.name].mvps_sticky(np, nn, piston_pos)
if has_loop then
return {}, {}, true, false
end
end
table.insert(connected, vector.add(np, dir))
-- Make sure there are no duplicates in frontiers / nodes before
-- adding nodes in "connected" to frontiers
for _, cp in ipairs(connected) do
local duplicate = false
for _, rp in ipairs(nodes) do
if vector.equals(cp, rp.pos) then
duplicate = true
end
end
for _, fp in ipairs(frontiers) do
if vector.equals(cp, fp) then
duplicate = true
end
end
if not duplicate and not mesecon.is_mvps_stopper(minetest.get_node(cp)) and minetest.get_item_group(nn.name, "dig_by_piston") == 0 then
table.insert(frontiers, cp)
end
end
end
end
table.remove(frontiers, 1)
end
return nodes, dig_nodes, false, false
end
function mesecon.mvps_set_owner(pos, placer)
local meta = minetest.get_meta(pos)
local owner = placer and placer.get_player_name and placer:get_player_name()
if owner and owner ~= "" then
meta:set_string("owner", owner)
else
meta:set_string("owner", "$unknown") -- to distinguish from older pistons
end
end
local function are_protected(nodes, player_name)
for _, node in pairs(nodes) do
if minetest.is_protected(node.pos, player_name) then
return true
end
end
return false
end
function mesecon.mvps_push(pos, dir, maximum, player_name, piston_pos)
-- check if the node in front of the piston is protected against player_name (to prevent replacing air)
if minetest.is_protected(pos, player_name) then
return false
end
return mesecon.mvps_push_or_pull(pos, dir, dir, maximum, player_name, piston_pos)
end
function mesecon.mvps_pull_single(pos, dir, maximum, player_name, piston_pos)
local nodes = mesecon.mvps_get_stack(pos, dir, maximum, player_name)
if not nodes then return end
-- ensure sticky pistons; even without slimeblocks attached adhere to the unpullable rule.
for id, n in ipairs(nodes) do
if not mesecon.is_mvps_unsticky(n.node, dir, nodes, id) then
return mesecon.mvps_push_or_pull(pos, vector.multiply(dir, -1), dir, maximum, player_name, piston_pos)
end
end
end
-- pos: pos of mvps; stackdir: direction of building the stack
-- movedir: direction of actual movement
-- maximum: maximum nodes to be pushed
function mesecon.mvps_push_or_pull(pos, _, movedir, maximum, player_name, piston_pos)
local nodes, dig_nodes, has_loop, too_many = mesecon.mvps_get_stack(pos, movedir, maximum, piston_pos)
if has_loop or too_many then
return false
end
if not nodes then return end
local newpos={}
-- check node availability to push/pull into, and fill newpos[i]
for i in ipairs(nodes) do
newpos[i] = vector.add(nodes[i].pos, movedir)
if (newpos[i].x == piston_pos.x) and (newpos[i].y == piston_pos.y) and (newpos[i].z == piston_pos.z) then
return
end
if minetest.is_protected(newpos[i], player_name) then
return
end
if not is_available(newpos[i]) then
local available = false
for j in ipairs(nodes) do
if i ~= j then
if (newpos[i].x == nodes[j].pos.x) and (newpos[i].y == nodes[j].pos.y) and (newpos[i].z == nodes[j].pos.z) then
available = true
break
end
end
end
if not available then
return
end
end
end
local all_nodes = nodes
if dig_nodes and #dig_nodes > 0 then all_nodes = join_table(dig_nodes, nodes) end
if are_protected(all_nodes, player_name) then
return
end
local first_dropper = nil
-- remove all nodes
for id, n in ipairs(all_nodes) do
n.meta = minetest.get_meta(n.pos):to_table()
local is_dropper = mesecon.is_mvps_dropper(n.node, movedir, all_nodes, id)
if is_dropper then
-- if current node has already been destroyed (e.g. chain reaction of sugar cane breaking), skip it
if minetest.get_node(n.pos).name == n.node.name then
local def = minetest.registered_nodes[n.node.name]
def.on_dig(n.pos, n.node) --no need to check if it exists since all nodes have this via metatable (defaulting to minetest.node_dig which will handle drops)
minetest.remove_node(n.pos)
end
else
minetest.remove_node(n.pos)
local node_timer = minetest.get_node_timer(n.pos)
if node_timer:is_started() then
n.node_timer = {node_timer:get_timeout(), node_timer:get_elapsed()}
end
end
if is_dropper then
-- get id of the first dropper, but we still let everything else drop, so don't break here
if not first_dropper then first_dropper = id end
end
end
-- add nodes
for id, n in ipairs(all_nodes) do
if first_dropper and id >= first_dropper then
break
end
local np = newpos[id]
minetest.add_node(np, n.node)
minetest.get_meta(np):from_table(n.meta)
if n.node_timer then
minetest.get_node_timer(np):set(unpack(n.node_timer))
end
if string.find(n.node.name, "mcl_observers:observer") then
-- It also counts as a block update when the observer itself is moved by a piston (Wiki):
mcl_observers.observer_activate(np)
end
end
local moved_nodes = {}
local oldstack = table.copy(nodes)
for i in ipairs(nodes) do
if first_dropper and i >= first_dropper then
break
end
moved_nodes[i] = {}
moved_nodes[i].oldpos = nodes[i].pos
nodes[i].pos = newpos[i]
moved_nodes[i].pos = nodes[i].pos
moved_nodes[i].node = nodes[i].node
moved_nodes[i].meta = nodes[i].meta
moved_nodes[i].node_timer = nodes[i].node_timer
end
on_mvps_move(moved_nodes)
return true, nodes, oldstack
end
function mesecon.mvps_move_objects(pos, dir, nodestack)
-- Do not move entities into solid node.
local destpos = vector.add(pos, vector.multiply(dir, #nodestack + 1))
local destnode = minetest.get_node(destpos)
if not minetest.registered_nodes[destnode.name] or minetest.registered_nodes[destnode.name].walkable then
return
end
local objects_to_move = {}
local indices_to_push = {#nodestack}
if #nodestack < 2 then
table.insert(indices_to_push, -1)
table.insert(indices_to_push, 0)
end
for _, index in pairs(indices_to_push) do
-- Move object at tip of stack, pushpos is position at tip of stack
local pushpos = vector.add(pos, vector.multiply(dir, index))
local objects = minetest.get_objects_inside_radius(pushpos, index == #nodestack and 1.15 or 0.95)
for _, obj in ipairs(objects) do
table.insert(objects_to_move, obj)
end
-- Move objects lying/standing on the stack (before it was pushed - oldstack)
if GRAVITY > 0 then
-- If gravity positive and dir horizontal, push players standing on the stack
for _, n in ipairs(nodestack) do
local p_above = vector.add(n.pos, {x=0, y=1, z=0})
local objects = minetest.get_objects_inside_radius(p_above, 1.15)
for _, obj in ipairs(objects) do
table.insert(objects_to_move, obj)
end
end
end
end
for _, obj in ipairs(objects_to_move) do
local entity = obj:get_luaentity()
local player = obj:is_player()
if not entity or not player and not mesecon.is_mvps_unmov(entity.name) then
obj:set_pos(destpos:offset(0, -0.5, 0))
-- Launch Player, TNT & mobs like in Minecraft
-- Only doing so if slimeblock is attached.
for _, r in ipairs(alldirs) do
local adjpos = vector.add(destpos, r)
local adjnode = minetest.get_node(adjpos)
if minetest.registered_nodes[adjnode.name] and minetest.registered_nodes[adjnode.name].mvps_sticky and adjnode.name == "mcl_core:slimeblock" then
-- Reset acceleration of all objects before launching.
-- Fixes eggs, & snowballs thrown by dispensers
obj:set_acceleration({x=dir.x, y=-GRAVITY, z=dir.z})
--Need to set velocities differently for players, items & mobs/tnt, and falling anvils.
if player then
obj:add_velocity({x = dir.x * 10, y = dir.y * 13, z = dir.z * 10})
elseif entity.name == "__builtin:item" then
obj:add_velocity({x = dir.x * 9, y = dir.y * 11, z = dir.z * 9})
elseif entity.name == "__builtin:falling_node" then
obj:add_velocity({x = dir.x * 43, y = dir.y * 72, z = dir.z * 43})
else
obj:add_velocity({x = dir.x * 6, y = dir.y * 9, z = dir.z * 6})
end
end
end
end
end
end
-- Unmovable by design: nodes
mesecon.register_mvps_stopper("mcl_core:barrier")
mesecon.register_mvps_stopper("mcl_core:realm_barrier")
mesecon.register_mvps_stopper("mcl_core:void")
mesecon.register_mvps_stopper("mcl_core:bedrock")
mesecon.register_mvps_stopper("mcl_core:obsidian")
mesecon.register_mvps_stopper("mcl_core:crying_obsidian")
mesecon.register_mvps_stopper("mcl_chests:ender_chest")
mesecon.register_mvps_stopper("mcl_chests:ender_chest_small")
mesecon.register_mvps_stopper("mcl_mobspawners:spawner")
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_off")
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_on")
mesecon.register_mvps_stopper("mcl_portals:portal")
mesecon.register_mvps_stopper("mcl_portals:portal_end")
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame")
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame_eye")
mesecon.register_mvps_stopper("mcl_enchanting:table")
mesecon.register_mvps_stopper("mcl_jukebox:jukebox")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_on")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_off")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_on")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_off")
mesecon.register_mvps_stopper("mcl_banners:hanging_banner")
mesecon.register_mvps_stopper("mcl_banners:standing_banner")
mesecon.register_mvps_stopper("mcl_beehives:bee_nest")
mesecon.register_mvps_stopper("mcl_beehives:beehive")
mesecon.register_mvps_stopper("mcl_compass:lodestone")
mesecon.register_mvps_stopper("mcl_sculk:sculk")
mesecon.register_mvps_stopper("mcl_sculk:catalyst")
-- Unmovable by technical restrictions.
-- Open formspec would screw up if node is destroyed (minor problem)
-- Would screw up on/off state of trapped chest (big problem)
-- Would duplicate xp when moved
mesecon.register_mvps_stopper("mcl_furnaces:furnace")
mesecon.register_mvps_stopper("mcl_furnaces:furnace_active")
mesecon.register_mvps_stopper("mcl_blast_furnace:blast_furnace")
mesecon.register_mvps_stopper("mcl_blast_furnace:blast_furnace_active")
mesecon.register_mvps_stopper("mcl_smoker:smoker")
mesecon.register_mvps_stopper("mcl_smoker:smoker_active")
-- These are unmovable in java edition due to technical restrictions
-- disable the setting mcl_nodes_movable
if not inv_nodes_movable then
mesecon.register_mvps_stopper("mcl_hoppers:hopper")
mesecon.register_mvps_stopper("mcl_hoppers:hopper_side")
mesecon.register_mvps_stopper("mcl_droppers:dropper")
mesecon.register_mvps_stopper("mcl_droppers:dropper_up")
mesecon.register_mvps_stopper("mcl_droppers:dropper_down")
mesecon.register_mvps_stopper("mcl_dispensers:dispenser")
mesecon.register_mvps_stopper("mcl_dispensers:dispenser_up")
mesecon.register_mvps_stopper("mcl_dispensers:dispenser_down")
mesecon.register_mvps_stopper("mcl_barrels:barrel_open")
mesecon.register_mvps_stopper("mcl_barrels:barrel_closed")
mesecon.register_mvps_stopper("mcl_anvils:anvil")
mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_1")
mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_2")
end
mesecon.register_mvps_stopper("mcl_chests:chest")
mesecon.register_mvps_stopper("mcl_chests:chest_small")
mesecon.register_mvps_stopper("mcl_chests:chest_left")
mesecon.register_mvps_stopper("mcl_chests:chest_right")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_small")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_left")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_right")
mesecon.register_mvps_stopper("mcl_signs:wall_sign")
mesecon.register_mvps_stopper("mcl_signs:standing_sign")
mesecon.register_mvps_stopper("mcl_signs:standing_sign22_5")
mesecon.register_mvps_stopper("mcl_signs:standing_sign45")
mesecon.register_mvps_stopper("mcl_signs:standing_sign67_5")
-- Campfires
mesecon.register_mvps_stopper("mcl_campfires:campfire")
mesecon.register_mvps_stopper("mcl_campfires:campfire_lit")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire_lit")
-- Unmovable by design: objects
mesecon.register_mvps_unmov("mcl_enchanting:book")
mesecon.register_mvps_unmov("mcl_chests:chest")
mesecon.register_mvps_unmov("mcl_banners:hanging_banner")
mesecon.register_mvps_unmov("mcl_banners:standing_banner")
mesecon.register_mvps_unmov("mcl_signs:text")
mesecon.register_mvps_unmov("mcl_mobspawners:doll")
mesecon.register_mvps_unmov("mcl_armor_stand:armor_entity")
mesecon.register_mvps_unmov("mcl_itemframes:item")
mesecon.register_mvps_unmov("mcl_itemframes:map")
mesecon.register_mvps_unmov("mcl_paintings:painting")
mesecon.register_mvps_unmov("mcl_end:crystal")
-- Unpullable by design: nodes
-- Glazed Terracotta
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_red")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_orange")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_yellow")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_green")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_lime")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_purple")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_magenta")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_blue")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_cyan")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_white")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_grey")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_silver")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_black")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_brown")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink")
-- Bamboo
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_endcap")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_1")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_2")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_3")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_door")
mesecon.register_mvps_unsticky("mcl_bamboo:scaffolding")
-- Beds
mesecon.register_mvps_unsticky("mcl_beds:bed_black_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_black_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_blue_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_blue_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_brown_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_brown_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_cyan_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_cyan_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_green_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_green_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_grey_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_grey_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_light_blue_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_light_blue_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_lime_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_lime_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_magenta_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_magenta_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_orange_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_orange_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_pink_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_pink_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_purple_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_purple_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_red_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_red_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_silver_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_silver_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_white_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_white_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_yellow_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_yellow_bottom")
-- Cactus, Sugarcane & Vines
mesecon.register_mvps_unsticky("mcl_core:cactus")
mesecon.register_mvps_unsticky("mcl_core:reeds")
mesecon.register_mvps_unsticky("mcl_core:vine")
-- Cake
mesecon.register_mvps_unsticky("mcl_cake:cake_1")
mesecon.register_mvps_unsticky("mcl_cake:cake_2")
mesecon.register_mvps_unsticky("mcl_cake:cake_3")
mesecon.register_mvps_unsticky("mcl_cake:cake_4")
mesecon.register_mvps_unsticky("mcl_cake:cake_5")
mesecon.register_mvps_unsticky("mcl_cake:cake_6")
mesecon.register_mvps_unsticky("mcl_cake:cake")
-- Carved & Jack O'Lantern Pumpkins, Pumpkin & Melon
mesecon.register_mvps_unsticky("mcl_farming:pumpkin_face")
mesecon.register_mvps_unsticky("mcl_farming:pumpkin_face_light")
mesecon.register_mvps_unsticky("mcl_farming:pumpkin")
mesecon.register_mvps_unsticky("mcl_farming:melon")
-- Chorus Plant & Flower
mesecon.register_mvps_unsticky("mcl_end:chorus_plant")
mesecon.register_mvps_unsticky("mcl_end:chorus_flower")
-- Cobweb
mesecon.register_mvps_unsticky("mcl_core:cobweb")
-- Cocoa
mesecon.register_mvps_unsticky("mcl_cocoas:cocoa_1")
mesecon.register_mvps_unsticky("mcl_cocoas:cocoa_2")
mesecon.register_mvps_unsticky("mcl_cocoas:cocoa_3")
-- Doors
mesecon.register_mvps_unsticky("mcl_doors:wooden_door_t_1")
mesecon.register_mvps_unsticky("mcl_doors:wooden_door_b_1")
mesecon.register_mvps_unsticky("mcl_doors:wooden_door_t_2")
mesecon.register_mvps_unsticky("mcl_doors:wooden_door_b_2")
mesecon.register_mvps_unsticky("mcl_doors:iron_door_t_1")
mesecon.register_mvps_unsticky("mcl_doors:iron_door_b_1")
mesecon.register_mvps_unsticky("mcl_doors:iron_door_t_2")
mesecon.register_mvps_unsticky("mcl_doors:iron_door_b_2")
mesecon.register_mvps_unsticky("mcl_doors:acacia_door_t_1")
mesecon.register_mvps_unsticky("mcl_doors:acacia_door_b_1")
mesecon.register_mvps_unsticky("mcl_doors:acacia_door_t_2")
mesecon.register_mvps_unsticky("mcl_doors:acacia_door_b_2")
mesecon.register_mvps_unsticky("mcl_doors:birch_door_t_1")
mesecon.register_mvps_unsticky("mcl_doors:birch_door_b_1")
mesecon.register_mvps_unsticky("mcl_doors:birch_door_t_2")
mesecon.register_mvps_unsticky("mcl_doors:birch_door_b_2")
mesecon.register_mvps_unsticky("mcl_doors:dark_oak_door_t_1")
mesecon.register_mvps_unsticky("mcl_doors:dark_oak_door_b_1")
mesecon.register_mvps_unsticky("mcl_doors:dark_oak_door_t_2")
mesecon.register_mvps_unsticky("mcl_doors:dark_oak_door_b_2")
mesecon.register_mvps_unsticky("mcl_doors:spruce_door_t_1")
mesecon.register_mvps_unsticky("mcl_doors:spruce_door_b_1")
mesecon.register_mvps_unsticky("mcl_doors:spruce_door_t_2")
mesecon.register_mvps_unsticky("mcl_doors:spruce_door_b_2")
mesecon.register_mvps_unsticky("mcl_doors:jungle_door_t_1")
mesecon.register_mvps_unsticky("mcl_doors:jungle_door_b_1")
mesecon.register_mvps_unsticky("mcl_doors:jungle_door_t_2")
mesecon.register_mvps_unsticky("mcl_doors:jungle_door_b_2")
-- Dragon Egg
mesecon.register_mvps_unsticky("mcl_end:dragon_egg")
-- Fire
mesecon.register_mvps_unsticky("mcl_fire:fire")
mesecon.register_mvps_unsticky("mcl_fire:eternal_fire")
-- Flower Pots
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_allium")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_azure_bluet")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_blue_orchid")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_dandelion")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_fern")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_oxeye_daisy")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_poppy")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_tulip_orange")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_tulip_pink")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_tulip_red")
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_tulip_white")
-- Flowers, Lilypad & Dead Bush
mesecon.register_mvps_unsticky("mcl_core:deadbush")
mesecon.register_mvps_unsticky("mcl_flowers:allium")
mesecon.register_mvps_unsticky("mcl_flowers:azure_bluet")
mesecon.register_mvps_unsticky("mcl_flowers:blue_orchid")
mesecon.register_mvps_unsticky("mcl_flowers:dandelion")
mesecon.register_mvps_unsticky("mcl_flowers:double_fern")
mesecon.register_mvps_unsticky("mcl_flowers:double_fern_top")
mesecon.register_mvps_unsticky("mcl_flowers:fern")
mesecon.register_mvps_unsticky("mcl_flowers:lilac")
mesecon.register_mvps_unsticky("mcl_flowers:lilac_top")
mesecon.register_mvps_unsticky("mcl_flowers:oxeye_daisy")
mesecon.register_mvps_unsticky("mcl_flowers:peony")
mesecon.register_mvps_unsticky("mcl_flowers:peony_top")
mesecon.register_mvps_unsticky("mcl_flowers:poppy")
mesecon.register_mvps_unsticky("mcl_flowers:rose_bush")
mesecon.register_mvps_unsticky("mcl_flowers:rose_bush_top")
mesecon.register_mvps_unsticky("mcl_flowers:sunflower")
mesecon.register_mvps_unsticky("mcl_flowers:sunflower_top")
mesecon.register_mvps_unsticky("mcl_flowers:tallgrass")
mesecon.register_mvps_unsticky("mcl_flowers:double_grass")
mesecon.register_mvps_unsticky("mcl_flowers:double_grass_top")
mesecon.register_mvps_unsticky("mcl_flowers:tulip_orange")
mesecon.register_mvps_unsticky("mcl_flowers:tulip_pink")
mesecon.register_mvps_unsticky("mcl_flowers:tulip_red")
mesecon.register_mvps_unsticky("mcl_flowers:tulip_white")
mesecon.register_mvps_unsticky("mcl_flowers:waterlily")
-- Heads
mesecon.register_mvps_unsticky("mcl_heads:creeper")
mesecon.register_mvps_unsticky("mcl_heads:skeleton")
mesecon.register_mvps_unsticky("mcl_heads:steve")
mesecon.register_mvps_unsticky("mcl_heads:wither_skeleton")
mesecon.register_mvps_unsticky("mcl_heads:zombie")
-- Item Frame
mesecon.register_mvps_unsticky("mcl_itemframes:frame")
mesecon.register_mvps_unsticky("mcl_itemframes:glow_frame")
-- Ladder
mesecon.register_mvps_unsticky("mcl_core:ladder")
-- Lava & Water
mesecon.register_mvps_unsticky("mcl_core:lava_source")
mesecon.register_mvps_unsticky("mcl_core:lava_flowing")
mesecon.register_mvps_unsticky("mcl_core:water_source")
mesecon.register_mvps_unsticky("mcl_core:water_flowing")
mesecon.register_mvps_unsticky("mclx_core:river_water_source")
mesecon.register_mvps_unsticky("mclx_core:river_water_flowing")
-- Leaves
mesecon.register_mvps_unsticky("mcl_core:leaves")
mesecon.register_mvps_unsticky("mcl_core:acacialeaves")
mesecon.register_mvps_unsticky("mcl_core:birchleaves")
mesecon.register_mvps_unsticky("mcl_core:darkleaves")
mesecon.register_mvps_unsticky("mcl_core:spruceleaves")
mesecon.register_mvps_unsticky("mcl_core:jungleleaves")
-- Lever
mesecon.register_mvps_unsticky("mesecons_walllever:wall_lever_off")
mesecon.register_mvps_unsticky("mesecons_walllever:wall_lever_on")
-- Mushrooms, Nether Wart & Amethyst
mesecon.register_mvps_unsticky("mcl_mushroom:mushroom_brown")
mesecon.register_mvps_unsticky("mcl_mushroom:mushroom_red")
mesecon.register_mvps_unsticky("mcl_nether:nether_wart_0")
mesecon.register_mvps_unsticky("mcl_nether:nether_wart_1")
mesecon.register_mvps_unsticky("mcl_nether:nether_wart_2")
mesecon.register_mvps_unsticky("mcl_nether:nether_wart")
mesecon.register_mvps_unsticky("mcl_amethyst:amethyst_cluster")
mesecon.register_mvps_unsticky("mcl_amethyst:budding_amethyst_block")
-- Pressure Plates
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_wood_on")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_wood_off")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_stone_on")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_stone_off")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_acaciawood_on")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_acaciawoood_off")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_birchwood_on")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_birchwood_off")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_darkwood_on")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_darkwood_off")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_sprucekwood_on")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_sprucewood_off")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_junglewood_on")
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_junglewood_off")
-- Redstone Comparators
mesecon.register_mvps_unsticky("mcl_comparators:comparator_on_sub")
mesecon.register_mvps_unsticky("mcl_comparators:comparator_off_sub")
mesecon.register_mvps_unsticky("mcl_comparators:comparator_on_comp")
mesecon.register_mvps_unsticky("mcl_comparators:comparator_off_comp")
-- Redstone Dust
mesecon.register_mvps_unsticky("mesecons:wire_00000000_on")
mesecon.register_mvps_unsticky("mesecons:wire_00000000_off")
mesecon.register_mvps_unsticky("mesecons:wire_10000000_on")
mesecon.register_mvps_unsticky("mesecons:wire_10000000_off")
mesecon.register_mvps_unsticky("mesecons:wire_01000000_on")
mesecon.register_mvps_unsticky("mesecons:wire_01000000_off")
mesecon.register_mvps_unsticky("mesecons:wire_11000000_on")
mesecon.register_mvps_unsticky("mesecons:wire_11000000_off")
mesecon.register_mvps_unsticky("mesecons:wire_00100000_on")
mesecon.register_mvps_unsticky("mesecons:wire_00100000_off")
mesecon.register_mvps_unsticky("mesecons:wire_10100000_on")
mesecon.register_mvps_unsticky("mesecons:wire_10100000_off")
mesecon.register_mvps_unsticky("mesecons:wire_01100000_on")
mesecon.register_mvps_unsticky("mesecons:wire_01100000_off")
mesecon.register_mvps_unsticky("mesecons:wire_11100000_on")
mesecon.register_mvps_unsticky("mesecons:wire_11100000_off")
mesecon.register_mvps_unsticky("mesecons:wire_00010000_on")
mesecon.register_mvps_unsticky("mesecons:wire_00010000_off")
mesecon.register_mvps_unsticky("mesecons:wire_10010000_on")
mesecon.register_mvps_unsticky("mesecons:wire_10010000_off")
mesecon.register_mvps_unsticky("mesecons:wire_01010000_on")
mesecon.register_mvps_unsticky("mesecons:wire_01010000_off")
mesecon.register_mvps_unsticky("mesecons:wire_11010000_on")
mesecon.register_mvps_unsticky("mesecons:wire_11010000_off")
mesecon.register_mvps_unsticky("mesecons:wire_00110000_on")
mesecon.register_mvps_unsticky("mesecons:wire_00110000_off")
mesecon.register_mvps_unsticky("mesecons:wire_10110000_on")
mesecon.register_mvps_unsticky("mesecons:wire_10110000_off")
mesecon.register_mvps_unsticky("mesecons:wire_01110000_on")
mesecon.register_mvps_unsticky("mesecons:wire_01110000_off")
mesecon.register_mvps_unsticky("mesecons:wire_11110000_on")
mesecon.register_mvps_unsticky("mesecons:wire_11110000_off")
mesecon.register_mvps_unsticky("mesecons:wire_10001000_on")
mesecon.register_mvps_unsticky("mesecons:wire_10001000_off")
mesecon.register_mvps_unsticky("mesecons:wire_11001000_on")
mesecon.register_mvps_unsticky("mesecons:wire_11001000_off")
mesecon.register_mvps_unsticky("mesecons:wire_10101000_on")
mesecon.register_mvps_unsticky("mesecons:wire_10101000_off")
mesecon.register_mvps_unsticky("mesecons:wire_11101000_on")
mesecon.register_mvps_unsticky("mesecons:wire_11101000_off")
mesecon.register_mvps_unsticky("mesecons:wire_10011000_on")
mesecon.register_mvps_unsticky("mesecons:wire_10011000_off")
mesecon.register_mvps_unsticky("mesecons:wire_11011000_on")
mesecon.register_mvps_unsticky("mesecons:wire_11011000_off")
mesecon.register_mvps_unsticky("mesecons:wire_10111000_on")
mesecon.register_mvps_unsticky("mesecons:wire_10111000_off")
mesecon.register_mvps_unsticky("mesecons:wire_11111000_on")
mesecon.register_mvps_unsticky("mesecons:wire_11111000_off")
mesecon.register_mvps_unsticky("mesecons:wire_01000100_on")
mesecon.register_mvps_unsticky("mesecons:wire_01000100_off")
mesecon.register_mvps_unsticky("mesecons:wire_11000100_on")
mesecon.register_mvps_unsticky("mesecons:wire_11000100_off")
mesecon.register_mvps_unsticky("mesecons:wire_01100100_on")
mesecon.register_mvps_unsticky("mesecons:wire_01100100_off")
mesecon.register_mvps_unsticky("mesecons:wire_11100100_on")
mesecon.register_mvps_unsticky("mesecons:wire_11100100_off")
mesecon.register_mvps_unsticky("mesecons:wire_01010100_on")
mesecon.register_mvps_unsticky("mesecons:wire_01010100_off")
mesecon.register_mvps_unsticky("mesecons:wire_11010100_on")
mesecon.register_mvps_unsticky("mesecons:wire_11010100_off")
mesecon.register_mvps_unsticky("mesecons:wire_01110100_on")
mesecon.register_mvps_unsticky("mesecons:wire_01110100_off")
mesecon.register_mvps_unsticky("mesecons:wire_11110100_on")
mesecon.register_mvps_unsticky("mesecons:wire_11110100_off")
mesecon.register_mvps_unsticky("mesecons:wire_11001100_on")
mesecon.register_mvps_unsticky("mesecons:wire_11001100_off")
mesecon.register_mvps_unsticky("mesecons:wire_11101100_on")
mesecon.register_mvps_unsticky("mesecons:wire_11101100_off")
mesecon.register_mvps_unsticky("mesecons:wire_11011100_on")
mesecon.register_mvps_unsticky("mesecons:wire_11011100_off")
mesecon.register_mvps_unsticky("mesecons:wire_11111100_on")
mesecon.register_mvps_unsticky("mesecons:wire_11111100_off")
mesecon.register_mvps_unsticky("mesecons:wire_00100010_on")
mesecon.register_mvps_unsticky("mesecons:wire_00100010_off")
mesecon.register_mvps_unsticky("mesecons:wire_10100010_on")
mesecon.register_mvps_unsticky("mesecons:wire_10100010_off")
mesecon.register_mvps_unsticky("mesecons:wire_01100010_on")
mesecon.register_mvps_unsticky("mesecons:wire_01100010_off")
mesecon.register_mvps_unsticky("mesecons:wire_11100010_on")
mesecon.register_mvps_unsticky("mesecons:wire_11100010_off")
mesecon.register_mvps_unsticky("mesecons:wire_00110010_on")
mesecon.register_mvps_unsticky("mesecons:wire_00110010_off")
mesecon.register_mvps_unsticky("mesecons:wire_10110010_on")
mesecon.register_mvps_unsticky("mesecons:wire_10110010_off")
mesecon.register_mvps_unsticky("mesecons:wire_01110010_on")
mesecon.register_mvps_unsticky("mesecons:wire_01110010_off")
mesecon.register_mvps_unsticky("mesecons:wire_11110010_on")
mesecon.register_mvps_unsticky("mesecons:wire_11110010_off")
mesecon.register_mvps_unsticky("mesecons:wire_10101010_on")
mesecon.register_mvps_unsticky("mesecons:wire_10101010_off")
mesecon.register_mvps_unsticky("mesecons:wire_11101010_on")
mesecon.register_mvps_unsticky("mesecons:wire_11101010_off")
mesecon.register_mvps_unsticky("mesecons:wire_10111010_on")
mesecon.register_mvps_unsticky("mesecons:wire_10111010_off")
mesecon.register_mvps_unsticky("mesecons:wire_11111010_on")
mesecon.register_mvps_unsticky("mesecons:wire_11111010_off")
mesecon.register_mvps_unsticky("mesecons:wire_01100110_on")
mesecon.register_mvps_unsticky("mesecons:wire_01100110_off")
mesecon.register_mvps_unsticky("mesecons:wire_11100110_on")
mesecon.register_mvps_unsticky("mesecons:wire_11100110_off")
mesecon.register_mvps_unsticky("mesecons:wire_01110110_on")
mesecon.register_mvps_unsticky("mesecons:wire_01110110_off")
mesecon.register_mvps_unsticky("mesecons:wire_11110110_on")
mesecon.register_mvps_unsticky("mesecons:wire_11110110_off")
mesecon.register_mvps_unsticky("mesecons:wire_11101110_on")
mesecon.register_mvps_unsticky("mesecons:wire_11101110_off")
mesecon.register_mvps_unsticky("mesecons:wire_11111110_on")
mesecon.register_mvps_unsticky("mesecons:wire_11111110_off")
mesecon.register_mvps_unsticky("mesecons:wire_00010001_on")
mesecon.register_mvps_unsticky("mesecons:wire_00010001_off")
mesecon.register_mvps_unsticky("mesecons:wire_10010001_on")
mesecon.register_mvps_unsticky("mesecons:wire_10010001_off")
mesecon.register_mvps_unsticky("mesecons:wire_01010001_on")
mesecon.register_mvps_unsticky("mesecons:wire_01010001_off")
mesecon.register_mvps_unsticky("mesecons:wire_11010001_on")
mesecon.register_mvps_unsticky("mesecons:wire_11010001_off")
mesecon.register_mvps_unsticky("mesecons:wire_00110001_on")
mesecon.register_mvps_unsticky("mesecons:wire_00110001_off")
mesecon.register_mvps_unsticky("mesecons:wire_10110001_on")
mesecon.register_mvps_unsticky("mesecons:wire_10110001_off")
mesecon.register_mvps_unsticky("mesecons:wire_01110001_on")
mesecon.register_mvps_unsticky("mesecons:wire_01110001_off")
mesecon.register_mvps_unsticky("mesecons:wire_11110001_on")
mesecon.register_mvps_unsticky("mesecons:wire_11110001_off")
mesecon.register_mvps_unsticky("mesecons:wire_10011001_on")
mesecon.register_mvps_unsticky("mesecons:wire_10011001_off")
mesecon.register_mvps_unsticky("mesecons:wire_11011001_on")
mesecon.register_mvps_unsticky("mesecons:wire_11011001_off")
mesecon.register_mvps_unsticky("mesecons:wire_10111001_on")
mesecon.register_mvps_unsticky("mesecons:wire_10111001_off")
mesecon.register_mvps_unsticky("mesecons:wire_11111001_on")
mesecon.register_mvps_unsticky("mesecons:wire_11111001_off")
mesecon.register_mvps_unsticky("mesecons:wire_01010101_on")
mesecon.register_mvps_unsticky("mesecons:wire_01010101_off")
mesecon.register_mvps_unsticky("mesecons:wire_11010101_on")
mesecon.register_mvps_unsticky("mesecons:wire_11010101_off")
mesecon.register_mvps_unsticky("mesecons:wire_01110101_on")
mesecon.register_mvps_unsticky("mesecons:wire_01110101_off")
mesecon.register_mvps_unsticky("mesecons:wire_11110101_on")
mesecon.register_mvps_unsticky("mesecons:wire_11110101_off")
mesecon.register_mvps_unsticky("mesecons:wire_11011101_on")
mesecon.register_mvps_unsticky("mesecons:wire_11011101_off")
mesecon.register_mvps_unsticky("mesecons:wire_11111101_on")
mesecon.register_mvps_unsticky("mesecons:wire_11111101_off")
mesecon.register_mvps_unsticky("mesecons:wire_00110011_on")
mesecon.register_mvps_unsticky("mesecons:wire_00110011_off")
mesecon.register_mvps_unsticky("mesecons:wire_10110011_on")
mesecon.register_mvps_unsticky("mesecons:wire_10110011_off")
mesecon.register_mvps_unsticky("mesecons:wire_01110011_on")
mesecon.register_mvps_unsticky("mesecons:wire_01110011_off")
mesecon.register_mvps_unsticky("mesecons:wire_11110011_on")
mesecon.register_mvps_unsticky("mesecons:wire_11110011_off")
mesecon.register_mvps_unsticky("mesecons:wire_10111011_on")
mesecon.register_mvps_unsticky("mesecons:wire_10111011_off")
mesecon.register_mvps_unsticky("mesecons:wire_11111011_on")
mesecon.register_mvps_unsticky("mesecons:wire_11111011_off")
mesecon.register_mvps_unsticky("mesecons:wire_01110111_on")
mesecon.register_mvps_unsticky("mesecons:wire_01110111_off")
mesecon.register_mvps_unsticky("mesecons:wire_11110111_on")
mesecon.register_mvps_unsticky("mesecons:wire_11110111_off")
mesecon.register_mvps_unsticky("mesecons:wire_11111111_on")
mesecon.register_mvps_unsticky("mesecons:wire_11111111_off")
-- Redstone Repeater
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_off_1")
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_off_2")
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_off_3")
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_off_4")
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_on_1")
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_on_2")
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_on_3")
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_on_4")
-- Redstone Torch
mesecon.register_mvps_unsticky("mesecons_torch:torch_on")
mesecon.register_mvps_unsticky("mesecons_torch:torch_off")
mesecon.register_mvps_unsticky("mesecons_torch:torch_on_wall")
mesecon.register_mvps_unsticky("mesecons_torch:torch_off_wall")
-- Sea Pickle
mesecon.register_mvps_unsticky("mcl_ocean:sea_pickle_1_dead_brain_coral_block")
mesecon.register_mvps_unsticky("mcl_ocean:sea_pickle_2_dead_brain_coral_block")
mesecon.register_mvps_unsticky("mcl_ocean:sea_pickle_3_dead_brain_coral_block")
mesecon.register_mvps_unsticky("mcl_ocean:sea_pickle_4_dead_brain_coral_block")
-- Shulker chests
mesecon.register_mvps_unsticky("mcl_chests:black_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:blue_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:brown_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:cyan_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:dark_green_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:dark_grey_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:lightblue_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:green_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:orange_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:magenta_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:pink_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:violet_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:red_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:grey_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:white_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:yellow_shulker_box_small")
-- Snow
mesecon.register_mvps_unsticky("mcl_core:snow")
mesecon.register_mvps_unsticky("mcl_core:snow_2")
mesecon.register_mvps_unsticky("mcl_core:snow_3")
mesecon.register_mvps_unsticky("mcl_core:snow_4")
mesecon.register_mvps_unsticky("mcl_core:snow_5")
mesecon.register_mvps_unsticky("mcl_core:snow_6")
mesecon.register_mvps_unsticky("mcl_core:snow_7")
mesecon.register_mvps_unsticky("mcl_core:snow_8")
-- Torch
mesecon.register_mvps_unsticky("mcl_torches:torch")
mesecon.register_mvps_unsticky("mcl_torches:torch_wall")
-- Wheat
mesecon.register_mvps_unsticky("mcl_farming:wheat")
mesecon.register_mvps_unsticky("mcl_farming:wheat_2")
mesecon.register_mvps_unsticky("mcl_farming:wheat_3")
mesecon.register_mvps_unsticky("mcl_farming:wheat_4")
mesecon.register_mvps_unsticky("mcl_farming:wheat_5")
mesecon.register_mvps_unsticky("mcl_farming:wheat_6")
mesecon.register_mvps_unsticky("mcl_farming:wheat_7")
-- Includes node heat when moving them
mesecon.register_on_mvps_move(mesecon.move_hot_nodes)
mesecon.register_on_mvps_move(function(moved_nodes)
for i = 1, #moved_nodes do
local moved_node = moved_nodes[i]
minetest.after(0, function()
minetest.check_for_falling(moved_node.oldpos)
minetest.check_for_falling(moved_node.pos)
end)
-- Callback for on_mvps_move stored in nodedef
local node_def = minetest.registered_nodes[moved_node.node.name]
if node_def and node_def.mesecon and node_def.mesecon.on_mvps_move then
node_def.mesecon.on_mvps_move(moved_node.pos, moved_node.node,
moved_node.oldpos, moved_node.meta)
end
end
end)

View File

@ -1 +0,0 @@
name = mesecons_mvps

View File

@ -1,704 +0,0 @@
local S = minetest.get_translator(minetest.get_current_modname())
local PISTON_MAXIMUM_PUSH = 12
local function piston_facedir_direction(node)
return -minetest.facedir_to_dir(node.param2)
end
local function piston_get_direction(dir, node)
if type(dir) == "function" then
return dir(node)
else
return dir
end
end
-- Remove pusher of piston.
-- To be used when piston was destroyed or dug.
local function piston_remove_pusher(pos, oldnode)
local pistonspec = minetest.registered_nodes[oldnode.name].mesecons_piston
local dir = piston_get_direction(pistonspec.dir, oldnode)
local pusherpos = vector.add(pos, dir)
local pushername = minetest.get_node(pusherpos).name
if pushername == pistonspec.pusher then -- make sure there actually is a pusher
minetest.remove_node(pusherpos)
minetest.check_for_falling(pusherpos)
minetest.sound_play("piston_retract", {
pos = pos,
max_hear_distance = 31,
gain = 0.3,
}, true)
end
end
-- Remove base node of piston.
-- To be used when pusher was destroyed.
local function piston_remove_base(pos, oldnode)
local basenodename = minetest.registered_nodes[oldnode.name].corresponding_piston
local pistonspec = minetest.registered_nodes[basenodename].mesecons_piston
local dir = piston_get_direction(pistonspec.dir, oldnode)
local basepos = vector.subtract(pos, dir)
local basename = minetest.get_node(basepos).name
if basename == pistonspec.onname then -- make sure there actually is a base node
minetest.remove_node(basepos)
minetest.check_for_falling(basepos)
minetest.sound_play("piston_retract", {
pos = pos,
max_hear_distance = 31,
gain = 0.3,
}, true)
end
end
local function piston_on(pos, node)
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
local dir = piston_get_direction(pistonspec.dir, node)
local np = vector.add(pos, dir)
local meta = minetest.get_meta(pos)
local success, _, oldstack = mesecon.mvps_push(np, dir, PISTON_MAXIMUM_PUSH, meta:get_string("owner"), pos)
if success then
minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.onname})
minetest.set_node(np, {param2 = node.param2, name = pistonspec.pusher})
local below = minetest.get_node({x=np.x,y=np.y-1,z=np.z})
if below.name == "mcl_farming:soil" or below.name == "mcl_farming:soil_wet" then
minetest.set_node({x=np.x,y=np.y-1,z=np.z}, {name = "mcl_core:dirt"})
end
mesecon.mvps_move_objects(np, dir, oldstack)
minetest.sound_play("piston_extend", {
pos = pos,
max_hear_distance = 31,
gain = 0.3,
}, true)
end
end
local function piston_off(pos, node)
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.offname})
piston_remove_pusher (pos, node)
if not pistonspec.sticky then
return
end
local dir = piston_get_direction(pistonspec.dir, node)
local pullpos = vector.add(pos, vector.multiply(dir, 2))
local meta = minetest.get_meta(pos)
mesecon.mvps_pull_single(pullpos, vector.multiply(dir, -1), PISTON_MAXIMUM_PUSH, meta:get_string("owner"), pos)
end
local function piston_orientate(pos, placer)
-- not placed by player
if not placer then return end
-- placer pitch in degrees
local pitch = placer:get_look_vertical() * (180 / math.pi)
local node = minetest.get_node(pos)
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
if pitch > 55 then
minetest.add_node(pos, {name=pistonspec.piston_up})
elseif pitch < -55 then
minetest.add_node(pos, {name=pistonspec.piston_down})
end
-- set owner meta after setting node, or it will not keep
mesecon.mvps_set_owner(pos, placer)
end
-- Horizontal pistons
local pt = 4/16 -- pusher thickness
local piston_pusher_box = {
type = "fixed",
fixed = {
{-2/16, -2/16, -.5 + pt, 2/16, 2/16, .5 + pt},
{-.5 , -.5 , -.5 , .5 , .5 , -.5 + pt},
},
}
local piston_on_box = {
type = "fixed",
fixed = {
{-.5, -.5, -.5 + pt, .5, .5, .5}
},
}
-- Normal (non-sticky) ones:
local pistonspec_normal = {
offname = "mesecons_pistons:piston_normal_off",
onname = "mesecons_pistons:piston_normal_on",
dir = piston_facedir_direction,
pusher = "mesecons_pistons:piston_pusher_normal",
piston_down = "mesecons_pistons:piston_down_normal_off",
piston_up = "mesecons_pistons:piston_up_normal_off",
}
local usagehelp_piston = S("This block can have one of 6 possible orientations.")
local function powered_facing_dir(pos, dir)
return (dir.x ~= 1 and mcl_redstone.get_power(pos, vector.new(1, 0, 0)) ~= 0) or
(dir.x ~= -1 and mcl_redstone.get_power(pos, vector.new(-1, 0, 0)) ~= 0) or
(dir.y ~= 1 and mcl_redstone.get_power(pos, vector.new(0, 1, 0)) ~= 0) or
(dir.y ~= -1 and mcl_redstone.get_power(pos, vector.new(0, -1, 0)) ~= 0) or
(dir.z ~= 1 and mcl_redstone.get_power(pos, vector.new(0, 0, 1)) ~= 0) or
(dir.z ~= -1 and mcl_redstone.get_power(pos, vector.new(0, 0, -1)) ~= 0)
end
local commdef = {
_doc_items_create_entry = false,
groups = {handy=1, not_opaque=1},
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
minetest.set_node(pos, {name="mesecons_pistons:piston_up_normal_off"})
return true
end
end,
}
local normaldef = table.merge(commdef, {
description = S("Piston"),
groups = table.merge(commdef.groups, {piston=1}),
mesecons_piston = pistonspec_normal,
})
local offdef = {
_mcl_redstone = {
update = function(pos, node)
local dir = -minetest.facedir_to_dir(node.param2)
if powered_facing_dir(pos, dir) then
piston_on(pos, node)
end
end,
},
}
local ondef = {
drawtype = "nodebox",
node_box = piston_on_box,
selection_box = piston_on_box,
after_destruct = piston_remove_pusher,
on_rotate = false,
_mcl_redstone = {
update = function(pos, node)
local dir = -minetest.facedir_to_dir(node.param2)
if not powered_facing_dir(pos, dir) then
piston_off(pos, node)
end
end,
},
}
local pusherdef = {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
after_destruct = piston_remove_base,
diggable = false,
drop = "",
selection_box = piston_pusher_box,
node_box = piston_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 0.5,
on_rotate = false,
_mcl_redstone = {
-- It is possible for a piston to extend just before server
-- shutdown. To avoid circuits stopping because of that we
-- update all neighbouring nodes during loading as if a
-- redstone block was just removed at the pusher.
init = function(pos, node)
mcl_redstone._update_neighbours(pos, {
name = "mcl_redstone_torch:redstoneblock",
param2 = 0,
})
end,
},
}
-- offstate
minetest.register_node("mesecons_pistons:piston_normal_off", table.merge(normaldef, offdef, {
_doc_items_create_entry = true,
_tt_help = S("Pushes block when powered by redstone power"),
_doc_items_longdesc = S("A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however."),
_doc_items_usagehelp = usagehelp_piston,
tiles = {
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png^[transformR90",
"mesecons_piston_bottom.png^[transformR270",
"mesecons_piston_back.png",
"mesecons_piston_pusher_front.png"
},
after_place_node = piston_orientate,
}))
-- onstate
minetest.register_node("mesecons_pistons:piston_normal_on", table.merge(normaldef, ondef, {
tiles = {
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png^[transformR90",
"mesecons_piston_bottom.png^[transformR270",
"mesecons_piston_back.png",
"mesecons_piston_on_front.png"
},
groups = table.merge(normaldef.groups, {not_in_creative_inventory=1}),
drop = "mesecons_pistons:piston_normal_off",
}))
-- pusher
minetest.register_node("mesecons_pistons:piston_pusher_normal", table.merge(pusherdef, {
tiles = {
"mesecons_piston_pusher_top.png",
"mesecons_piston_pusher_bottom.png",
"mesecons_piston_pusher_left.png",
"mesecons_piston_pusher_right.png",
"mesecons_piston_pusher_back.png",
"mesecons_piston_pusher_front.png"
},
groups = {piston_pusher=1},
corresponding_piston = "mesecons_pistons:piston_normal_on",
}))
-- Sticky ones
local pistonspec_sticky = {
offname = "mesecons_pistons:piston_sticky_off",
onname = "mesecons_pistons:piston_sticky_on",
dir = piston_facedir_direction,
pusher = "mesecons_pistons:piston_pusher_sticky",
sticky = true,
piston_down = "mesecons_pistons:piston_down_sticky_off",
piston_up = "mesecons_pistons:piston_up_sticky_off",
}
local stickydef = table.merge(commdef, {
description = S("Sticky Piston"),
groups = table.merge(commdef.groups, {piston=2}),
mesecons_piston = pistonspec_sticky,
})
-- offstate
minetest.register_node("mesecons_pistons:piston_sticky_off", table.merge(stickydef, offdef, {
_doc_items_create_entry = true,
_tt_help = S("Pushes or pulls block when powered by redstone power"),
_doc_items_longdesc = S("A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled."),
_doc_items_usagehelp = usagehelp_piston,
tiles = {
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png^[transformR90",
"mesecons_piston_bottom.png^[transformR270",
"mesecons_piston_back.png",
"mesecons_piston_pusher_front_sticky.png"
},
after_place_node = piston_orientate,
}))
-- onstate
minetest.register_node("mesecons_pistons:piston_sticky_on", table.merge(stickydef, ondef, {
tiles = {
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png^[transformR90",
"mesecons_piston_bottom.png^[transformR270",
"mesecons_piston_back.png",
"mesecons_piston_on_front.png"
},
groups = table.merge(stickydef.groups, {not_in_creative_inventory=1}),
drop = "mesecons_pistons:piston_sticky_off",
}))
-- pusher
minetest.register_node("mesecons_pistons:piston_pusher_sticky", table.merge(pusherdef, {
tiles = {
"mesecons_piston_pusher_top.png",
"mesecons_piston_pusher_bottom.png",
"mesecons_piston_pusher_left.png",
"mesecons_piston_pusher_right.png",
"mesecons_piston_pusher_back.png",
"mesecons_piston_pusher_front_sticky.png"
},
groups = {piston_pusher=2},
corresponding_piston = "mesecons_pistons:piston_sticky_on",
}))
--
--
-- UP
--
--
local piston_up_pusher_box = {
type = "fixed",
fixed = {
{-2/16, -.5 - pt, -2/16, 2/16, .5 - pt, 2/16},
{-.5 , .5 - pt, -.5 , .5 , .5 , .5},
},
}
local piston_up_on_box = {
type = "fixed",
fixed = {
{-.5, -.5, -.5 , .5, .5-pt, .5}
},
}
-- Normal
local pistonspec_normal_up = {
offname = "mesecons_pistons:piston_up_normal_off",
onname = "mesecons_pistons:piston_up_normal_on",
dir = {x = 0, y = 1, z = 0},
pusher = "mesecons_pistons:piston_up_pusher_normal",
}
local offupdef = table.merge(offdef, {
sounds = mcl_sounds.node_sound_stone_defaults({
footstep = mcl_sounds.node_sound_wood_defaults().footstep
}),
_mcl_redstone = {
update = function(pos, node)
if powered_facing_dir(pos, vector.new(0, 1, 0)) then
piston_on(pos, node)
end
end,
},
})
local onupdef = table.merge(ondef, {
node_box = piston_up_on_box,
selection_box = piston_up_on_box,
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_redstone = {
update = function(pos, node)
if not powered_facing_dir(pos, vector.new(0, 1, 0)) then
piston_off(pos, node)
end
end,
},
})
local normalupdef = table.merge(normaldef, {
mesecons_piston = pistonspec_normal_up,
drop = "mesecons_pistons:piston_normal_off",
groups = table.merge(normaldef.groups, {not_in_creative_inventory=1}),
})
local pusherupdef = table.merge(pusherdef, {
selection_box = piston_up_pusher_box,
node_box = piston_up_pusher_box,
})
-- offstate
minetest.register_node("mesecons_pistons:piston_up_normal_off", table.merge(normalupdef, offupdef, {
tiles = {
"mesecons_piston_pusher_front.png",
"mesecons_piston_back.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
},
}))
-- onstate
minetest.register_node("mesecons_pistons:piston_up_normal_on", table.merge(normalupdef, onupdef, {
tiles = {
"mesecons_piston_on_front.png",
"mesecons_piston_back.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
},
}))
-- pusher
minetest.register_node("mesecons_pistons:piston_up_pusher_normal", table.merge(pusherupdef, {
tiles = {
"mesecons_piston_pusher_front.png",
"mesecons_piston_pusher_back.png",
"mesecons_piston_pusher_left.png^[transformR270",
"mesecons_piston_pusher_right.png^[transformR90",
"mesecons_piston_pusher_bottom.png",
"mesecons_piston_pusher_top.png^[transformR180",
},
groups = {piston_pusher=1},
is_ground_content = false,
corresponding_piston = "mesecons_pistons:piston_up_normal_on",
}))
-- Sticky
local pistonspec_sticky_up = {
offname = "mesecons_pistons:piston_up_sticky_off",
onname = "mesecons_pistons:piston_up_sticky_on",
dir = {x = 0, y = 1, z = 0},
pusher = "mesecons_pistons:piston_up_pusher_sticky",
sticky = true,
}
local stickyupdef = table.merge(stickydef, {
mesecons_piston = pistonspec_sticky_up,
drop = "mesecons_pistons:piston_sticky_off",
groups = table.merge(stickydef.groups, {not_in_creative_inventory=1}),
})
-- offstate
minetest.register_node("mesecons_pistons:piston_up_sticky_off", table.merge(stickyupdef, offupdef, {
tiles = {
"mesecons_piston_pusher_front_sticky.png",
"mesecons_piston_back.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
},
}))
-- onstate
minetest.register_node("mesecons_pistons:piston_up_sticky_on", table.merge(stickyupdef, onupdef, {
tiles = {
"mesecons_piston_on_front.png",
"mesecons_piston_back.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
"mesecons_piston_bottom.png",
},
}))
-- pusher
minetest.register_node("mesecons_pistons:piston_up_pusher_sticky", table.merge(pusherupdef, {
tiles = {
"mesecons_piston_pusher_front_sticky.png",
"mesecons_piston_pusher_back.png",
"mesecons_piston_pusher_left.png^[transformR270",
"mesecons_piston_pusher_right.png^[transformR90",
"mesecons_piston_pusher_bottom.png",
"mesecons_piston_pusher_top.png^[transformR180",
},
groups = {piston_pusher=2},
corresponding_piston = "mesecons_pistons:piston_up_sticky_on",
}))
--
--
-- DOWN
--
--
local piston_down_pusher_box = {
type = "fixed",
fixed = {
{-2/16, -.5 + pt, -2/16, 2/16, .5 + pt, 2/16},
{-.5 , -.5 , -.5 , .5 , -.5 + pt, .5},
},
}
local piston_down_on_box = {
type = "fixed",
fixed = {
{-.5, -.5+pt, -.5 , .5, .5, .5}
},
}
-- Normal
local pistonspec_normal_down = {
offname = "mesecons_pistons:piston_down_normal_off",
onname = "mesecons_pistons:piston_down_normal_on",
dir = {x = 0, y = -1, z = 0},
pusher = "mesecons_pistons:piston_down_pusher_normal",
}
local offdowndef = table.merge(offdef, {
_mcl_redstone = {
update = function(pos, node)
if powered_facing_dir(pos, vector.new(0, -1, 0)) then
piston_on(pos, node)
end
end,
},
})
local ondowndef = table.merge(ondef, {
node_box = piston_down_on_box,
selection_box = piston_down_on_box,
_mcl_redstone = {
update = function(pos, node)
if not powered_facing_dir(pos, vector.new(0, -1, 0)) then
piston_off(pos, node)
end
end,
},
})
local normaldowndef = table.merge(normalupdef, {
mesecons_piston = pistonspec_normal_down,
})
local pusherdowndef = table.merge(pusherupdef, {
selection_box = piston_down_pusher_box,
node_box = piston_down_pusher_box,
})
-- offstate
minetest.register_node("mesecons_pistons:piston_down_normal_off", table.merge(normaldowndef, offdowndef, {
tiles = {
"mesecons_piston_back.png",
"mesecons_piston_pusher_front.png",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
},
}))
-- onstate
minetest.register_node("mesecons_pistons:piston_down_normal_on", table.merge(normaldowndef, ondowndef, {
tiles = {
"mesecons_piston_back.png",
"mesecons_piston_on_front.png",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
},
}))
-- pusher
minetest.register_node("mesecons_pistons:piston_down_pusher_normal", table.merge(pusherdowndef, {
tiles = {
"mesecons_piston_pusher_back.png",
"mesecons_piston_pusher_front.png",
"mesecons_piston_pusher_left.png^[transformR90",
"mesecons_piston_pusher_right.png^[transformR270",
"mesecons_piston_pusher_bottom.png^[transformR180",
"mesecons_piston_pusher_top.png",
},
groups = {piston_pusher=1},
is_ground_content = false,
corresponding_piston = "mesecons_pistons:piston_down_normal_on",
}))
-- Sticky
local pistonspec_sticky_down = {
onname = "mesecons_pistons:piston_down_sticky_on",
offname = "mesecons_pistons:piston_down_sticky_off",
dir = {x = 0, y = -1, z = 0},
pusher = "mesecons_pistons:piston_down_pusher_sticky",
sticky = true,
}
local stickydowndef = table.merge(stickyupdef, {
mesecons_piston = pistonspec_sticky_down,
sounds = mcl_sounds.node_sound_stone_defaults(),
})
-- offstate
minetest.register_node("mesecons_pistons:piston_down_sticky_off", table.merge(stickydowndef, offdowndef, {
tiles = {
"mesecons_piston_back.png",
"mesecons_piston_pusher_front_sticky.png",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
},
}))
-- onstate
minetest.register_node("mesecons_pistons:piston_down_sticky_on", table.merge(stickydowndef, ondowndef, {
tiles = {
"mesecons_piston_back.png",
"mesecons_piston_on_front.png",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
"mesecons_piston_bottom.png^[transformR180",
},
}))
-- pusher
minetest.register_node("mesecons_pistons:piston_down_pusher_sticky", table.merge(pusherdowndef, {
tiles = {
"mesecons_piston_pusher_back.png",
"mesecons_piston_pusher_front_sticky.png",
"mesecons_piston_pusher_left.png^[transformR90",
"mesecons_piston_pusher_right.png^[transformR270",
"mesecons_piston_pusher_bottom.png^[transformR180",
"mesecons_piston_pusher_top.png",
},
groups = {piston_pusher=2},
corresponding_piston = "mesecons_pistons:piston_down_sticky_on",
}))
mesecon.register_mvps_stopper("mesecons_pistons:piston_pusher_normal")
mesecon.register_mvps_stopper("mesecons_pistons:piston_pusher_sticky")
mesecon.register_mvps_stopper("mesecons_pistons:piston_up_pusher_normal")
mesecon.register_mvps_stopper("mesecons_pistons:piston_up_pusher_sticky")
mesecon.register_mvps_stopper("mesecons_pistons:piston_down_pusher_normal")
mesecon.register_mvps_stopper("mesecons_pistons:piston_down_pusher_sticky")
mesecon.register_mvps_stopper("mesecons_pistons:piston_normal_on")
mesecon.register_mvps_stopper("mesecons_pistons:piston_sticky_on")
mesecon.register_mvps_stopper("mesecons_pistons:piston_up_normal_on")
mesecon.register_mvps_stopper("mesecons_pistons:piston_up_sticky_on")
mesecon.register_mvps_stopper("mesecons_pistons:piston_down_normal_on")
mesecon.register_mvps_stopper("mesecons_pistons:piston_down_sticky_on")
--craft recipes
minetest.register_craft({
output = "mesecons_pistons:piston_normal_off",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"mcl_core:cobble", "mcl_core:iron_ingot", "mcl_core:cobble"},
{"mcl_core:cobble", "mcl_redstone:redstone", "mcl_core:cobble"},
},
})
minetest.register_craft({
output = "mesecons_pistons:piston_sticky_off",
recipe = {
{"mcl_mobitems:slimeball"},
{"mesecons_pistons:piston_normal_off"},
},
})
-- Add entry aliases for the Help
doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_normal_on")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_up_normal_off")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_up_normal_on")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_down_normal_off")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_down_normal_on")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_pusher_normal")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_up_pusher_normal")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_down_pusher_normal")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_sticky_on")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_up_sticky_off")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_up_sticky_on")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_down_sticky_off")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_down_sticky_on")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_pusher_sticky")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_up_pusher_sticky")
doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_down_pusher_sticky")

View File

@ -1,3 +0,0 @@
name = mesecons_pistons
depends = mesecons_mvps, mcl_mobitems
optional_depends = doc, screwdriver

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B