Just Enough Dimensions

Just Enough Dimensions

4M Downloads

Spawning Unreliably with Recurrent Complex and JED

Boolyman opened this issue ยท 18 comments

commented

I have JED producing a Wasteland biome dimension, and Recurrent Complex creating a small building that you spawn in when you start in said dimension. Unfortunately it is very intermittent. I will load the world and be placed underground in some cave, instead of at ground height... and there is no recurrent complex spawn building. So I will exit, and create a new world, and without making any changes, it will work properly, and I will be spawned at ground level inside of the recurrent complex spawn building. Can you think of any reason why this would be intermittent? How does JED handle structures spawning at the same time that the dimension is being generated for the first time?

commented

Is this in 1.5.x or 1.6.0 dev builds? Do you have WorldInfo overrides enabled for that dimension?

Are you sure there was no Recurrent Complex building anywhere? Was it supposed to be directly at the spawn point of that dimension? Does ReC abort the structure generation if the spawn point is inside the ground?

Basically without WorldInfo overrides enabled, you would get the exact same spawn point in the custom dimension than what the overworld has. This may be inside the ground depending on the terrain height in the dimension at that location. The /tpj <dimid> form of the JED TP command also takes you directly to the spawn point, which may be even inside blocks. But with WorldInfo overrides enabled, the dimension is then able to have its own separate spawn point, and JED will search for a suitable one when the dimension is first created.

To just flip on WorldInfo overrides for the custom dimension, flip on the corresponding option in the main config, and then add "worldinfo_onetime": {} to the dimension's config entry.

commented

Nope, keeploaded doesn't affect this, it just indicates whether the spawn chunks are allowed to unload in that dimension. And the config seems fine (although it's a bit hard to read without the code tag and proper indentation).

Can you describe again where it is that you spawn in that dimension? Is it inside caves/underground but in a "safe" place, ie. in air blocks? Or have you also spawned inside blocks? How do you get to that dimension, are you using the /tpj command to teleport to the dimension (spawn)? Or have you set that dimension as the initial spawn dimension?

I made some further spawn point search changes/improvements in the 1.6.0 dev builds at one point, although I don't exactly remember what those were. I think those might not be on the builds on CF yet though. How were the dev builds worse exactly? Generally speaking they should work a lot better in many ways, and I mostly consider the 1.5.x versions broken in comparison.

There are newer dev builds here if you want to try out the latest one: https://pena2.dy.fi/tmp/minecraft/jed/1.6.0-dev/ and the list of changes and additions here: https://pastebin.com/raw/28jeWZyv . In your config above, you'd just need to move the JED object out from the worldinfo_onetime ie. to the same level inside the dimension entry, and rename it to lowercase jed.

commented

It's version 1.5.5. I tried a few of your more recent Alpha builds and the randomness of the spawn generating was even worse. Yes, I am sure there was no recurrent complex building anywhere. It is a spawn structure set to be placed at ground level, and it will clear any land in the general area if its obstructed.

Worldinfo is already set to true in the main config. Below is my syntax for this dimension, did I apply your suggestion properly?
{
"dimensions": [
{
"dim": 5,
"biome": "biomesoplenty:wasteland",
"dimensiontype": {
"id": 5,
"name": "The After",
"suffix": "_dim5",
"keeploaded": false,
"worldprovider": "WorldProviderSurfaceJED"
},
"worldinfo_onetime": {
"generatorName": "BIOMESOP",
"JED": {
"CustomDayCycle": true,
"DayLength": 14400,
"NightLength": 19200
}
}
}
]
}

commented

I applied the "worldinfo_onetime" syntax as mentioned above, and encountered the same problem. Could it have anything to do with me having the "keep loaded" option set to false? I just cant imagine that factors in when the player is spawning into that dimension at the beginning of the game.

commented

The player starts the modpack in the custom dimension. Thats why I am wondering if it is an issue with the order that world gen happens at the start of a game? And even when the spawn structure does not spawn in, I still spawn in right on the ground... not inside blocks or underground.

I understand this may not be an issue related to you... it could be recurrent complex, which would suck for me because that dev never responds to issue tracker.

commented

Aha, you spawn there. The vanilla spawn algorithm works differently, it tries to find a randomized spawn point near the world spawn. So although JED might be setting the world spawn correctly, the vanilla spawn algorithm might randomize it to another place nearby. You can avoid the spawn fuzz by setting the spawnRadius (I think it was called that?) GameRule to 0 in that dimension via the JED config. That should make the player spawn at the exact point JED has set as the world spawn.

However, that still doesn't explain why ReC structures wouldn't generate... I've heard of similar issues before where ReC structure generation was failing randomly. Unfortunately I don't really know anything about ReC, so I can't help there.

But if you simply need a spawn structure in this case, then the development version of World Primer has a /worldprimer place-structure command which can easily be used to place a structure at the dimension's spawn when the dimension loads for the first time. If you want to try it out, the latest dev build is here: https://pena2.dy.fi/tmp/minecraft/worldprimer-1.12.2-0.6.0-dev.20171201.034137.jar

