Error regarding mod I created
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Error regarding mod I created
So recently I edited the code of one of my mods named new_biomes, and it started giving me an obnoxious error
- Blockhead
- Moderator
- Posts: 2793
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: Error regarding mod I created
I'm sorry to hear that, but the version of new_biomes on GitHub is only up to date for 22 January. So unless you provide the new version somewhere (like a git branch) and the error message, we can't really do much to help.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
Well I haven't provided any information about the error cause and no the current version on github is alright, the actual problem is with my code lemme share
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
minetest.unregister_biome("grassland_under")
minetest.register_biome({
name = "grassland_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -28999,
heat_point = 50,
humidity_point = 35,
})
minetest.register_biome({
name = "underground_grassland",
node_stone = "new_biomes:glowing_dirt",
node_cave_liquid = {"default:river_water_source"},
node_dungeon = "new_biomes:glowing_dirt",
node_dungeon_stair = "new_biomes:gdwg",
y_max= -29000,
y_min = -31000,
vertical_blend = 10,
heat_point = 50,
humidity_point = 35,
})
minetest.register_decoration({
name = "new_biomes:plain_floor",
deco_type = "simple",
place_on = {"new_biomes:glowing_dirt"},
sidelen = 16,
fill_ratio = 10,
biomes = {"underground_grassland", "underground_deciduous_forest"},
y_max = -29000,
y_min = -30910,
decoration = "new_biomes:gdwg",
place_offset = -1,
flags = "all_floors,force_placement",
})
minetest.unregister_biome("taiga_under")
minetest.register_biome({
name = "taiga_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -28999,
heat_point = 25,
humidity_point = 70,
})
minetest.register_biome({
name = "underground_taiga",
node_stone = "new_biomes:glowing_dirt",
node_cave_liquid = {"default:river_water_source"},
node_dungeon_stair = "new_biomes:gdws",
node_dungeon = "new_biomes:glowing_dirt",
y_max = -29000,
y_min = -31000,
heat_point = 25,
humidity_point = 70,
})
minetest.unregister_biome("snowy_grassland_under")
minetest.register_biome({
name = "snowy_grassland_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -28999,
heat_point = 20,
humidity_point = 35,
})
minetest.register_biome({
name = "underground_snowy_grassland",
node_stone = "new_biomes:glowing_dirt",
node_dungeon = "new_biomes:glowing_dirt",
node_dungeon_stair = "new_biomes:gdws",
node_cave_liquid = {"default:river_water_source"},
y_max= -29000,
y_min = -31000,
vertical_blend = 10,
heat_point = 20,
humidity_point = 35,
})
minetest.register_decoration({
name = "new_biomes:cold_floor",
deco_type = "simple",
place_on = {"new_biomes:glowing_dirt"},
sidelen = 16,
fill_ratio = 10,
biomes = {"underground_snowy_grassland", "underground_taiga"},
y_max = -29000,
y_min = -30910,
decoration = "new_biomes:gdws",
place_offset = -1,
flags = "all_floors,force_placement",
})
Now for some reason the underground_snowy_grassland does generate but the dirt cover over it is new_biomes:gdwg so this is causing some no plantation and ore deposits which were supposed to generate in there
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
Hello anybody here, I unfortunately want some advice on how to fix this problem, not a good coder need help?
-
Josselin2
- Member
- Posts: 134
- Joined: Thu May 28, 2020 15:32
- GitHub: axcore
- In-game: Josselin
- Location: Tunnelers' Abyss
Re: Error regarding mod I created
Presumably this is your problem:
These lines guarantee that a single decoration is placed on all possible surfaces, so there is nowhere to place other decorations like plants and ores.
You didn't post all of your code to github, as Blockhead suggested, so that is all the help you are going to get.
If this were my mod, I would start by adding these lines at the top of mapgen.lua:
Then I would comment out every biome and decoration. Then I would uncomment each biome and decoration, one at a time, until the code stops behaving as expected.
Code: Select all
fill_ratio = 10,
flags = "all_floors,force_placement",You didn't post all of your code to github, as Blockhead suggested, so that is all the help you are going to get.
If this were my mod, I would start by adding these lines at the top of mapgen.lua:
Code: Select all
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
The thing is that only this particular biome is causing errors, but not any other biome all is working normal except for these lines. Also I'm not willing to re-register the all biomes and decorations. It's quite size- consumingJosselin2 wrote: ↑Sun Feb 11, 2024 09:06Presumably this is your problem:
These lines guarantee that a single decoration is placed on all possible surfaces, so there is nowhere to place other decorations like plants and ores.Code: Select all
fill_ratio = 10, flags = "all_floors,force_placement",
You didn't post all of your code to github, as Blockhead suggested, so that is all the help you are going to get.
If this were my mod, I would start by adding these lines at the top of mapgen.lua:
Then I would comment out every biome and decoration. Then I would uncomment each biome and decoration, one at a time, until the code stops behaving as expected.Code: Select all
minetest.clear_registered_biomes() minetest.clear_registered_decorations()
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
Also, these particular lines are the cause of errors, nothing other than them
-
Josselin2
- Member
- Posts: 134
- Joined: Thu May 28, 2020 15:32
- GitHub: axcore
- In-game: Josselin
- Location: Tunnelers' Abyss
Re: Error regarding mod I created
You need to upload your code. No-one can fix code that they can't see.
Go to your github, click the "main" button in the top left, in the box type "new_biomes_test", and then upload the broken code to that branch. You can delete the broken branch when you don't need it any more.
Go to your github, click the "main" button in the top left, in the box type "new_biomes_test", and then upload the broken code to that branch. You can delete the broken branch when you don't need it any more.
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
Sorry for that long of a wait but I've uploaded the error causing code on the repository. The late was due to github third party 2 step verification problemJosselin2 wrote: ↑Mon Feb 12, 2024 08:58You need to upload your code. No-one can fix code that they can't see.
Go to your github, click the "main" button in the top left, in the box type "new_biomes_test", and then upload the broken code to that branch. You can delete the broken branch when you don't need it any more.
- Blockhead
- Moderator
- Posts: 2793
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: Error regarding mod I created
The latest main branch version at midnightx756/New_Biomes runs fine for me when I start a new world with it enabled. Are you stilling getting an error?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
Use findbiome world, find the new_biomes:underground_snowy_grasslandBlockhead wrote: ↑Sat Mar 22, 2025 14:35The latest main branch version at midnightx756/New_Biomes runs fine for me when I start a new world with it enabled. Are you stilling getting an error?
- Blockhead
- Moderator
- Posts: 2793
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: Error regarding mod I created
It will be easier if you send me the seed (or is findbiome the seed?) and exact co-ordinates.Midnight wrote: ↑Sun Mar 23, 2025 02:01Use findbiome world, find the new_biomes:underground_snowy_grasslandBlockhead wrote: ↑Sat Mar 22, 2025 14:35The latest main branch version at midnightx756/New_Biomes runs fine for me when I start a new world with it enabled. Are you stilling getting an error?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
oh sorry I was reffering you to use the findbiome modBlockhead wrote: ↑Sun Mar 23, 2025 06:39It will be easier if you send me the seed (or is findbiome the seed?) and exact co-ordinates.Midnight wrote: ↑Sun Mar 23, 2025 02:01Use findbiome world, find the new_biomes:underground_snowy_grasslandBlockhead wrote: ↑Sat Mar 22, 2025 14:35The latest main branch version at midnightx756/New_Biomes runs fine for me when I start a new world with it enabled. Are you stilling getting an error?
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
Sorry for replying so late I was literally struggling to keep up withBlockhead wrote: ↑Sun Mar 23, 2025 06:39It will be easier if you send me the seed (or is findbiome the seed?) and exact co-ordinates.Midnight wrote: ↑Sun Mar 23, 2025 02:01Use findbiome world, find the new_biomes:underground_snowy_grasslandBlockhead wrote: ↑Sat Mar 22, 2025 14:35The latest main branch version at midnightx756/New_Biomes runs fine for me when I start a new world with it enabled. Are you stilling getting an error?
my college life here.
but here is a seed and see the problem urself pls.
8652216453922479942
underground_snowy_grassland 462, -29187, -1069
underground_taiga 882, -29251, -907(For some reason permafrost is being genrated, and sometimes grass, but never snowy grass)
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
Hey broBlockhead wrote: ↑Sun Mar 23, 2025 06:39It will be easier if you send me the seed (or is findbiome the seed?) and exact co-ordinates.Midnight wrote: ↑Sun Mar 23, 2025 02:01Use findbiome world, find the new_biomes:underground_snowy_grasslandBlockhead wrote: ↑Sat Mar 22, 2025 14:35The latest main branch version at midnightx756/New_Biomes runs fine for me when I start a new world with it enabled. Are you stilling getting an error?
- Blockhead
- Moderator
- Posts: 2793
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: Error regarding mod I created
Ores specify a wherein property when set up with core.register_ore. You should not be too surprised that when your caves are made of your modded dirt nodes, that the ores in MTG that are specifically coded only to spawn inside of default:stone do not spawn. You will need to copy & paste the ore definitions from MTG's mods (and any other mods you intend to support), or parse core.registered_ores for existing ore spawn types and make new ones that spawn in your modded dirt nodes. Hope that helps.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
I had registered a new decoration made up of ores that spawn in these biomes, but all other biomes have ore clusters except theseBlockhead wrote: ↑Sun Nov 30, 2025 16:01
Ores specify a wherein property when set up with core.register_ore. You should not be too surprised that when your caves are made of your modded dirt nodes, that the ores in MTG that are specifically coded only to spawn inside of default:stone do not spawn. You will need to copy & paste the ore definitions from MTG's mods (and any other mods you intend to support), or parse core.registered_ores for existing ore spawn types and make new ones that spawn in your modded dirt nodes. Hope that helps.
- Blockhead
- Moderator
- Posts: 2793
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: Error regarding mod I created
That is a pretty unusual approach for ores, but fair enough. I haven't investigated in depth, but looking at deco.lua I would hazard a guess that the decoration placement code doesn't place decorations inside of caves, but instead only works on the surface where heightmap data is actually useful.
Two references:
- Ethereal NG's illumishrooms spawn on top of coal with a register_on_generated call (decor.lua, end of of file)
- Underch's mushroom generation uses an on_generated callback as well.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Midnight
- Member
- Posts: 218
- Joined: Sun Dec 19, 2021 13:56
- GitHub: Midnightx756
- IRC: Dragon
- In-game: Dragon_Abysss
- Location: Dehradun, India
Re: Error regarding mod I created
Ok I'll try but can u please help me with the grass problem, that underground_snowy_grassland still has gdwg instead of gdws on itBlockhead wrote: ↑Tue Dec 02, 2025 17:24That is a pretty unusual approach for ores, but fair enough. I haven't investigated in depth, but looking at deco.lua I would hazard a guess that the decoration placement code doesn't place decorations inside of caves, but instead only works on the surface where heightmap data is actually useful.
Two references:I don't think it's a mere coincidence that neither mod uses the decoration system, it would seem to corroborate my theory above. Again, not an in-depth investigation. And yes, I believe mushroom placement and the pillars in your mod are comparable.
- Ethereal NG's illumishrooms spawn on top of coal with a register_on_generated call (decor.lua, end of of file)
- Underch's mushroom generation uses an on_generated callback as well.
- Blockhead
- Moderator
- Posts: 2793
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: Error regarding mod I created
In functions.lua, you have an ABM that turns glow dirt into grass. That doesn't check for air above the node at all though, so the cave at 886,-29253,-901 (still same seed, mapgen v7, which may matter for caves, I think probably not though) started turning into gdwg over time.
Meanwhile in mapgen.lua, underground_snowy_grass_land as a biome only refers to "new_biomes:gdws" as its node_dungeon_stair, and not in any way that would make it spawn gdws as the main material of the cave that I could see. While you're there, the indentation is a mess of different amounts of spaces...
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Who is online
Users browsing this forum: No registered users and 1 guest