flat mapgen with updated mcl_spawn mod #1052

Closed
opened 2021-02-03 01:29:29 +01:00 by kay27 · 11 comments
Contributor

@MysticTempest, changing the sign of the operation left biome white list clear for v7 mapgen, and forced the algorithm to search the point until counter overflow. I hope it is now fixed but mod data has been updated and saved, and spawn points moved out of 2000 m from (0,0,0) so I've finally decided to wipe mod storages of my servers to resolve it :)

So dangerous effect. But locating the suitable spawn place isn't an easy task so I'm not sure it's a good idea to calculate it from the middle of the world every server restart...

So I should ask, can't you please check, haven't you experienced crash mentioned here again?

@MysticTempest, changing the sign of the operation left biome white list clear for v7 mapgen, and forced the algorithm to search the point until counter overflow. I hope it is now fixed but mod data has been updated and saved, and spawn points moved out of 2000 m from (0,0,0) so I've finally decided to wipe mod storages of my servers to resolve it :) So dangerous effect. But locating the suitable spawn place isn't an easy task so I'm not sure it's a good idea to calculate it from the middle of the world every server restart... So I should ask, can't you please check, haven't you experienced [crash mentioned here](https://git.minetest.land/MineClone2/MineClone2/commit/d571d62863ca69a151f89175d9de3fe8397f9b79) again?
kay27 added the
mapgen
Testing / Retest
performance
labels 2021-02-03 01:29:29 +01:00
Member

Ah, sorry bout that.

I just tested your fix against the mapgens that use to be broken before I incorrectly patched them.

v6: Still works.
Singlenode: Still works.
Flat: Broken again. Same error as last time.

2021-02-02 20:02:02: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'mcl_spawn' in callback environment_Step(): ...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:230: wrong number of arguments to 'insert'
2021-02-02 20:02:02: ERROR[Main]: stack traceback:
2021-02-02 20:02:02: ERROR[Main]: 	[C]: in function 'insert'
2021-02-02 20:02:02: ERROR[Main]: 	...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:230: in function 'next_biome'
2021-02-02 20:02:02: ERROR[Main]: 	...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:311: in function 'search'
2021-02-02 20:02:02: ERROR[Main]: 	...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:435: in function 'shadow_worker'
2021-02-02 20:02:02: ERROR[Main]: 	...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:448: in function 'func'
2021-02-02 20:02:02: ERROR[Main]: 	/usr/share/minetest/builtin/common/after.lua:20: in function </usr/share/minetest/builtin/common/after.lua:5>
2021-02-02 20:02:02: ERROR[Main]: 	/usr/share/minetest/builtin/game/register.lua:426: in function </usr/share/minetest/builtin/game/register.lua:410>
2021-02-02 20:02:02: ERROR[Main]: stack traceback:
Ah, sorry bout that. I just tested your fix against the mapgens that use to be broken before I incorrectly patched them. **v6:** Still works. **Singlenode:** Still works. **Flat:** Broken again. Same error as last time. ``` 2021-02-02 20:02:02: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'mcl_spawn' in callback environment_Step(): ...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:230: wrong number of arguments to 'insert' 2021-02-02 20:02:02: ERROR[Main]: stack traceback: 2021-02-02 20:02:02: ERROR[Main]: [C]: in function 'insert' 2021-02-02 20:02:02: ERROR[Main]: ...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:230: in function 'next_biome' 2021-02-02 20:02:02: ERROR[Main]: ...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:311: in function 'search' 2021-02-02 20:02:02: ERROR[Main]: ...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:435: in function 'shadow_worker' 2021-02-02 20:02:02: ERROR[Main]: ...minetest/games/mineclone2/mods/PLAYER/mcl_spawn/init.lua:448: in function 'func' 2021-02-02 20:02:02: ERROR[Main]: /usr/share/minetest/builtin/common/after.lua:20: in function </usr/share/minetest/builtin/common/after.lua:5> 2021-02-02 20:02:02: ERROR[Main]: /usr/share/minetest/builtin/game/register.lua:426: in function </usr/share/minetest/builtin/game/register.lua:410> 2021-02-02 20:02:02: ERROR[Main]: stack traceback: ```
Author
Contributor

Thanks for the information.
Would you mind telling me the seed number of broken flat world?

Thanks for the information. Would you mind telling me the seed number of broken flat world?
kay27 added
#P1 CRITICAL
and removed
Testing / Retest
labels 2021-02-03 09:01:48 +01:00
kay27 changed title from Check singlenode with updated mcl_spawn @MysticTempest to flat mapgen with updated mcl_spawn mod 2021-02-03 09:03:36 +01:00
kay27 added
bug
and removed
performance
labels 2021-02-03 09:03:54 +01:00
kay27 self-assigned this 2021-02-03 09:04:04 +01:00
Member

Thanks for the information.
Would you mind telling me the seed number of broken flat world?

Sorry, more specifically; "classic superflat".
Any seed number.

I've had it enabled in the menu settings for so long I forgot it was an optional toggle. It's where I test things out, & create schematics.

> Thanks for the information. > Would you mind telling me the seed number of broken flat world? Sorry, more specifically; "classic superflat". Any seed number. I've had it enabled in the menu settings for so long I forgot it was an optional toggle. It's where I test things out, & create schematics.
Author
Contributor

Please excuse my stupidity.
I tried to use some flat options and remove all decorations.
It all works.
I need to reproduce the bug.
Can you please write the settings I should make according to https://github.com/minetest/minetest/blob/master/minetest.conf.example#L1743 ?

Update

I've had it enabled in the menu settings for so long I forgot it was an optional toggle. It's where I test things out, & create schematics.

Now I've seen that! Sorry again :) trying to reproduce...

Please excuse my stupidity. I tried to use some flat options and remove all decorations. It all works. I need to reproduce the bug. Can you please write the settings I should make according to https://github.com/minetest/minetest/blob/master/minetest.conf.example#L1743 ? __Update__ > I've had it enabled in the menu settings for so long I forgot it was an optional toggle. It's where I test things out, & create schematics. Now I've seen that! Sorry again :) trying to reproduce...
Author
Contributor

@MysticTempest have you got some trees there? I pushed a fix but trees are important to make searching loop not too long in time... Maybe I should check how long it takes time to time to interrupt after minute or two...

@MysticTempest have you got some trees there? I pushed a fix but trees are important to make searching loop not too long in time... Maybe I should check how long it takes time to time to interrupt after minute or two...
Member

@MysticTempest have you got some trees there? I pushed a fix but trees are important to make searching loop not too long in time... Maybe I should check how long it takes time to time to interrupt after minute or two...

That fixed it; thanks!

But, you could also maybe just ignore superflat. As it's suppose to be pretty much blank; no trees.

https://minecraft.gamepedia.com/Superflat

https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/MAPGEN/mcl_biomes/init.lua#L3883-L3889

> @MysticTempest have you got some trees there? I pushed a fix but trees are important to make searching loop not too long in time... Maybe I should check how long it takes time to time to interrupt after minute or two... That fixed it; thanks! But, you could also maybe just ignore superflat. As it's suppose to be pretty much blank; no trees. https://minecraft.gamepedia.com/Superflat https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/MAPGEN/mcl_biomes/init.lua#L3883-L3889
Author
Contributor

Thanks for the feedback!
So, villages shouldn't spawn there? I saw one or two...

Thanks for the feedback! **So, villages shouldn't spawn there? I saw one or two...**
kay27 closed this issue 2021-02-04 00:43:30 +01:00
Author
Contributor

randomly tested with v5 and got incredible look:

seed=123456789 +Caves +Dungeons +Decorations +Caverns

and that's the spawn point found (after about 40 seconds after world start):
image


with flat + superflat i've broken respawn point several times and the script changes it in next 30 seconds... so hope it will work with any mapgen... but who knows, to be honest, there are lots of mapgen options... you can just set static_spawnpoint, to disable that

randomly tested with v5 and got incredible look: seed=123456789 +Caves +Dungeons +Decorations +Caverns and that's the spawn point found (after about 40 seconds after world start): ![image](/attachments/0671b1c7-7e01-485f-9cb1-b6eb4da85449) --------------- with flat + superflat i've broken respawn point several times and the script changes it in next 30 seconds... so hope it will work with any mapgen... but who knows, to be honest, there are lots of mapgen options... you can just set ```static_spawnpoint```, to disable that
960 KiB
Member

According to the minecraft wiki, villages can spawn in superflat. And, our own villages should occassionally as well.
But, it's not a necessary thing.
Superflat is mostly just a baseplate to build off of.

Ooh, that v5 map looks great! I kinda want to make it one of my new homebases; thanks for the seed and the fixes!

According to the minecraft wiki, villages can spawn in superflat. And, our own villages should occassionally as well. But, it's not a necessary thing. Superflat is mostly just a baseplate to build off of. Ooh, that v5 map looks great! I kinda want to make it one of my new homebases; thanks for the seed and the fixes!
Author
Contributor

I debugged minecarts on the top of the mountain for some days and now seen this below:
image

I debugged minecarts on the top of the mountain for some days and now seen this below: ![image](/attachments/4934d536-89ef-4f00-856e-aa4897654e94)
760 KiB
Contributor

Yes, the mob spawning still needs a proper implementation.

Yes, the mob spawning still needs a proper implementation.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#1052
No description provided.