Compare commits

..

30 Commits

Author SHA1 Message Date
a658381feb Merge branch 'github' 2021-03-24 20:01:56 +01:00
cbbc225c1f Merge remote-tracking branch 'upstream/master' 2021-03-24 20:00:48 +01:00
7b1423e8cd Fix deprecated use of use_texture_alpha for Minetest 5.4+ 2021-03-03 23:08:40 +01:00
Joaquin Villalba
69330d88bc Revert "Create LICENSE"
This reverts commit 47a5202d82.
2021-01-28 19:11:11 -03:00
Joaquin Villalba
47a5202d82
Create LICENSE
License for code
2021-01-28 19:07:03 -03:00
Joaquin Villalba
8b6c5f0cad
Updated Glass of Water to actually be transparent
Added `use_texture_alpha = true` to the definition of claycrafter:glass_of_water
2021-01-02 23:16:21 -03:00
Joaquin Villalba
8e33df0067
Update README.md 2020-12-23 14:20:54 -03:00
Joaquin Villalba
83457a1f4a
Update README.md 2020-12-22 11:29:22 -03:00
Joaquin Villalba
b56b79f8e1
Update README.md 2020-12-22 11:28:50 -03:00
Joaquin Villalba
d056566409
Update README.md 2020-12-22 11:28:17 -03:00
Joaquin Villalba
2ab701933d
Moreblocks compatibility
Merged recipes.lua into items.lua
Added support for moreblocks' compressed dirt
2020-12-22 11:26:30 -03:00
Joaquin Villalba
86c0626956
Delete recipes.lua
Contents of recipes.lua is now in items.lua
2020-12-22 11:22:39 -03:00
Joaquin Villalba
5c36225853
Update README.md 2020-11-14 17:04:02 -03:00
Joaquin Villalba
54fc2110eb
Update README.md 2020-11-14 16:58:30 -03:00
Joaquin Villalba
367fbc6f4a
Update README.md 2020-11-14 16:19:44 -03:00
fc9daaa401 Merge remote-tracking branch 'upstream/master' 2020-11-14 08:57:05 +01:00
Joaquin Villalba
34575ded4d
Updated licences 2020-11-13 02:18:00 -03:00
Joaquin Villalba
902f3c0e4c
Updated licences... 2020-11-13 02:17:32 -03:00
Joaquin Villalba
211c3f4b68
Delete description.txt 2020-11-13 01:37:23 -03:00
Joaquin Villalba
26d8e9dd24
Delete depends.txt 2020-11-13 01:37:13 -03:00
Joaquin Villalba
b49f0ad425
Update mod.conf 2020-11-13 01:36:55 -03:00
Joaquin Villalba
204a25d060
Merge pull request #12 from Dragonop/Dragonop-#9
Fix bug where claycrafter won't turn off. Fixes issue #9
2020-11-13 01:32:24 -03:00
Joaquin Villalba
4a8a178800
Fix bug where claycrafter won't turn off
Fixed a bug where the Claycrafter would remain in its active state even if the output inv was full. This didn't waste or create any resources (only light and kept the block animated), it was purely cosmetic. Fixes issue #9, I guess.
2020-11-13 01:30:44 -03:00
Joaquin Villalba
fea2299053
Update description.txt 2020-11-13 01:15:53 -03:00
Joaquin Villalba
0502b438a8
Updated screenshot.png
Updated to better depict the current state of the claycrafter mod.
2020-11-13 01:07:33 -03:00
Joaquin Villalba
64aae49bbd
Glass of water now placeable - nerfed convert time
Glass of Water is now a placeable node. Can now be used to empty it out, returning an Empty Drinking Glass.
Don't recomend changing the item_eat value to any other than 0, if you don't want free food.
2020-11-13 00:53:54 -03:00
Joaquin Villalba
fc192685b0
Added glass_of_water_inv
Added inventory image for glass of water (since it's now placeable)
2020-11-13 00:25:17 -03:00
Joaquin Villalba
2b2a893960
Updated glass of water texture
Updated glass of water texture to fit the new drinking glass from the vessels mod
2020-11-12 23:55:15 -03:00
Joaquin Villalba
75b30587e0
Updated infotext
Changed itemstate "In use" to "Yes"
2020-11-12 23:47:03 -03:00
Joaquin Villalba
1626a812fa
Add reversible craft for compressed dirt
1 compressed dirt can now be used to get back 9 dirt
2020-11-12 22:36:56 -03:00
11 changed files with 86 additions and 73 deletions

View File

@ -1,33 +1,31 @@
# claycrafter # claycrafter
Minetest clay crafter mod. Adds a way to craft clay out of compressed dirt. Minetest clay crafter mod.
Adds a way for players to obtain clay other than mining, out of a common material: dirt. It adds three new nodes:
Dependencies: **Claycrafter:** Used to convert compressed dirt into clay.
**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.
For extra info look at the [Forum Thread](https://forum.minetest.net/viewtopic.php?f=11&t=13992)
##### Dependencies:
Default Default
Vessels Vessels
Bucket
moreblocks (optional)
claycrafter.lua is derivated from furnace.lua (minetest_game) by PilzAdam and Amaz1. ##### Optional dependencies:
Edited by everamzah to work for this mod. moreblocks
#####License for Code ##### License for Code
Dragonop (LGPLv3)
Copyright (C) 2016 Dragonop <joaco-mono@hotmail.com> ##### License for Media
Textures created or modified 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)
This program is free software; you can redistribute it and/or modify ##### Special thanks to everamzah
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#####License for Textures, Models and Sounds
CC-BY-SA 3.0 UNPORTED. Created by Dragonop

View File

@ -233,7 +233,7 @@ minetest.register_abm({
end end
else else
-- Furnace ran out of fuel -- Furnace ran out of fuel
if cookable then if cookable and inv:room_for_item("dst", ItemStack({name = "default:clay", count = 4})) then
-- We need to get new fuel -- We need to get new fuel
local fueltime = minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "h2o") local fueltime = minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "h2o")
@ -244,16 +244,13 @@ minetest.register_abm({
src_time = 0 src_time = 0
else else
-- Take fuel from fuel list -- Take fuel from fuel list
if inv:room_for_item("vessels", ItemStack({name = "vessels:drinking_glass"}))
if inv:room_for_item("dst", ItemStack({name = "default:clay", count = 4}))
and inv:room_for_item("vessels", ItemStack({name = "vessels:drinking_glass"}))
then then
inv:remove_item("fuel", inv:get_stack("fuel", 1):get_name()) inv:remove_item("fuel", inv:get_stack("fuel", 1):get_name())
inv:add_item("vessels", {name = "vessels:drinking_glass"}) inv:add_item("vessels", {name = "vessels:drinking_glass"})
else else
swap_node(pos, "claycrafter:claycrafter_active") swap_node(pos, "claycrafter:claycrafter_active")
end end
fuel_totaltime = fueltime fuel_totaltime = fueltime
fuel_time = 0 fuel_time = 0
@ -274,7 +271,7 @@ minetest.register_abm({
local item_percent = 0 local item_percent = 0
if cookable then if cookable then
item_percent = math.floor(src_time / cooktime * 100) item_percent = math.floor(src_time / cooktime * 100)
item_state = "In use" item_state = "Yes"
else else
if srclist[1]:is_empty() then if srclist[1]:is_empty() then
item_state = "Empty" item_state = "Empty"

View File

@ -1,4 +0,0 @@
vessels
default
bucket
moreblocks?

View File

@ -1 +0,0 @@
Craft clay out of compressed dirt.

View File

@ -3,7 +3,6 @@ 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.") minetest.log("action", "[claycrafter] loaded.")

View File

@ -1,15 +1,66 @@
if minetest.get_modpath("moreblocks") then --compressed dirt
minetest.register_alias("claycrafter:compressed_dirt", "moreblocks:dirt_compressed") local moreblocks = minetest.get_modpath("moreblocks")
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
minetest.register_craftitem("claycrafter:glass_of_water", { --nodes
description = "Glass of Water", minetest.register_node("claycrafter:glass_of_water", {
inventory_image = "claycrafter_glass_of_water.png", description = ("Glass of Water"),
groups = {h2o = 1, vessel = 1}, -- How much time to convert 1 compressed dirt to 4 clay drawtype = "plantlike",
tiles = {"claycrafter_glass_of_water.png"},
inventory_image = "claycrafter_glass_of_water_inv.png",
wield_image = "claycrafter_glass_of_water.png",
paramtype = "light",
use_texture_alpha = "blend",
is_ground_content = false,
walkable = false,
sunlight_propagates = true,
selection_box = {type = "fixed",fixed = {-0.25, -0.5, -0.25, 0.25, 0, 0.25} },
groups = {vessel = 1, dig_immediate = 3, attached_node = 1, h2o = 3}, -- How much time to convert 1 compressed dirt to 4 clay
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"}
}
}) })

View File

@ -1 +1,5 @@
name = claycrafter name = claycrafter
description = This mod introduces the Claycrafter, which converts Compressed Dirt to Clay using Glasses of Water.
depends = vessels, default
optional_depends = moreblocks
author = Dragonop

View File

@ -1,31 +0,0 @@
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 = "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"}
}
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B