Just Enough Dimensions

Just Enough Dimensions

4M Downloads

World Properties has a null UUID

aaronegger opened this issue ยท 20 comments

commented

Hello,

i've encountered an issue creating a new dimension.

I took this example:
Here is an example how you would create a new Biomes O' Plenty dimension as dimension ID 6, with a world seed "Super Seed":

/jed dimbuilder clear (optional, depends on if you have older settings in memory that you don't want to keep)
/jed dimbuilder dimtype 6 tmpname _dim6 false WorldProviderSurfaceJED
/jed dimbuilder set name Real Name Dim 6
/jed dimbuilder set-onetime generatorName BIOMESOP
/jed dimbuilder set-onetime RandomSeed Super Seed
/jed dimbuilder create-as 6 (this will save the settings to the dimensions.json and register the dimension as ID 6)
/tpj 6 (teleports you to the spawn point of the newly created dimension 6)

and everything seems to work until the teleport command.

Trying to teleport to the new dimension results in an error.
I get "Error occured while executing command: World Properties has a null UUID".

Does this sound familiar to you?

Some info to our server: https://gist.github.com/aaronegger/02bd341a85a8573076d69e7a8684bb90

commented

@Dave-Driesen
Hope all has been well. So finally had some time to re-visit this. I must be missing a step or 2.
Created 2 Forge/Minecraft servers, both with JED, but 1 with SpongeForge.
On the JED only server, I do my /jed dimbuilder commands as posted earlier to create DIM8, log into the server from a client and teleport myself so that the DIM8 actually gets created on disk.
Copy DIM8 folder to other minecraft directory that has the SpongeForge mod as well.
Start Forge/Minecraft and try to teleport myself, which of course results in error. But now I have the level_sponge.dat file, however it is empty..
So what's the proper steps ? LOL
Thanks!
-Frank

commented

If any of you use Discord, and would like to help me test the changes I'm making to JED that should hopefully help with Sponge-compatibility, you can hop on to my Discord server here: https://discord.gg/2FgywHj
I'd really appreciate any help testing the next version with Sponge, using your specific use cases/configurations. I'm hoping to have the first test build available very soon.

commented

@maruohon Never used Discord before, but went ahead and joined that link. Discord reminds me of Slack and the old IRC days ... Anyways I'm there and in #Jed channel.

commented

@Fboyd
Wrt the level_sponge.dat, I've not encountered the file being empty.. It always had (partially incorrect) values, which could then be aligned with JED.

P.S. The working config is on 1.10.2 running spongeforge-1.10.2-2281-5.2.0-BETA-2597 which is not current but had a high compatibility at the time of deployment.

commented

Thanks -- I have tested the 1.10.2 version (justenoughdimensions-1.10.2-1.6.0-dev.20171107.172358.jar) and my impression is, this does what I want it to do without issues.

Will test a bit further, I also do not use most of these options :)

commented

@Dave-Driesen I have now made test builds of the next release available here: https://masa.dy.fi/tmp/minecraft/jed/1.6.0-dev/

If you are still using JED, and in particular under Sponge, then I'd appreciate it if you give it a try. If there are no issues, then I'll upload that version as the official 1.6.0 in the coming days.

Note that there are also a few configuration key changes/renames in that version, these should be all of them (note also the capitalization changes):

    * Changed or moved config keys:
        - disableteleportingfrom    => disable_teleporting_from
        - disableteleportingto      => disable_teleporting_to
        - vanilladimensiontype      => vanilla_dimensiontype
        - worldinfo.JED             => jed
        - colors                    => jed.Colors
    * Changed commands:
        - unloademptydimensions     => unload-empty-dimensions
        - listloadeddimensions      => list-loaded-dimensions
        - listregisteddimensions    => list-registed-dimensions
        - reloadmainconfig          => reload-main-config
    * Changed command args:
        - unloademptydimensions arg@1: true => unload-chunks

