![Chunk By Chunk](https://media.forgecdn.net/avatars/thumbnails/477/902/256/256/637773032814198799.png)
[New Information]1.18.2 Villagers don't spawn from petrified world
xFirefalconx opened this issue ยท 36 comments
Hi!
I've found a village that I spawned from the petrified world. It showed me all other animals, but Villagers don't spawn. I hope this can be fixed. Thank you for the last few bugfixes on things I reported!
I am very sure that villagers will be pulled across from the generation dimension if they are present in the chunk - petrified vs empty worlds should be the same too. I gave it a quick check just now with 1.11.0 in 1.19.2 forge and it worked fine.
Can you double check the state of the generation dimension - if you are in creative you can teleport there with the command:
execute in chunkbychunk:skychunkgeneration run teleport ~ ~ ~
When you spawn a chunk it should be a copy of whatever is going on in there - I guess you could be really unlucky and have the villagers all move out of the chunks as you spawn them though.
Okay found a way to get back (/kill).
Something strange happened.
I had some villagers spawn, but not all. As if they got unloaded quickly after and it couldn't find them afterwards.
Comparison:
The original unpetrified dimension you use as a reference:
The petrified map where I spawned the village after I had joined the original world and killed myself to return:
I have a bunch of mods. Should I list them?
I tried out the command in a new world. I got teleported to an inhabitated village that does have cats, golems and villagers. I don't know how to teleport back, though. I would like to try spawning now that it got loaded. I will though try to see what happens if I place a chunk by chunk block in that area and activate it. Since I'm there already. (Might trigger a bug)
I went to a second village that I didn't load in the other dimension. I unpetrified it - the village is unhabitated. Also note the missing cats and golems.
Second note: Exoticbirds are spawning on the petrified chunks. I don't mind that much, just a weird fact. Maybe the spawn handling is different for them.
Sorry, the return command is
execute in minecraft:overworld run teleport ~ ~ ~
List of mods would be good. I cannot reproduce the issue in chunk by chunk only.
Alright, this is the full list of mods I'm currently using in my modpack, my Forge version is 40.1.74.
There are some disabled ones, feel free to skip them.
villagespawnpoint_1.18.2-3.0.jar
BetterCompatibilityChecker-1.1.18-build.42+mc1.18.2.jar
ChunkByChunk-forge-1.18.2-1.11.0.jar
Regrowth-1.18.2-1.40.31.1.jar
spells_and_shields-1.18.2-1.9.2.jar
Unbreakable Enchantment 1.0.0-1.18.2.jar
player-animation-lib-forge-0.4.0+1.18.jar
polymorph-forge-1.18.2-0.46.jar
mcw-windows-2.1.0forge-1.18.2.jar
ftbbackups2-forge-1.18.2-1.0.17.jar
polylib-forge-1801.0.2-build.13.jar
geckolib-forge-1.18-3.0.56.jar
BambooEverything-forge-1.3.5-build.36+mc1.18.2.jar
kleeslabs-forge-1.18.2-11.1.1.jar
ExNihiloSequentia-1.18.2-20221113-044349.jar
DynamicTrees-1.18.2-0.11.0-Beta4.jar
mcw-doors-1.0.7-mc1.18.2.jar
Jade-1.18.2-forge-5.2.6.jar
weaponleveling-1.18.2-1.4.3.jar
citydecor-1.1.1.jar
simplecobblestonegenerator-1.18.2.jar.disabled
appleskin-forge-mc1.18.2-2.4.1.jar
Patchouli-1.18.2-71.1.jar
largemeals-1.18.2-2.0.jar
honeyexpansion-1.1.1.jar
FarmersRespite-1.18.2-1.3.0.jar
Crated_Vanilla_Foods_1.1-1.18.2.jar
MoreMobGriefingOptions-1.18.2-2.0.1.jar
SoL-Carrot-1.18.1-1.12.0.jar
forgivingvoid-forge-1.18.1-6.0.1.jar
Villagers_Sell_Animals_1.1.3_Forge_1.18.2.jar
MobCatcher-Forge-1.18.2-1.1.6.jar
ItemLocks-Forge-1.18.2-1.3.jar
GameMenuModOption-1.18-Forge-1.14.2.jar
SBM-Jukebox-1.18-1.0.4.jar
advancement(r).jar
deepslate_dubble003.jar
hedgehog-1.18.2-1.1.0.jar
snowyspirit-1.18.2-1.3.2.jar
bewitchmentplus-1.18.2-14.jar
Pehkui-3.6.0+1.18.2-forge.jar
overweightfarming-1.18.2-1.6.0-forge.jar
croptopia-chocolaterie-1.1.jar
dtcroptopia-1.0.0.jar.disabled
Croptopia-1.18.2-FORGE-2.1.0.jar
DynamicSurroundings-5.0.0.4.jar
Oh_The_Biomes_You'll_Go-forge-1.18.2-1.4.7.jar
torchmaster-18.1.0.jar
cookingforblockheads-forge-1.18.2-12.2.0.jar
beehive-tooltips-forge-1.4.2.jar
BeeFix-1.18-1.0.6.jar
XPFromHarvest-1.18.2-1.2.2.jar
supplementaries-1.18.2-1.5.13.jar
xptome-1.18.2-2.1.7.jar
swingthroughgrass-1.18.2-1.9.1.jar
so_many_enchants-1.7.0 (1.18).jar
SnowRealMagic-1.18.2-forge-4.2.3.jar
3dskinlayers-forge-1.5.2-mc1.18.2.jar
Placebo-1.18.2-6.6.6.jar
mcw-roofs-2.2.1-mc1.18.2-forge.jar
keepmysoiltilled_1.18.2-1.6.jar
mcw-bridges-2.0.5-mc1.18.2forge.jar
DynamicTreesPlus-1.18.2-0.1.0-Beta1.jar
DynamicTreesBOP-1.18.2-3.0.0-Beta1.jar
ChinjufuMod[1.18.2]6.2.4.jar
configured-2.0.0-1.18.2.jar
betterspawnercontrol_1.18.2-3.0.jar
betterfoliage-3.1.4.jar
Chimes-1.1.2-1.18.2.jar
anviltooltipmod-MC1.18.2-1.0.0.jar
merenc-forge-1.18.x-v1.9.jar
FarmersDelight-1.18.2-1.2.0.jar
blueprint-1.18.2-5.5.0.jar
cloth-config-6.4.90-forge.jar
Kiwi-1.18.2-forge-6.1.3.jar
Level-One-MC1.18.2-v1.5.0.jar
TerraBlender-forge-1.18.2-1.2.0.126.jar
Better Fishing Rods 1.0.0 - 1.18.2.jar
Book Fishing 1.0.0 - 1.18.2.jar
AkashicTome-1.5-20.jar
autoplant-1.18.2-1.0.0.jar
BadMobs-1.18.2-13.01.jar
bamboo2-1.18.1_0.4.jar
Beekeeper-1.18.2-1.0.0.4.jar
benched-1.2.1-mc1.18.jar
supermartijn642corelib-1.0.19-forge-mc1.18.jar
supermartijn642configlib-1.1.6-forge-mc1.18.jar
better-loading-screen-1.4.0.jar
bettermending-forge-1.2.1+1.18.2.jar
bettersafebed-1.18-forge-a.jar
BetterThirdPerson-Forge-1.18.2-1.8.1.jar
BorderlessWindow-1.18-1.4.0.jar
carryon-1.18.2-1.17.0.8.jar
Controlling-forge-1.18.2-9.0+22.jar
creeperconfetti-3.11.jar
DungeonCrawl-1.18.2-2.3.10.jar
BiomesOPlenty-1.18.2-16.0.0.109-universal.jar
Bookshelf-Forge-1.18.2-13.2.50.jar
wooltostring-forge-1.18.2-1.0.1.jar
exoticbirds-1.18.2-1.8.0.jar
ExtendedItemInformation-4.0.2-1.18.2.jar
farmingforblockheads-forge-1.18.2-10.0.2.jar
FastLeafDecay-28.jar
guardvillagers-1.18.2.1.4.3.jar
EnderBags-1.18.1-8.0.0.jar
InfoDataPack-1.18.1-2.0.2.8.jar
JEIEnchantmentInfo-1.17.1-2.0.0.jar
journeymap-1.18.2-5.8.5-forge.jar
jei-1.18.2-9.7.1.255.jar
JustEnoughResources-1.18.2-0.14.1.171.jar
modnametooltip-1.18.1-1.18.0.jar
moreoverlays-1.20.9-mc1.18.2.jar
MouseTweaks-forge-mc1.18-2.21.jar
NaturesCompass-1.18.2-1.9.7-forge.jar
passiveendermen_1.18.2-3.0.jar
Quark-3.2-358.jar
AutoRegLib-1.7-53.jar
skylightlanterns-1.18.2-1.0.0.jar
selene-1.18.2-1.17.9.jar
tumbleweed-1.18-0.4.12.jar
VendingMachine-1.18.2-1.0.0.7.jar
villagebellrecipe_1.18.2-1.4.jar
village-employment-1.18.2-1.5.1.jar
VillagersRespawn-1.18.1-1.39.0.5.jar
waystones-forge-1.18.2-10.1.0.jar
smoothboot(reloaded)-mc1.18.2-0.0.2.jar
EnchantmentDescriptions-Forge-1.18.2-10.0.10.jar
balm-3.2.1+0.jar
Clumps-forge-1.18.2-8.0.0+17.jar
ferritecore-4.2.2-forge.jar
sophisticatedcore-1.18.2-0.5.32.179.jar
sophisticatedbackpacks-1.18.2-3.18.35.752.jar
architectury-4.10.88-forge.jar
collective-1.18.2-5.25.jar
Disenchanting-forge-1.18.2-2.2.0.jar
biomespawnpoint_1.18.2-1.6.jar
I've tried with most of the mods in this list, and haven't been able to reproduce the issue. Potentially there's a configuration option mixed in - if there is something like an option to prevent villagers entering the nether it might be causing issues. But otherwise I need more information. Closing for now.
config (2).zip
bamboo2-common.zip
For some reason I don't remember I have this bamboo toml in my main folder. It might be unnecessary to look it through but I thought I add it anyways. If even that doesn't do a thing I will see to pack my whole modpack and send it somehow. Is there a file size limit in here?
Alternatively anything you can do to narrow the list of mods might help, perhaps disable half the mods and see if the remaining reproduce the issue and continue until you it is narrowed down.
Put together the full pack with every mod except "advancements(r).jar" (couldn't find it anywhere). Added in the config. Villagers still spawned into the overworld. I don't have any explanation.
I'll give it another try to find the culprit and give you an update once I found out. Will keep this thread in my list until then. Thanks for all the time you poured into it. Hopefully I'll be more lucky finding it.
An Update to the villagers by the way. I have a mod called village spawnpoint. I increased the size of the initial chunk to 9.
And look at this, the first villager! This means that world generation does something different than chunk loading.
I get email notifications whenever you comment, so it is all good.
World gen and chunk spawner user the exact same code to do the spawning, so it is odd there is a difference in behaviour. The main oddity I've had to work with is that it takes a bit of time when a chunk is loaded in the generation dimension before entities are available to be moved into the overworld, so the system has built in a wait time for that... I guess I haven't got a great sense of the cause of that and maybe my PC is fast enough that it always has the entities loaded in a second or so while other systems need more time, so perhaps that is an area I can poke at.
Debug-wise, just whatever ends up in logs. A lot of cases would be invisible to the chunk by chunk code (entity not found, moving to another dimension blocked or deletion after being moved).
Do you happen to know any debug mode that could be used to know what's happening exactly when a village chunk is loaded via the chunk spawner? If it's found the entity but the spawn got overwritten or it can't find the entity because of another mod? Why is world generation fine with my setup? What's the difference between both? I still have the situation where a bunch of them is missing, including their potential golems or cats. Only those found via the 9x9 chunks on gen are fine. Does world gen chunk by chunk ignore anything that the spawner does act upon? Maybe that's a clue. I'm concerned as to why it works fine for you but I can't make it happen.
I also missed that you couldn't find this mod, the author wasn't naming it well in the filename.
https://www.curseforge.com/minecraft/mc-mods/more_advancements
If that's by chance the one acting up, let me know we found the clown.
I probably will split the mods in half and go that way. Haven't found the time to execute it yet. I'll edit the name so you know I got something new on the matter, hope you are okay with that.
Edit: Current Forge version is 40.2.0.
Okay, I was unsure. Yeah my pc is pretty old by now and sometimes it laggs a little so I have to wait.
For some reason me and my friend both have an issue where Minecraft would sometimes not let us close the Pause Menu after loading/creating a world, but that's since 1.16.5 and with other mods and it happens out of the blue, often (if not always) when we were tabbing out during the loading process. So, there are a couple of odd things going on.
Do you need my pc specs to compare stuff there? I can also ask my friend to create a world and see if they get anywhere else from there. We share the same versions since we play together.
What's super strange to me is that a) some mod creatures are spawned even if they should be petrified instead,
b) some creatures get spawned right at chunk spawn
c) only the village related ones don't, but at world spawn.
I remember that the first time I loaded a chunk at night, a spider would instant jumpscare-attack me and leave me with nearly a heart attack :'D That one got stored over, even though lots of time passed since I started the world, the mob still got transferred?
I only know coding and logs from C# in Unity so I can't compare much but it's got a "Debug.Log(variable)" function where you can see different things if a debugger module is not able to run (or in my case you don't get it so you can't make it work). I was thinking about something like... finding the total number of villagers in the original village and output that somehow, via Journeymap I can potentially look how many actually spawned. If the number of the original village villagers is not displaying correctly without going to the dimension, it might have something to do with the dimension layer and loading those chunks? You might know better, I'm just transferring my ideas onto what I understood. We also know that the original world is fine.
Is the first loaded chunk ever petrified? Maybe that got to do something with them not showing up, the 9x9 area was perfectly fine, after all but the rest of the villages I tried also had the issue where nobody would spawn outside of that range when using the spawn blocks. It's like a gamble, if you are lucky you get enough at start but you have to build up everything from that. What about other entities? I remember the last time there would spawn a horse randomly, is that because of grass blocks? Villagers and villager cats only spawn upon generation (the latter only respawn when there are enough villagers or something).
Maybe even going further, how exactly is that process computed? Idk much about things but for example my CPU is terrible and my RAM is slow so I execute many tasks on an internal HDD to not run out of space. Maybe minecraft handles initial world gen differently, too. Or one of those mods with leads to the task I am yet to go for (sigh I keep saying that don't I).
I might be thinking the wrong way here and there but perhaps you haven't thought about one or two of these yet. Will let you know if my friend also got issues their pc is a bit better than mine.
Edit: My friend also can't spawn new chunked villagers, initial ones do spawn though. Is it possible to just send you the whole modpack folder and you check what's going on? There must be something else going on since it isn't local.
I'll try to narrow down the problem meanwhile.
I went and halved the mods, then chunked out 10 mods per run until the problem would disappear.
I found that in this chunk (while I also had added new mods over time since the initial report) there might be a potential culprit? I haven't tested the other ~90 mods that I just chunked out without testing.
The only thing is I created 3 worlds now and the first had no villagers at all, but I was unsure whether that was because it only had 3 sparse houses (bad seed problem), the second world didn't spawn me where I should have ended up? and the spawn radius was gone? and the third world I finally had a spawn with spawn created villagers and one chunked out one! But I am unsure if this is the true case for each scenario, especially because for some reason I spawned a superflat world by accident, it spawned close to a slime chunk and... it's difficult to reproduce because I found that about 50% of the time there would be no initial spawns. The fail initial spawn rate in this test build was 66,66% and only succeeded once, aka 33,33%. I will try to put back all the others and retry a few more times once I found a... trend. I don't want it to just... be a happy accident.
Edit: Apparently it's more complex than that. I told my friend to test if deactivating those would work but it doesn't seem so. Perhaps it's multiple mods interacting with another.
Ok so I spent the last couple of hours trying to find out what's happening since I initially never was able to spawn villagers and now sometimes it works and sometimes not. I reduced the modpack to 3 mods: Chunk by Chunk, Collective and Village Spawn Point.
It doesn't work to spawn any on a large biomes map. None. Zero. Neither on world gen nor on chunk spawn.
First try. (Some sheep spawned tho)
Second try.
It... I am not sure if initial spawn succeeded but there were villagers when I spawned more chunks.
My settings are always: Start in Creative, Cheats on, Fire tick off, large biomes, add bonus chest. Sometimes I switch to default to see if that makes any difference but it's still like playing russian roulette.
Does it help to add a latest.log? Shall I zip you my folder or something? There is a fish in here I can smell it but I cannot find it.
A few theories I have myself: Do you know if the time is stopped on the original dimension? How does it handle where entities are generally? I am thinking about entities leaving a chunk and getting overwritten by nothing because they didn't exist when their chunk that they already left onto an already scanned one where they were not yet. That would though also affect other entities so I am unsure if that's the case. But since we checked and there are villagers and all in the original dimension, something gets lost in the process ๐ค
I told a friend about the situation and they put their idea this way: about the minecraft petrification village issue
problem: Village structure generates, but villagers don't always appear
theory - world and structure generation runs normally, but village recognition code gets confused in the petrified world because block/item IDs are not the same, and because the petrification and village recognition happen simultaneously the engine doesn't always know which one to do first which results in inconsistent spawns
I can confirm a high inconsistency indeed. I had all variants of spawns happening on just either one, both or none side.
If you got any info on that I might be able to help digging up some more in that direction. LMK if there is something we've overlooked yet.
Also, in the rare case it's caused by village spawn point... Anything I should test out?
I can also try to create a new profile and do more tests there, ask my friend etc.
So doing a quick test locally with just those three mods (albeit using an older version of chunk by chunk - newer version of chunk by chunk actually has village spawn mod capabilities built in btw) and using large biomes, villagers were spawning as expected.
So to give a high level overview of how the mod words, the world always generates entirely petrified or empty, with no chunks spawned. A separate dimension exists that generates the actual world. When a chunk is being spawned, an invisible block is temporarily placed in it - this block forces the source chunk in a generation dimension to be loaded, copies across its blocks, waits a short period of time for entities to load/spawn in the generation dimension and then teleports any entities in the source chunk into the overworld (nothing specific about villagers, they shouldn't be treated any different from a cat). Once this is done the force load of the generation chunk is disabled.
I don't otherwise mess with the generation dimensions - they won't be paused while their chunks are loaded, so I'm sure mobs and such can potentially spawn in them. As I mentioned originally it is possible that the villagers might wander off chunk as well before the teleport, but that should be more of an edge case and I don't think I'ld try and fix it (and it is also possible villagers might wander onto the chunk from adjacent loaded chunks, so it should balance out anyway).
I think what I'll do is create a test version for you with the wait time extended to see if that gives enough time for the villagers to load to be teleported. The loading of villagers was definitely an issue during initial implementation so it wouldn't actually surprise me if the delay is spec-dependant.
Does it help to add a latest.log?
It might have if another mod was involved, but we've pretty much eliminated that.
So this version has a new configuration for entity spawn delay. It defaults to 20 ticks (1 second) but can be set up to 100.
Sorry, looks like my build process still has some issues to iron out :/ I'll try and get a working build out.
Thank you, I am currently testing it.
I also go and check if different villages/world seeds act differently or the same. The village that I had generated first funnily had armor stands here and there but no villagers. No idea if they were planned to be ther from another mod. I'll update you once I got more data.
Okay, a cautious "it might be working for me/us".
I tried 2 villages. First one failed. Second one completely succeeded with all our mods active. I recreated the second one two times and had full success as well. I recreated the first village and it fully works there now, as well. I am a bit concerned about why the first attempt on runtime failed. maybe even further increase the max delay? 100 is working a-okay and potentially almost correctly for me now so I hope it stays this way.
Concern: The re-created villages were not the same even though the seed was the same. I have no idea if there is even control over those possible and it's possibly caused by something else. But it can't be helped, I guess.
I'm going to investigate if there is any information I can hook into to inform the delay, rather than just adding more and more time - I believe part of the issue is the entity generation runs in a background thread, and the chunk itself is available before it is complete. Hopefully if I can find a way to do that it will become a lot more deterministic.
I haven't seen villages changing on the same seed (except when using the biome changing chunk spawners, since different villages generate in different biomes).
Alright, take your time. At least we know what's the rough direction. As long as I can use this workaround for now, it'll be bearable. LMK if you find out more, I'm intrigued to understand this, too.
Yeah I suppose one of these many mods is not linked to generation seeds. I won't investigate this though, currently it doesn't matter much to me, anyways. I could just use a backup FTB file if I want to recreate, anyways.
That said, thank you so much for all the help. Have a nice week!
Tried out the new 1.13.0 mechanic. Sadly, it doesn't work for my machine.
latest.log
Tested with my modpack. Will update you once tested single modded. There seems to be some issue, in any case.
Edit: Vanilla is working. Means something is interfering with the mods in my modpack.
Fixed in 1.13.0. I've added some logic that is better able to track whether entities have spawned or not, so the configurable wait isn't needed anymore.
Sorry to keep this hanging I am very busy lately and cannot pick the pack apart for debugging. I will definitely run some tests once I released my Beta build. Just wanted to inform you that I haven't forgotten.
What I am wondering about - it might be illogical, is there a possibility to enable the legacy way from 1.12.x to toggle on/off for experimental reasons? I needed the 1.13.x update for the leaves but now this issue is yet to be fixed. Toggling that back to life would at least temporarily fix the issue and make things a tad more playable for my modpack. I though understand if you don't want to or can't do that. I just wanted to ask if it's possible at all.
I'm trying to avoid having excess config - and in particular having users need to adjust an arcane value for it to work correctly for them. In the first instance I'm going to increase the value again to a higher pause, in addition to the fix. And will look into a better fix.
Late reply, sorry about that. I've been testing the 1.13.3 the last few weeks and it seems like it's a bit better in regard of spawning villagers. I still did have a bunch of unhabitated villages, whereas others were more consistent. I'll keep track of this situation in the 1.13.4 as soon as I get to test it a bit more. I noticed some lag spikes as of late but it could be external, as well. I also got to test the world mender, got a few thoughts about that, I'm gonna open up a new issue on that.
While reworking the chunk spawning process I've found a way to know for sure whether entities are available to copy, so will be fixed in 2.0.0.