The configuration/commands for that would be something like this:
Enable dimension load tracking (I think it's also enabled by default?) and the dimension loading commands.
Then in the dimensionLoadingCommands, add this:

worldprimer-dim-command-nth 1 8 worldprimer-load-blocks {SPAWN_X}-16 {SPAWN_Z}-16 {SPAWN_X}+16 {SPAWN_Z}+16
worldprimer-dim-command-nth 1 8 worldprimer place-structure {SPAWN_X} {SPAWN_Y} {SPAWN_Z} foobar none none centered

Here 1 means on the first load of the dimension, 8 is your dimension ID, and foobar is the filename of your structure (without the suffix). The structure file goes in config/worldprimer/structures/foobar.nbt, and you can create it using the vanilla Structure Blocks, or I think also using Schematica in the recent versions (save in the structure/NBT format whatever it called it, basically the vanilla structure format). Adjust the loaded block range if your structure is larger than that, basically you need to first load all the chunks touched by it for this to work.

commented

I rolled it back to the December 27th update, instead of the March update and its working to at least generate the dimension. Im not gonna fiddle with it, I have to get this pack out in 2 weeks, and still have a lot to do. Thanks for your help.

commented

Does the spawning and ReC generation still not work properly?

commented

Gotcha. I appreciate the help.

commented

I tried the Alpha you linked me and I can't even get the dimension to register. It starts me in the overworld, like JED isnt even installed. Despite there being a dimension file that you have already said is correct. And the config file states that dimension 5 is supposed to be the spawn dimension.

This is so frustrating.

commented

Enable the verbose logging option and see what gets printed to the console. Any errors? Also try the /jed list-registered-dimensions command to see if the dimension is registered or not. Did you modify the dimension config for the dev version? Did you leave a trailing comma inside the worldinfo_onetime if you moved the JED object from it? That would break the entire dimension config, because the JSON parser is very strict.

commented

Correct, its still intermittent.

commented

I am not versed enough with your json syntax file to add and remove lines without fear of putting something in the wrong spot... between the wrong brackets, etc... and then going into another broken loop of not spawning the structure at all. So no, I did not try the spawn radius, gamerule 0 thing. If you wouldnt mind showing me exactly how that fits into the syntax I pasted up above, I will try it. But I dont want to get into a loop of completely broken spawning again. The structure is spawning in at least 70% of the time right now, and switching to World Primer, something that I am not even sure how to use, is just too much of a risk when I am trying to release the pack in 3 weeks. I have no doubt that the problem lies with Recurrent Complex, but I can not afford to stop production and learn how to use and implement a completely new program that may or may not have similar problems.

Unfortunately the work around my have to be a message on the pack saying "If the structure doesn't spawn when you load your world, try again." It sucks, but so does having mod devs that don't respond to issue trackers. You have been more than helpful, and I appreciate your attempts to resolve this. But again, without Recurrent Complex fixing the issue, I dont know if there is a resolution on such short notice.

commented

The spawning part should be fixable with JED. Did you try setting the spawnRadius GameRule to 0? That should cause you to always spawn/respawn at the exact spawn point of that dimension, which should be on the surface if and when the WorldInfo override is enabled in that dimension.

And for the spawn structure, did you try out the dev build of World Primer?

commented

Here is the config you posted above, with the GameRule added:

As to World Primer... I'm not trying to forcibly push you to use it, I'm just fairly certain that it would solve your spawn structure issue. The mod is pretty simple, it only has the main config file. And in there you can enable various "command types", for example running commands when dimensions get loaded, and then you specify the commands to run.

As to this specific use case, I already explained above all you would need to do/configure in World Primer to get a structure be placed when the dimension loads for the first time. Basically you are saying to it "I want to run these two commands when dimension 8 loads for the very first time", and the commands being:

  • First load all the chunks around the spawn point in the given radius
  • Then run the place-structure command to place this given structure in the world at the dimension's spawn point

I'm not sure why I used dimension 8 in the example, in your case it would be dimension 5, but anyway...

commented

I know this is yet more vague information that you may not be able to do anything with. But I wanted to let you know that we are sporadically getting issues with no Ore generating in the world when we load into the JED dimension...In addition to no starting structure. I didnt notice this before, because as the pack dev, I wasnt really going mining.

Last time we talked, I was very inclined to point fingers at Recurrent Complex because of the starting structure issue... but the Ore spawning is handled by a completely unrelated mod. So now I am not so sure it isn't JED related. Its very sporadic... it will happen twice in a row, then we cant duplicate the issue again for days.... then out of nowhere it will happen again... no spawn structure, no ore generating in the world.

There are no crash reports, since it doesnt crash the game. But I could send you my modpack as is, and you can try to generate a few worlds, and see if the logs show you anything?

commented

Hmm. So...

  • Does the ReC spawn structure being missing issue and the ores not generating always happen at the same time?
  • Which mod or mods are doing your ore generation, and are all ores missing or only from a specific generator mod?
  • How many JED dimensions do you have, and does this happen in all of them?

Yeah I guess I would have to try the entire pack as it is to be able to figure out anything... Then I would also need some kind of a list of the ores that I'm supposed to be seeing in the dimension.

(If you use Discord, then this might go faster trying to figure out there. My server is linked on the JED CF page.)

commented

The ReC Spawn and missing ore are not 100% linked, but they do happen together quite often. I'd say about 70% of the time that one is missing, the other is as well. COFH is handling all of my ore spawning. The only ores in that dimension are Iron, Copper, Nickel, and Redstone. But things like Andesite and Granite don't generate when this error happens as well.

Yes, this is the only JED dimension I am using. I will send you the pack link in discord.