Faboslav / structurify

Minecraft configuration mod that makes configuring everything related to structures very easy and accessible, eliminating the hassle of creating multiple datapacks.
https://www.curseforge.com/minecraft/mc-mods/structurify
Other
8 stars 2 forks source link

First New World Load each session Connection Disconnect Issue SP #5

Closed desagas closed 1 week ago

desagas commented 2 months ago

Minecraft version information

1.21.1

Mod loader information

NeoForge

Mod loader version information

.34

Mod version information

1.0.3

Expected Behavior

World loads, first time, no disconnect, especially no server disconnect while in a SP session and world load/creation screen.

Actual Behavior

Once Minecraft is opened, creating or recreating a new world, after world creation, but before loading into the actual world, the game immediately kicks us back to the Multiplayer screen, even though we were creating a world through the Singleplayer screen. This only happens one time every time Minecraft is opened, meaning that, if I go back to the Singleplayer screen and create or recreate a new world, it will not happen a second time. If, however, I close Minecraft and open it again, then, it happens on the first new world creation or recreation, every time, without fail.

This tells me that your mod is not properly loading its JSON or other files properly, but they are being loaded, just with an initial error. As this does not happen when it is installed on its own, it is most likely a mixin conflict, however, it is 100% your mod causing issues. The second I remove your mod or disable it, with no other changes what so ever to any other mods, none of the errors nor disconnects happen. Hopefully the compat issue can be solved.

My most recent log: latest.log

The initial structurify happens at line 1911, and the disconnect happens at line 2385. This sequence is identical every single time Minecraft is loaded, and a new world is created or recreated. The exact same disconnect happens: Failed to encode packet ... custom payload. The second world creation happens on line 3364, and !!the only difference!! between this world creation and the first world creation is that structurify does not load a second time, and there is no disconnect.

All the mods are listed somewhere in the log, as I am not going to list them all here.

NOTE: please do not dismiss this up to being apothic's fault, as it says custom payload ... for enchantment not found, as, again, this ONLY happens when your mod is installed, not at any other time.

Reproduction Steps

See above.

Screenshots & files

My debug log if you want. I have no idea what line starts where for initial world loading: debug.log

Faboslav commented 2 months ago

Hello, can you please try this with version:? structurify-neoforge-mc1.21.1-1.0.4.jar.zip (Dont forget to unzip)

Faboslav commented 2 months ago

1.0.4 is officially out, please do let me know if neoforge works, i tested everything along with the Apothic Enchanting and Placebo mods, and it worked :).

desagas commented 2 months ago

First world creation did not disconnect. Seems to be fixed. I will update if this changes. Thank you for the quick work. Great mod!

desagas commented 2 months ago

Well, it loaded fine, however, in the mod config screens, in game, now, no structures show up, what so ever, in both sides of the menu: structure settings, and structure spread settings. Nor has it loaded the json file, which means it is not controlling as defined.

desagas commented 2 months ago

2024-09-01_10 26 55 2024-09-01_10 26 57

Faboslav commented 2 months ago

Can you please provide new logs for this? I am interested in latest.log, so i can see when Structurify did the loading opposite to other mods.

Faboslav commented 2 months ago

Also it would be good if https://www.curseforge.com/minecraft/mc-mods/structurify/files/all?page=1&pageSize=20&version=1.21.1&gameVersionTypeId=6 is used, not the one i uploaded.

If even basic minecraft structures are missing, there should be some kind of error, like Failed to load registry manager. along with the trace stack.

desagas commented 2 months ago

Okay, using this file: https://www.curseforge.com/minecraft/mc-mods/structurify/files/5683497, I tried my whole sequence again, with a freshly delete json, so it creates a brand new one, creating a brand new world. The same thing happened.

latest.log

desagas commented 2 months ago

1197 says: failed to load registry manager

Faboslav commented 2 months ago

SInce you are basically my only source for this kind of bug, i will upload release with more detailed logging, and if you would be so kind and try the same as this, but with the new build, it would be great. Can you also try now without the gtceu(GregTechCEu Modern) mod?

Faboslav commented 2 months ago