So most notably, the old JED object which was inside worldinfo, is now instead at the "main level"/same level as worldinfo ie. inside the dimension entry directly, and now in all lower case.

Also, when running under Sponge, there is one important difference: the generatorName value must be inside a worldinfo section/object, it's not enough to be inside a worldinfo_onetime, in that case it ends up resetting on server restart. The other values do seem to persist (I only really tested RandomSeed and generatorOptions though.)

commented

All my comments have been on the Discord server. But for everyone to see, I've had no issues with the latest update that @maruohon has made. Everything is working wonderfully :-)

commented

Seems to work with spongeforge 1.10.2-2477

Issues ran into using latest dev 1.6.0 builds

  • Sky/fog/time settings not working (with or without spongeforge)

Using this config on 1.5.4 https://pastebin.com/N3nSSmTp

Referenced on discord for discussion

commented

Oh, so this still happens with the latest version released today? That's unfortunate... It had a change that had the potential to fix this issue, but I guess no such luck then :/

So basically yes, I have seen this before, and it's caused by Sponge not liking something that JED is doing.
Could you enable the verbose logging option in JED, and get me the fml-server-latest.log from such a server start where this error occurs?

commented

Seeing this also, with JED 1.5.4.

It looks like sponge's world importing code is not playing nice with the JED dimension types.

Here's things I noticed while trying to resolve this:

First ... Without sponge, dimensions get created as ./world/DIM8 ./world/DIM9 etc. which makes perfect sense.

But with sponge, the application all of a sudden insists on finding dimensions in ./world/[dimension name] where [dimension name] seems to be pulled from the level.dat file in that same dimension folder. i.e. the name of the folder must then match the name of the level (and is case sensitive).

Second, looking at level_sponge.dat, we see dimensionType listed as "justenoughdimensions:dimXX".

But at launch time, when the sponge world importing code runs, we see this:

[Sponge]: World [DIM11] (DIM11) has specified dimension type that is not registered. Skipping...
[Sponge]: World [DIM12] (DIM12) has specified dimension type that is not registered. Skipping...
[Sponge]: World [DIM13] (DIM13) has specified dimension type that is not registered. Skipping...
[Sponge]: World [DIM14] (DIM14) has specified dimension type that is not registered. Skipping...
[Sponge]: World [DIM15] (DIM15) has specified dimension type that is not registered. Skipping...
[Sponge]: World [DIM7] (DIM7) has specified dimension type that is not registered. Skipping...
[Sponge]: World [DIM9] (DIM9) has specified dimension type that is not registered. Skipping...

So looks like sponge is not accepting the worlds due to the dimension type.
What exactly is being skipped? No idea. But it sounds like it could explain why World properties is NULL..

Grtz,
Dave

commented

I actually looked briefly into what Sponge is doing related to this, and the null world properties comes from the fact that Sponge has their own WorldProperties system, basically replacing the vanilla WorldInfo object for each world. But when JED uses WorldInfo overrides, it then ends up overriding Sponge's WorldProperties, and then stuff breaks.

This means that the JED WorldInfo overrides are simply not compatible with Sponge. I would have to make a separate version of JED for Sponge, using their WorldProperties system (which is actually something I might do, if I ever get the time to look into it)

As to the dimension save directories... yeah, I believe Sponge uses a different directory layout. I haven't really ever used Sponge except when I quickly tested it with JED a while back, so I don't know/remember exactly how it goes, but based on what you said, I guess it's simply world/dimname/ or something like that.

commented

Thanks, it all makes a lot more sense now.

I'm not sure making a separate version just for sponge is warranted. One of the best things about JED and Ender Utilities is exactly that you get Dimensions, portals, etc directly in Forge without the need for sponge.

