Astral Sorcery

Astral Sorcery

63M Downloads

Bug re-appearing from #451 in v1.8.5

Zer0Lyfe opened this issue ยท 17 comments

commented

Minecraft version: 1.12.2
Galacticraft version:
GalacticraftCore-1.12.2-4.0.1.128.jar
MicdoodleCore-1.12.2-4.0.1.128.jar
AS version: 1.8.5 (latest)
Forge version: 14.23.1.2604
Single player (SSP) or Multiplayer (SMP): Singleplayer

Either Galacticraft Core mod or micdoodle mod seems to produce the bug this time. It should be related to this issue: #451
URL from GC issue Post: micdoodle8/Galacticraft#3131

also the Galacticraft builds are from jenkins
URL: https://ci.micdoodle8.com/job/Galacticraft-1.12/
just to point out it is working with Advanced Rocketry and Twilight Forest

I just have a knack of finding this bug where ever i go.
-Zer0Lyfe

commented

If you have a world/server where all dimensions get loaded and you suspect AS to be at fault, look in the same folder where mods/ or config/ and stuff is in, there should be a astralsorcery-folder. in that one there's the gatewayFilter, in there there's the worldFilter. a file in NBT format, listing all dimension ids that are known to need loading due to the gateway handling. You can open it with anything that can open the NBT format, i personally use NBTExplorer. Or if you want me to check that file, send it to me via discord or as link here.

As per 1.8.5's code though, it does respect the IDs listed in there.

commented

Not my mod anymore. GC loads its own planets statically and doesn't unload them from what i can see. AS only hooks into them being loaded, doesn't load them on its own. Proof was given/made in discord, exemplary stacktrace here:

[16:47:07] [Server thread/INFO]: Loaded world -28 loaded by ->
[16:47:07] [Server thread/INFO]: java.lang.Exception
[16:47:07] [Server thread/INFO]: at hellfirepvp.astralsorcery.common.auxiliary.CelestialGatewaySystem.onWorldInit(CelestialGatewaySystem.java:90)
[16:47:07] [Server thread/INFO]: at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_134_CelestialGatewaySystem_onWorldInit_Load.invoke(.dynamic)
[16:47:07] [Server thread/INFO]: at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
[16:47:07] [Server thread/INFO]: at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
[16:47:07] [Server thread/INFO]: at net.minecraftforge.common.DimensionManager.initDimension(DimensionManager.java:246)
[16:47:07] [Server thread/INFO]: at net.minecraft.server.MinecraftServer.func_71218_a(MinecraftServer.java:830)
[16:47:07] [Server thread/INFO]: at micdoodle8.mods.galacticraft.core.util.WorldUtil.registerPlanet(WorldUtil.java:590)
[16:47:07] [Server thread/INFO]: at micdoodle8.mods.galacticraft.core.GalacticraftCore.onServerStarting(GalacticraftCore.java:485)

That specific world-load in question:
https://github.com/micdoodle8/Galacticraft/blob/master/src/main/java/micdoodle8/mods/galacticraft/core/util/WorldUtil.java#L554

commented

@HellFirePvP hi, Galacticraft dev here.

Please can you give me some more explanation because I don't understand the problem ... and seems like you do understand it :)

Looking at Zer0Lyfe video he is saying that there is some factor causing a difficulty change not to "stick" when a world is saved and reloaded in SSP.

Galacticraft code unregisters all its dimensions on server stop or (clientside) on client leaving a server. This is in logs when quitting a game (without AS)
:

[14:42:11] [Server thread/INFO] [FML]: Unloading dimension -28
[14:42:11] [Server thread/INFO] [FML]: Unloading dimension -29
[14:42:11] [Server thread/INFO] [FML]: Unloading dimension -30
[14:42:11] [Server thread/INFO] [FML]: Unloading dimension -31
[14:42:11] [Server thread/INFO] [FML]: Applying holder lookups
[14:42:11] [Server thread/INFO] [FML]: Holder lookups applied
[14:42:11] [Server thread/INFO] [Galacticraft]: Unregistered Dimension: -30
[14:42:11] [Server thread/INFO] [Galacticraft]: Unregistered Dimension: -29
[14:42:11] [Server thread/INFO] [Galacticraft]: Unregistered Dimension: -31
[14:42:11] [Server thread/INFO] [Galacticraft]: Unregistered Dimension: -28