Yeah i tried it and with gtceu(GregTechCEu Modern) its the same, not even mc structures.

Faboslav commented 2 months ago

Screenshot 2024-09-01 at 20 26 09 The mod have 119 active issues and 711 closed issues, which is on one side remarkable, but that fault is on side of the mod, i will create the issue and we will see.

desagas commented 2 months ago

Absolutely , just let me know when you have the new logging version, and ill get you the new logs. We know for sure that it is definitely a compat issue, and your mod helps to fix something that drives me crazy, so ill definitely help.

The issue never came up until the 1.0.3 update, at least, not for me, even with all the other mods installed. I know LDLib updated in that same time, but I do not think GTCEu did.

Faboslav commented 2 months ago

I mean, there was a "faulty" logic on my side with the previous version for NeoForge, but now everything seems correctly in place. I dont think that i can get any more useful logs, so no need to release anything new. I posted the issue https://github.com/GregTechCEu/GregTech-Modern/issues/1875 and will do some more debugging, but hopefully together with authors of GregTech-Modern, we can do some kind of fix :).

Faboslav commented 2 months ago

I think that i have a working solution, which should be released with the 1.0.5 version sometime this week.

Faboslav commented 2 months ago

Please let me know if 1.0.5 works, it is already released :).

desagas commented 2 months ago

Everything appears to be working without errors. Thank you! Configs load, screens are all populated, and the JSON loads fine.

Faboslav commented 2 months ago

Sounds great then! I can now continue to implement more features as biome whitelisting (probably connecting the blacklist and whitelist together), closing this now.

desagas commented 2 months ago

@Faboslav Instead of doing an forced biome whitelist, can you make it so that we can select whether or not it is a white or blacklist for each structure? Because, in the recent changes, you just took your mod, in my world, from needing 12 biome blacklists, to needing approx. 280 whitelists, for only a single structure, not talking about all the other structures I would want to modify.

Just my thoughts.

But, I do like the idea that you have made the mod default to all biomes allowed showing up by default. That does help a lot, but, the second we delete even a single biome, all biomes less one then show up in the json.

Faboslav commented 2 months ago

In first iteration i literally made blacklist and whitelist and then saw the flaws of it and connected it into this kind of configuration, i see your point, so this can have two solutions, if the visual of having 280 listed biomes in the select is okay, i can mark the additional biomes as something which indicated its a "add" or "remove". Second solution would be just splitting these two all over again, it really depends.

Faboslav commented 2 months ago

So if the long json is the main problem, i can separate these in the json and it will be probably okay solution on both sides :).

desagas commented 2 months ago

If you look into Minecraft code, and some other games out there, they sometimes rely on the seed to generate all !unchanged! parts of the game, and the identify user changes only. So, your first idea of having something that says "added" or something like that would make sense. It might be a lot of work, though.

I am the author of the biome shifting prevention mod called Biome ID Fixer in 1.16.5, so, I understand how much of a pain this can be to implement and change around when going through the registries.

Faboslav commented 2 months ago

I think that i have a clear solution to this just in my head, so I will try to keep the GUI as it is right now and split the json into blacklisted_biomes and whitelisted_biomes/added_biomes dont know the naming yet.

Faboslav commented 2 months ago

Please let me know, if this is okay(dont forget to unzip):

structurify-neoforge-mc1.21.1-1.0.8.jar.zip

desagas commented 2 months ago

That is actually much much better, IMO. Very clean.

As long as it still counts the biomes that are no longer in the JSON, but are in the default mod settings, it is perfect. Ill test it out and let you know how things workout.

desagas commented 2 months ago

It will still cause a large json file, if the defaults are against all biomes, meaning, by default, if lets say "ruined portals," which can spawn in all biomes, I want it to only spawn in the warm ocean, so, I remove all, and add warm ocean ... but, I really like this.

"whitelisted_biomes": ["minecraft:warm_ocean"]

