Fix sugarcane spawning and make crops take longer to grow

This commit is contained in:
IamPyu 2024-10-29 15:48:08 -06:00
parent e0e4caaa1c
commit bbe407059c
4 changed files with 19 additions and 6 deletions

View File

@ -20,6 +20,7 @@
- Added various small overworld features
- Added Weak Ice
- Adjusted mining speeds of various tools
- Crops now take much longer to grow instead of just a couple seconds
- A lot of other changes that I forgot to document
## [Oct 19th 2024] Bugfix Update

View File

@ -247,8 +247,16 @@ minetest.register_craft({
minetest.register_craft({
output = "pyutest_blocks:tnt 4",
recipe = {
{"pyutest_blocks:sand_block", "pyutest_blocks:gunpowder"},
{"pyutest_blocks:gunpowder", "pyutest_blocks:sand_block"}
{"pyutest_blocks:sand_block", "pyutest_tools:gunpowder"},
{"pyutest_tools:gunpowder", "pyutest_blocks:sand_block"}
}
})
minetest.register_craft({
output = "pyutest_blocks:tnt 4",
recipe = {
{"pyutest_tools:gunpowder", "pyutest_blocks:sand_block"},
{"pyutest_blocks:sand_block", "pyutest_tools:gunpowder"}
}
})

View File

@ -2,19 +2,23 @@ local modpath = minetest.get_modpath(minetest.get_current_modname())
dofile(modpath .. "/api.lua")
PyuTest.make_crop("pyutest_farming:wheat", "Wheat", "pyutest_tools:wheat 2", 65, nil, {
local function to_minutes(x)
return x * 60
end
PyuTest.make_crop("pyutest_farming:wheat", "Wheat", "pyutest_tools:wheat 2", to_minutes(4), 0.5, {
crop_color = "#eed89a",
grown_color = "#eed89a",
seed_color = "#eed89a"
})
PyuTest.make_crop("pyutest_farming:carrot", "Carrot", "pyutest_tools:carrot 3", 90, 0.33, {
PyuTest.make_crop("pyutest_farming:carrot", "Carrot", "pyutest_tools:carrot 3", to_minutes(6), 0.33, {
crop_color = "#d19d79",
grown_color = "#d19d79",
seed_color = "#d19d79"
})
PyuTest.make_crop("pyutest_farming:potato", "Potato", "pyutest_tools:potato 5", 70, 0.75, {
PyuTest.make_crop("pyutest_farming:potato", "Potato", "pyutest_tools:potato 5", to_minutes(5), 0.33, {
crop_color = "#9e7b58",
grown_color = "#9e7b58",
seed_color = "#9e7b58"

View File

@ -61,7 +61,7 @@ minetest.register_decoration({
sidelen = 16,
fill_ratio = 0.04,
place_on = {"group:sugarcane_spawn_on"},
decoration = "pyutest_blocks:sugarcane",
decoration = "pyutest_flowers:sugarcane",
y_max = PyuTest.OVERWORLD_SURFACE_BOTTOM,
y_min = 0,
spawn_by = {"pyutest_blocks:water_source"},