commented

Ignore the first world it wasn't needed sorry i should've pointed it out better

commented

at the time i thought it had something do with it but it wasn't the case

commented

?????

commented

this is how it happens:
Create a world with GC and AS
GC loads in chunks or what ever method you use to load the dims but doesn't unload them after the checking so it causes a problem with AS Celestial gateways and then that causes the difficulty to not be changed

commented

sorry about that Radfast :/ should explained it better

commented

but doesn't unload them after the checking so it causes a problem with AS Celestial gateways

I need more explanation of this part. What problem? See also micdoodle8/Galacticraft#3146 (comment)

commented

@HellFirePvP why do you have a worldfilter file in the .minecraft folder and not in the individual world save folder?

commented

As far as the world loading goes, looking at your responses, you choose to keep the GC planet dimensions loaded at all times. Which is fine with me of course. Just means that i'm not at fault for loading those & keeping them loaded. It was previously mentioned that i am/might be, so you telling me that this is intentional on your end is totally fine. :P

As for the difficulty not saving, have you tried this with either mod alone? Does it really only happen when both mods are used alongside each other? How about dim-mods together with either AS OR GC in general? Does it happen for example with AS and TwilightForest? Does it happen with GC and TwilightForest? Some insight/additional information on that would be great imo.

As for the worldfilter: Potentially some mod might change the save directory of their world. Not likely, but assume you wanted to group all planet-dimensions into their own subfolder. Minecraft's engine would allow that quite easily. So i can't make great assumptions as to where the worlds' folders are without loading the world, which is exactly the thing to avoid doing in my case. So i chose a directory for it which i 1) already have the handling for accessing easily and 2) know that exists either way without loading any additional worlds.

commented

The difficulty saving thing, I have tested it today in 1.12.2 with no other mods except GC and AS, and my results are:

neither mod: difficulty saves OK
GC only: difficulty saves OK
AS only: difficulty saves OK
GC and AS: difficulty does not save

I don't see anything different in logs, GC's logging looks normal even in the last case.

Only tested each situation once, I haven't the patience to test for repeatability.

If you are testing it be careful to return to the game and play for a few seconds, break a block or something, after changing difficulty - if you instantly exit (e.g. immediately Quit from the in-game menu) then the difficulty does not save even with only vanilla+forge.

I have not yet tested AS + Twilight Forest - do you have some time to do that?

BTW on dimension loading, we are not doing anything different from TwilightForest - except we do it onServerStarting but they do it in postInit phase.

commented

oh boy those are some quite weird test cases. so this apparently only happens if both mods are used together... oh what fun... I'm not on my dev computer atm so i'll have to debug test that tomorrow.

commented

hmm so it this is the case for me for some reason: It seen it happens with just GC and the deps so it isn't interaction and i did give it time to load in and waited 5 mins to exit and re-entered the world (after like 2 minutes to let it all unload) and it had reset the difficulty to normal(the default)

so it could be just me

commented

looks at radfast

commented

yes ๐Ÿ˜Š seems that the "difficulty not saving" issue does happen with GC alone, intermittently

I think we can probably stop bothering you here :)


Just to reconfirm on the original post (to help anyone reading this thread in future):

From Galacticraft's side it is intended behaviour for our planet dimensions to be statically loaded when the server starts, and for them to stay loaded until the server stops. So any report of that as being an "issue" is not an issue. Keeping dimensions statically loaded is needed for teleports and other things to work properly. It should not cause any performance (tps) problem on servers at all - if someone thinks it does, probably there is some other issue....

commented

Sooo.... i'ma gonna close this... :P thanks for your help \o/