This is the json for just the ruined portal, it would be nice if all the following could happen with only the proceeding line, rather than all of the following:

    {
      "name": "minecraft:ruined_portal",
      "is_disabled": false,
      "enable_biome_check": false,
      "biome_check_distance": 0,
      "whitelisted_biomes": [
        "minecraft:warm_ocean"
      ],
      "blacklisted_biomes": [
        "minecraft:beach",
        "minecraft:snowy_beach",
        "biomesoplenty:dune_beach",
        "biomesoplenty:gravel_beach",
        "biomeswevegone:basalt_barrera",
        "biomeswevegone:dacite_shore",
        "biomeswevegone:rainbow_beach",
        "terralith:gravel_beach",
        "regions_unexplored:gravel_beach",
        "regions_unexplored:grassy_beach",
        "minecraft:river",
        "minecraft:frozen_river",
        "terralith:warm_river",
        "regions_unexplored:cold_river",
        "regions_unexplored:muddy_river",
        "regions_unexplored:tropical_river",
        "minecraft:taiga",
        "minecraft:snowy_taiga",
        "minecraft:old_growth_pine_taiga",
        "minecraft:old_growth_spruce_taiga",
        "biomesoplenty:bog",
        "biomesoplenty:coniferous_forest",
        "biomesoplenty:dead_forest",
        "biomesoplenty:field",
        "biomesoplenty:fir_clearing",
        "biomesoplenty:hot_springs",
        "biomesoplenty:maple_woods",
        "biomesoplenty:old_growth_dead_forest",
        "biomesoplenty:ominous_woods",
        "biomesoplenty:tundra",
        "biomeswevegone:frosted_taiga",
        "biomeswevegone:maple_taiga",
        "terralith:alpine_grove",
        "terralith:birch_taiga",
        "terralith:forested_highlands",
        "terralith:shield",
        "terralith:siberian_grove",
        "terralith:siberian_taiga",
        "terralith:snowy_maple_forest",
        "terralith:snowy_shield",
        "terralith:wintry_forest",
        "terralith:wintry_lowlands",
        "regions_unexplored:blackwood_taiga",
        "regions_unexplored:boreal_taiga",
        "regions_unexplored:golden_boreal_taiga",
        "regions_unexplored:pine_taiga",
        "regions_unexplored:redwoods",
        "regions_unexplored:sparse_redwoods",
        "minecraft:forest",
        "minecraft:flower_forest",
        "minecraft:birch_forest",
        "minecraft:old_growth_birch_forest",
        "minecraft:dark_forest",
        "minecraft:grove",
        "ars_nouveau:archwood_forest",
        "ars_elemental:flashing_forest",
        "ars_elemental:blazing_forest",
        "ars_elemental:cascading_forest",
        "ars_elemental:flourishing_forest",
        "biomesoplenty:aspen_glade",
        "biomesoplenty:jacaranda_glade",
        "biomesoplenty:mediterranean_forest",
        "biomesoplenty:mystic_grove",
        "biomesoplenty:orchard",
        "biomesoplenty:pumpkin_patch",
        "biomesoplenty:redwood_forest",
        "biomesoplenty:seasonal_forest",
        "biomesoplenty:woodland",
        "biomeswevegone:aspen_boreal",
        "biomeswevegone:black_forest",
        "biomeswevegone:canadian_shield",
        "biomeswevegone:cika_woods",
        "biomeswevegone:coniferous_forest",
        "biomeswevegone:dacite_ridges",
        "biomeswevegone:ebony_woods",
        "biomeswevegone:enchanted_tangle",
        "biomeswevegone:eroded_borealis",
        "biomeswevegone:forgotten_forest",
        "biomeswevegone:frosted_coniferous_forest",
        "biomeswevegone:howling_peaks",
        "biomeswevegone:orchard",
        "biomeswevegone:overgrowth_woodlands",
        "biomeswevegone:redwood_thicket",
        "biomeswevegone:sakura_grove",
        "biomeswevegone:skyrise_vale",
        "biomeswevegone:weeping_witch_forest",
        "biomeswevegone:zelkova_forest",
        "terralith:blooming_valley",
        "terralith:cloud_forest",
        "terralith:lavender_forest",
        "terralith:lavender_valley",
        "terralith:moonlight_grove",
        "terralith:moonlight_valley",
        "terralith:sakura_grove",
        "terralith:sakura_valley",
        "terralith:snowy_cherry_grove",
        "terralith:temperate_highlands",
        "terralith:yosemite_lowlands",
        "regions_unexplored:alpha_grove",
        "regions_unexplored:autumnal_maple_forest",
        "regions_unexplored:bamboo_forest",
        "regions_unexplored:magnolia_woodland",
        "regions_unexplored:deciduous_forest",
        "regions_unexplored:maple_forest",
        "regions_unexplored:mauve_hills",
        "regions_unexplored:orchard",
        "regions_unexplored:silver_birch_forest",
        "regions_unexplored:temperate_grove",
        "regions_unexplored:willow_forest",
        "minecraft:mushroom_fields",
        "minecraft:ice_spikes",
        "minecraft:dripstone_caves",
        "minecraft:lush_caves",
        "minecraft:savanna",
        "minecraft:snowy_plains",
        "minecraft:plains",
        "minecraft:sunflower_plains",
        "biomesoplenty:auroral_garden",
        "biomesoplenty:dryland",
        "biomesoplenty:scrubland",
        "biomesoplenty:grassland",
        "biomesoplenty:lavender_field",
        "biomesoplenty:overgrown_greens",
        "biomesoplenty:pasture",
        "biomesoplenty:prairie",
        "biomesoplenty:rocky_shrubland",
        "biomesoplenty:shrubland",
        "biomesoplenty:snowy_coniferous_forest",
        "biomesoplenty:snowy_fir_clearing",
        "biomesoplenty:snowy_maple_woods",
        "terralith:cave/andesite_caves",
        "terralith:cave/diorite_caves",
        "terralith:cave/fungal_caves",
        "terralith:cave/granite_caves",
        "terralith:cave/infested_caves",
        "terralith:cave/thermal_caves",
        "terralith:cave/underground_jungle",
        "terralith:alpine_highlands",
        "terralith:arid_highlands",
        "terralith:brushland",
        "terralith:highlands",
        "terralith:steppe",
        "regions_unexplored:poppy_fields",
        "regions_unexplored:shrubland",
        "regions_unexplored:grassland",
        "regions_unexplored:steppe",
        "regions_unexplored:prairie",
        "regions_unexplored:barley_fields",
        "regions_unexplored:flower_fields",
        "regions_unexplored:rocky_meadow",
        "regions_unexplored:redstone_caves",
        "regions_unexplored:ancient_delta",
        "regions_unexplored:prismachasm",
        "regions_unexplored:scorching_caves",
        "regions_unexplored:bioshroom_caves"
      ]
    }
