techage_modpack/techage/items/cement.lua

64 lines
1.7 KiB
Lua
Raw Normal View History

2020-06-29 20:25:08 +03:00
--[[
TechAge
=======
Copyright (C) 2020 Joachim Stolberg
2020-10-25 23:32:47 +03:00
AGPL v3
2020-06-29 20:25:08 +03:00
See LICENSE.txt for more information
2022-01-04 21:43:30 +03:00
2020-06-29 20:25:08 +03:00
Cement as ingredient and alternative recipe for basic_materials:wet_cement
Cement is cooked and grinded clay
2022-01-04 21:43:30 +03:00
2020-06-29 20:25:08 +03:00
]]--
local S = techage.S
2021-05-14 19:50:16 +03:00
if not minetest.get_modpath("bakedclay") then
2020-06-29 20:25:08 +03:00
minetest.register_node("techage:cement_block", {
description = S("Cement Block"),
tiles = {"default_clay.png^[colorize:#FFFFFF:160"},
is_ground_content = false,
groups = {cracky = 2, stone = 1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
2022-01-04 21:43:30 +03:00
type = "cooking",
2020-06-29 20:25:08 +03:00
output = "techage:cement_block",
recipe = "default:clay",
})
techage.add_grinder_recipe({input="techage:cement_block", output="techage:cement_powder"})
else
2022-01-04 21:43:30 +03:00
-- The block should not exist when the mod baked clay is loaded.
2021-05-14 19:50:16 +03:00
-- But this block was active due to an error and can therefore no longer be deleted.
minetest.register_node("techage:cement_block", {
description = S("Cement Block"),
tiles = {"default_clay.png^[colorize:#FFFFFF:160"},
is_ground_content = false,
groups = {cracky = 2, stone = 1},
sounds = default.node_sound_stone_defaults(),
})
2022-01-04 21:43:30 +03:00
2021-05-14 19:50:16 +03:00
techage.add_grinder_recipe({input="techage:cement_block", output="techage:cement_powder"})
2020-06-29 20:25:08 +03:00
techage.add_grinder_recipe({input="bakedclay:white", output="techage:cement_powder"})
end
minetest.register_craftitem("techage:cement_powder", {
description = S("Cement Powder"),
inventory_image = "techage_powder_inv.png^[colorize:#FFFFFF:240",
groups = {powder = 1},
})
minetest.register_craft({
output = "basic_materials:wet_cement 3",
recipe = {
{"bucket:bucket_water", "techage:cement_powder"},
{"group:sand", "default:gravel"},
2020-07-02 22:30:02 +03:00
},
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}},
2020-06-29 20:25:08 +03:00
})