Good news though. There is a way you can make JED and Sponge work together. Here's how I did it:

  • Open up ./world/DIMxx/level_sponge.dat in an NBT editor
  • Set dimensionType to "minecraft:overworld"
  • Set dimensionID to match JED dimension ID, i.e. 7 for DIM7 etc.
    While yours is set as defined by the user, sponge seems to just allocate on next-available basis.
  • Open up ./world/DIMxx/level.dat in NBT editor
  • Set levelName to match JED dimension directory name, i.e. DIM7 for ./world/DIM7 (all caps)

When you run the server and log in, you will see that everything works just as before.

One noteworthy side effect though.. If you look at the server startup log or console, you may see that Sponge prepares all dimensions at startup by default. There are flags you can set to prevent this. These are set in /config/sponge/worlds/minecraft/overworld/DIMxx/world.conf:

  • generate-spawn-on-load
  • keep-spawn-loaded
  • load-on-startup

So.. Long story short, one way to align JED with Sponge (not saying you should) is using minecraft:overworld as dimension type, somehow match Sponge's dimensionID with yours, and align the levelName with the ./world/Dimxx directory name.

Or you could also just document it.. It's not so hard for ppl to set up once you know how.

Grtz,
Dave

commented

Hmm, interesting. How does it work when it comes to any per-dimension customizations though? Did you have WorldInfo overrides enabled in the above case? I'm guessing not since that breaks stuff enough that it would crash or prevent teleporting to such dimensions, right? So without WorldInfo overrides JED can't really do any customization in the dimension, you can only select one of the Overworld, Nether or End type WorldProviders, and that's it. You can't use separate seeds, or give any generatorOptions or JED-specific options etc.

So in my opinion, in general I wouldn't exactly recommend using JED when Sponge is present, because even if it is possible to some extent as you indicated, it seems to involve lots of manual steps... It's nice to know it can be done but... I'll still probably look into making a Sponge-specific version/plugin at some point, if only I find the free time and motivation to do so :)

commented

No WorldInfo overrides. Indeed with WorldInfo Overrides enabled, teleporting causes a very ugly crash.

Hmm you're right of course, the generator has reverted to default. Setting the overworld dimension type basically sidelines JED which is not the best answer.

Maybe some more digging will yield a solution. Unlike JED, the dimension registration error does not pop for MoCreatures (which also registers a dimension of its own), so I'm going to rattle both and hope something falls out, and until then set BOP as system-wide default generator.

commented

Hi, I wish I knew Java to help out, but that is one language I've never taken the time to learn.
@maruohon I'm guessing by looking at your shared repo's you haven't had any time to make a Sponge specific version of JED ?
@Dave-Driesen Question for ya, So can I do the following to build the dimension then the manual steps you said to get the result I'm looking for ?