desagas commented 2 months ago

What if you added a config screen toggle below: biome check distance (in blocks) that toggles a use mod's default biome list for this structure (true or false), where if toggled on, by default, it will do exactly as it is doing now, which is working amazingly. And, if toggled off, it will allow you to select a forth toggle this structure is whitelisted in the biomes listed below (true or false): meaning that, in whitelist mode, it will generate the structure in only the whitelisted biomes, regardless of mode defaults; and if in blacklist mode, it will generate in all biomes except for those blacklisted, again, regardless of the defaults?

This might reduce the amount of line by line parsing needed, as well as drastically reduce the json file size?

Faboslav commented 2 months ago

Yeah, i will try to come up with some solution to this, either the booleans you mentioned or some kind of "biome list mode"

Faboslav commented 2 months ago

I still have this in my head, i just need to do some work on the other mods first, sorry for the delay :).

Faboslav commented 3 weeks ago

I know it's a long time already, but for now i just pushed the whitelisted_biomes/blacklisted_biomes "solution" with 1.0.8 version of the mod, since i dont really have much time right now, sorry :)

desagas commented 3 weeks ago

Oh, hahah. Nice. I can’t wait to check it out! Not a big issue anyways, definitely not worth huge amounts of time.

Faboslav commented 1 week ago

Since i fixed the original problem, i will close this for now with a note in my backlog for the future improvements, thanks for all of the feedback as it already helped with a lot of things!