mirror of
https://github.com/Dragonop/claycrafter.git
synced 2025-07-14 09:20:14 +02:00
Compare commits
4 Commits
1.1
...
fc9daaa401
Author | SHA1 | Date | |
---|---|---|---|
fc9daaa401 | |||
1a64404611 | |||
f62ad8ef38 | |||
feb2efb6bc |
31
README.md
31
README.md
@ -1,32 +1,19 @@
|
|||||||
# claycrafter
|
# claycrafter
|
||||||
Minetest clay crafter mod.
|
Minetest clay crafter mod. Adds a way to craft clay out of compressed dirt.
|
||||||
Adds a way for players to obtain clay other than mining, out of a common material: dirt. It adds three new nodes:
|
|
||||||
|
|
||||||
Claycrafter: Used to convert compressed dirt into clay.
|
Dependencies:
|
||||||
|
|
||||||
Compressed dirt: Just 9 dirt, compressed, useful for saving storage space, too! (Not present if moreblocks is installed, use moreblocks:dirt_compressed instead)
|
|
||||||
|
|
||||||
Glass of water: Used as fuel for the Claycrafter. Placeable.
|
|
||||||
|
|
||||||
##### Dependencies:
|
|
||||||
Default
|
Default
|
||||||
Vessels
|
Vessels
|
||||||
|
Bucket
|
||||||
|
moreblocks (optional)
|
||||||
|
|
||||||
##### Optional dependencies:
|
claycrafter.lua is derivated from furnace.lua (minetest_game) by PilzAdam and Amaz1.
|
||||||
moreblocks
|
Edited by everamzah to work for this mod.
|
||||||
|
|
||||||
Special thanks to everamzah
|
#####License for Code
|
||||||
|
|
||||||
##### License for Code
|
|
||||||
|
|
||||||
Dragonop (LGPLv3)
|
Dragonop (LGPLv3)
|
||||||
|
|
||||||
##### License for Media
|
#####License for Media
|
||||||
|
|
||||||
Textures created or modified by Dragonop (CC-BY-SA 4.0)
|
Textures by Dragonop (CC-BY-SA 4.0)
|
||||||
|
|
||||||
Glass of water derived from the Drinking Glass texture from the vessels mod made by Thomas-S which is distributed as (CC-BY-SA 3.0)
|
|
||||||
|
|
||||||
Compressed dirt derived from the minetest's game default dirt texture made by Neuromancer and later modified by random-geek which is distributed as (CC-BY-SA 3.0)
|
|
||||||
|
|
||||||
Arrow textures by Blockmen, from minetest game's default, distributed under (CC-BY-SA 3.0)
|
|
||||||
|
@ -200,20 +200,15 @@ minetest.register_abm({
|
|||||||
--
|
--
|
||||||
-- Cooking
|
-- Cooking
|
||||||
--
|
--
|
||||||
|
local compressed_dirt = "claycrafter:compressed_dirt"
|
||||||
|
if minetest.get_modpath("moreblocks") then
|
||||||
|
compressed_dirt = "moreblocks:dirt_compressed"
|
||||||
|
end
|
||||||
local cooktime = minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "h2o")
|
local cooktime = minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "h2o")
|
||||||
local cookable = true
|
local cookable = true
|
||||||
|
if inv:get_stack("src", 1):get_name() ~= compressed_dirt then
|
||||||
|
|
||||||
if minetest.get_modpath("moreblocks") ~= nil then
|
|
||||||
if inv:get_stack("src", 1):get_name() ~= "moreblocks:dirt_compressed" then
|
|
||||||
cookable = false
|
cookable = false
|
||||||
end
|
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
|
-- Check if we have enough fuel to burn
|
||||||
if fuel_time < fuel_totaltime then
|
if fuel_time < fuel_totaltime then
|
||||||
|
3
init.lua
3
init.lua
@ -3,4 +3,7 @@ local modpath = minetest.get_modpath("claycrafter")
|
|||||||
-- TODO: Investigate function to automatically get mod name.
|
-- TODO: Investigate function to automatically get mod name.
|
||||||
|
|
||||||
dofile(modpath .. "/items.lua")
|
dofile(modpath .. "/items.lua")
|
||||||
|
dofile(modpath .. "/recipes.lua")
|
||||||
dofile(modpath .. "/claycrafter.lua")
|
dofile(modpath .. "/claycrafter.lua")
|
||||||
|
|
||||||
|
minetest.log("action", "[claycrafter] loaded.")
|
||||||
|
46
items.lua
46
items.lua
@ -1,31 +1,13 @@
|
|||||||
--compressed dirt
|
if minetest.get_modpath("moreblocks") then
|
||||||
local moreblocks = minetest.get_modpath("moreblocks")
|
minetest.register_alias("claycrafter:compressed_dirt", "moreblocks:dirt_compressed")
|
||||||
|
|
||||||
if moreblocks ~= nil then
|
|
||||||
minetest.register_alias("claycrafter:compressed_dirt","moreblocks:dirt_compressed")
|
|
||||||
else
|
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", {
|
minetest.register_node("claycrafter:compressed_dirt", {
|
||||||
description = "Compressed Dirt",
|
description = "Compressed Dirt",
|
||||||
tiles = {"claycrafter_compressed_dirt.png"},
|
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
|
end
|
||||||
|
|
||||||
--nodes
|
|
||||||
minetest.register_node("claycrafter:glass_of_water", {
|
minetest.register_node("claycrafter:glass_of_water", {
|
||||||
description = ("Glass of Water"),
|
description = ("Glass of Water"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
@ -41,25 +23,3 @@ minetest.register_node("claycrafter:glass_of_water", {
|
|||||||
on_use = minetest.item_eat(0,"vessels:drinking_glass"),
|
on_use = minetest.item_eat(0,"vessels:drinking_glass"),
|
||||||
sounds = default.node_sound_glass_defaults(),
|
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"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
2
mod.conf
2
mod.conf
@ -1,5 +1,5 @@
|
|||||||
name = claycrafter
|
name = claycrafter
|
||||||
description = This mod introduces the Claycrafter, which converts Compressed Dirt to Clay using Glasses of Water.
|
description = This mod introduces the Claycrafter, which converts Compressed Dirt to Clay using Glasses of Water.
|
||||||
depends = vessels, default
|
depends = vessels, default, bucket
|
||||||
optional_depends = moreblocks
|
optional_depends = moreblocks
|
||||||
author = Dragonop
|
author = Dragonop
|
||||||
|
36
recipes.lua
Normal file
36
recipes.lua
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
if not minetest.get_modpath("moreblocks") then
|
||||||
|
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"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "default:dirt 9",
|
||||||
|
recipe = {{"claycrafter:compressed_dirt"}}
|
||||||
|
})
|
||||||
|
|
||||||
|
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"}
|
||||||
|
}
|
||||||
|
})
|
Reference in New Issue
Block a user