/jed dimbuilder clear
/jed dimbuilder dimtype 8 tmpname _dim8 false WorldProviderSurface
/jed dimbuilder set name Test8
/jed dimbuilder set-onetime GameType 3
/jed dimbuilder set-onetime generatorName customized
/jed dimbuilder set-onetime generatorOptions {"coordinateScale":684.412,"heightScale":684.412,"lowerLimitScale":512.0,"upperLimitScale":512.0,"depthNoiseScaleX":200.0,"depthNoiseScaleZ":200.0,"depthNoiseScaleExponent":0.5,"mainNoiseScaleX":80.0,"mainNoiseScaleY":160.0,"mainNoiseScaleZ":80.0,"baseSize":8.5,"stretchY":12.0,"biomeDepthWeight":1.0,"biomeDepthOffset":0.0,"biomeScaleWeight":1.0,"biomeScaleOffset":0.0,"seaLevel":63,"useCaves":true,"useDungeons":true,"dungeonChance":8,"useStrongholds":true,"useVillages":true,"useMineShafts":true,"useTemples":true,"useMonuments":true,"useMansions":true,"useRavines":true,"useWaterLakes":true,"waterLakeChance":4,"useLavaLakes":true,"lavaLakeChance":80,"useLavaOceans":false,"fixedBiome":1,"biomeSize":4,"riverSize":4,"dirtSize":33,"dirtCount":10,"dirtMinHeight":0,"dirtMaxHeight":256,"gravelSize":33,"gravelCount":8,"gravelMinHeight":0,"gravelMaxHeight":256,"graniteSize":33,"graniteCount":10,"graniteMinHeight":0,"graniteMaxHeight":80,"dioriteSize":33,"dioriteCount":10,"dioriteMinHeight":0,"dioriteMaxHeight":80,"andesiteSize":33,"andesiteCount":10,"andesiteMinHeight":0,"andesiteMaxHeight":80,"coalSize":17,"coalCount":20,"coalMinHeight":0,"coalMaxHeight":128,"ironSize":9,"ironCount":20,"ironMinHeight":0,"ironMaxHeight":64,"goldSize":9,"goldCount":2,"goldMinHeight":0,"goldMaxHeight":32,"redstoneSize":8,"redstoneCount":8,"redstoneMinHeight":0,"redstoneMaxHeight":16,"diamondSize":8,"diamondCount":1,"diamondMinHeight":0,"diamondMaxHeight":16,"lapisSize":7,"lapisCount":1,"lapisCenterHeight":16,"lapisSpread":16}
/jed dimbuilder set-onetime RandomSeed 8957019768167698787
/jed dimbuilder set-onetime keepInventory true
/jed dimbuilder set-onetime mobGriefing false
/jed dimbuilder set ForceGameMode true
/jed dimbuilder create-as 8

Thanks!

commented

Nope, no Sponge version yet. However I started on some refactoring related to how/where I'm storing my custom properties, and I have an idea that might make it Sponge-compatible, but I'll have to take another look at how Sponge does some of their stuff. But I'm pretty sure at least the crashes should go away, but whether or not some of the functionality will be intact when Sponge is present, that I'm not sure of yet.

commented

Yes -- after issuing those commands you should be able to open up the generated dimension's .dat files and modify the specified values. I do the same thing, albeit far more basic.

Looks like we're in the exact same boat wrt LuckPerms and grief.. Sponge really does add a lot of overhead :( working with pure JED is much faster and memory efficient. It all works, but boy does it hurt.

commented

Gotcha. Welp I'll alpha / beta test for you for sure. Out of the different world/dimension generators I found, JED was the best, easiest to use and understand. I'm only using Sponge for Luckperms and griefprevention because I couldn't find any mods that worked as well as them.

commented

@Dave-Driesen Hmm... I did the JED dimbuilder commands, then teleported to the world so it would start getting created, of course errored out like we're used to. However editing the level.dat file, all my settings, seed, gametype / options etc were wrong.
Do I need to generate the world without the sponge mod first ? Or did I miss a step ?
I assume you tried the Sponge ProjectWorlds and found it to be basically useless like me ? Can't get it to work period ..
Thanks!

commented

Best indeed to generate the dimension without sponge enabled.. I do this on a separate (non-sponge) server but it does not need to be separate if you disable the mod etc.

Come to think of it, indeed we discussed earlier in the thread: while this is a reversible method to allow your sponge server to load the dimensions and to freely teleport around in them, JED will not be able to set dimension-specific parameters on the sponge-enabled server. During import (at startup), sponge disregards those and overrides them with its own values.. Don't recall where those originate or how to gimp them. (I used EssentialCmds a lot but that is now - you guessed it - discontinued!)

For generator, I did work around this by simply modifying the global generator (which in this case was simply BoP) but obviously this is inferior to dimension-specific generators. Looking at the complexity of your dimbuilder script, you'll have a much harder time reaching a satisfactory solution in that respect.

ProjectWorlds was a dead end yes, but mostly because it would introduce yet another sponge dependency, and there was a requirement to allow backing out of sponge at any time and revert to pure JED. It also did involve a lot of manual steps in editing the .dat files.