Skip to content

Commit

Permalink
Switch to colored itemstacks (#5)
Browse files Browse the repository at this point in the history
with full crafting recipes
Requires Unified Dyes commit 2a816534 or later
  • Loading branch information
VanessaE authored and SmallJoker committed Aug 26, 2018
1 parent 49ded63 commit c227ceb
Showing 1 changed file with 57 additions and 21 deletions.
78 changes: 57 additions & 21 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,16 @@ minetest.register_node("unifiedbricks:brickblock", {
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
is_ground_content = true,
groups = {cracky=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:brick"
})

minetest.override_item("default:brick", {
ud_replacement_node = "unifiedbricks:brickblock",
palette = "unifieddyes_palette_extended.png",
airbrush_replacement_node = "unifiedbricks:brickblock",
groups = {cracky = 3, ud_param2_colorable = 1},
after_place_node = unifieddyes.recolor_on_place
})

minetest.register_node("unifiedbricks:clayblock", {
Expand All @@ -127,23 +122,18 @@ minetest.register_node("unifiedbricks:clayblock", {
},
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
is_ground_content = true,
groups = {crumbly=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_dirt_defaults({
footstep = "",
}),
on_construct = unifieddyes.on_construct,
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:clay"
})

minetest.override_item("default:clay", {
ud_replacement_node = "unifiedbricks:clayblock",
palette = "unifieddyes_palette_extended.png",
airbrush_replacement_node = "unifiedbricks:clayblock",
groups = {crumbly = 3, ud_param2_colorable = 1},
after_place_node = unifieddyes.recolor_on_place,
})

minetest.register_node("unifiedbricks:brickblock_multicolor_dark", {
Expand All @@ -157,13 +147,10 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_dark", {
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
})

minetest.register_node("unifiedbricks:brickblock_multicolor_medium", {
Expand All @@ -177,13 +164,10 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_medium", {
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
})

minetest.register_node("unifiedbricks:brickblock_multicolor_light", {
Expand All @@ -197,13 +181,10 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_light", {
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
})

minetest.register_craft( {
Expand Down Expand Up @@ -239,6 +220,61 @@ minetest.register_craft( {
},
})

unifieddyes.register_color_craft({
output = "unifiedbricks:brickblock",
palette = "extended",
neutral_node = "default:brick",
type = "shapeless",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})

unifieddyes.register_color_craft({
output = "unifiedbricks:clayblock",
palette = "extended",
neutral_node = "default:clay",
type = "shapeless",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})

unifieddyes.register_color_craft({
output = "unifiedbricks:brickblock_multicolor_dark",
palette = "extended",
neutral_node = "unifiedbricks:brickblock_multicolor_dark",
type = "shapeless",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})

unifieddyes.register_color_craft({
output = "unifiedbricks:brickblock_multicolor_medium",
palette = "extended",
neutral_node = "unifiedbricks:brickblock_multicolor_medium",
type = "shapeless",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})

unifieddyes.register_color_craft({
output = "unifiedbricks:brickblock_multicolor_light",
palette = "extended",
neutral_node = "unifiedbricks:brickblock_multicolor_light",
type = "shapeless",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})

-- static nodes

unifiedbricks.register_old_static_block = function(name, formalname, blocktype)
Expand Down

0 comments on commit c227ceb

Please sign in to comment.