mirror of
https://github.com/Dragonop/claycrafter.git
synced 2024-11-22 07:13:51 +01:00
Moreblocks compatibility
Merged recipes.lua into items.lua Added support for moreblocks' compressed dirt
This commit is contained in:
parent
86c0626956
commit
2ab701933d
@ -203,9 +203,17 @@ minetest.register_abm({
|
||||
|
||||
local cooktime = minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "h2o")
|
||||
local cookable = true
|
||||
|
||||
|
||||
if minetest.get_modpath("moreblocks") ~= nil then
|
||||
if inv:get_stack("src", 1):get_name() ~= "moreblocks:dirt_compressed" then
|
||||
cookable = false
|
||||
end
|
||||
else
|
||||
if inv:get_stack("src", 1):get_name() ~= "claycrafter:compressed_dirt" then
|
||||
cookable = false
|
||||
end
|
||||
end
|
||||
|
||||
-- Check if we have enough fuel to burn
|
||||
if fuel_time < fuel_totaltime then
|
||||
|
1
init.lua
1
init.lua
@ -3,5 +3,4 @@ local modpath = minetest.get_modpath("claycrafter")
|
||||
-- TODO: Investigate function to automatically get mod name.
|
||||
|
||||
dofile(modpath .. "/items.lua")
|
||||
dofile(modpath .. "/recipes.lua")
|
||||
dofile(modpath .. "/claycrafter.lua")
|
||||
|
50
items.lua
50
items.lua
@ -1,9 +1,31 @@
|
||||
minetest.register_node("claycrafter:compressed_dirt", {
|
||||
--compressed dirt
|
||||
local moreblocks = minetest.get_modpath("moreblocks")
|
||||
|
||||
if moreblocks ~= nil then
|
||||
minetest.register_alias("claycrafter:compressed_dirt","moreblocks:dirt_compressed")
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = "claycrafter:compressed_dirt",
|
||||
recipe = {
|
||||
{"default:dirt", "default:dirt", "default:dirt"},
|
||||
{"default:dirt", "default:dirt", "default:dirt"},
|
||||
{"default:dirt", "default:dirt", "default:dirt"}
|
||||
}
|
||||
})
|
||||
minetest.register_node("claycrafter:compressed_dirt", {
|
||||
description = "Compressed Dirt",
|
||||
tiles = {"claycrafter_compressed_dirt.png"},
|
||||
groups = {crumbly = 1, oddly_breakable_by_hand = 1, soil = 1, cracky =1}
|
||||
})
|
||||
groups = {crumbly = 1, oddly_breakable_by_hand = 1, soil = 1, cracky =1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "default:dirt 9",
|
||||
recipe = {{"claycrafter:compressed_dirt"}}
|
||||
})
|
||||
minetest.register_alias("moreblocks:dirt_compressed","claycrafter:compressed_dirt")
|
||||
end
|
||||
|
||||
--nodes
|
||||
minetest.register_node("claycrafter:glass_of_water", {
|
||||
description = ("Glass of Water"),
|
||||
drawtype = "plantlike",
|
||||
@ -19,3 +41,25 @@ minetest.register_node("claycrafter:glass_of_water", {
|
||||
on_use = minetest.item_eat(0,"vessels:drinking_glass"),
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
--recipes
|
||||
minetest.register_craft({
|
||||
output = "claycrafter:glass_of_water 8",
|
||||
recipe = {
|
||||
{"vessels:drinking_glass", "vessels:drinking_glass", "vessels:drinking_glass"},
|
||||
{"vessels:drinking_glass", "bucket:bucket_water", "vessels:drinking_glass"},
|
||||
{"vessels:drinking_glass", "vessels:drinking_glass", "vessels:drinking_glass"}
|
||||
},
|
||||
replacements = {
|
||||
{"bucket:bucket_water", "bucket:bucket_empty"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "claycrafter:claycrafter",
|
||||
recipe = {
|
||||
{"group:wood", "default:steel_ingot", "group:wood"},
|
||||
{"group:wood", "default:glass", "group:wood"},
|
||||
{"default:stick", "bucket:bucket_water", "default:stick"}
|
||||
}
|
||||
})
|
||||
|
3
mod.conf
3
mod.conf
@ -1,4 +1,5 @@
|
||||
name = claycrafter
|
||||
description = This mod introduces the Claycrafter, which converts Compressed Dirt to Clay using Glasses of Water.
|
||||
depends = vessels, default, bucket
|
||||
depends = vessels, default
|
||||
optional_depends = moreblocks
|
||||
author = Dragonop
|
||||
|
Loading…
Reference in New Issue
Block a user