From 271f59bbac660bccca676f561dbeab898e30ae11 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 22 Aug 2018 01:17:52 -0400 Subject: switch to colored itemstacks with full crafting recipes (requires Unified Dyes commit 2a816534 or later --- init.lua | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index c8a1672..5a94b35 100644 --- a/init.lua +++ b/init.lua @@ -6,10 +6,7 @@ minetest.register_node("plasticbox:plasticbox", { sounds = default.node_sound_stone_defaults(), paramtype2 = "color", palette = "unifieddyes_palette_extended.png", - after_dig_node = unifieddyes.after_dig_node, - place_param2 = 240, on_construct = unifieddyes.on_construct, - after_place_node = unifieddyes.recolor_on_place, }) if minetest.global_exists("stairsplus") then @@ -30,6 +27,29 @@ minetest.register_craft( { }, }) +unifieddyes.register_color_craft({ + output = "plasticbox:plasticbox 4", + palette = "extended", + neutral_node = "homedecor:plastic_sheeting", + recipe = { + { "NEUTRAL_NODE", "NEUTRAL_NODE", "NEUTRAL_NODE" }, + { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" }, + { "NEUTRAL_NODE", "NEUTRAL_NODE", "NEUTRAL_NODE" }, + + } +}) + +unifieddyes.register_color_craft({ + output = "plasticbox:plasticbox", + palette = "extended", + type = "shapeless", + neutral_node = "plasticbox:plasticbox", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + minetest.register_lbm({ name = "plasticbox:convert_colors", label = "Convert plastic boxes to use param2 color", -- cgit v1.2.3