Jump to content

[1.19.2] Config sometimes correcting itself with no reason


aut1sto

Recommended Posts

Posted (edited)

After changing value in config it reloads and works fine, but sometimes it spams "List on key X is deemed to need correction. It is null, not a list, or an empty list. Modders, consider defineListAllowEmpty?" about every key and recreating config. 
Here's files: https://gist.github.com/Aaur1s/4c9fee20fff6463f68c6bff62e634050
Using defineListAllowEmpty didn't resolve the problem.
I checked with debug mode and seems like all of the keys are null. Am I doing something wrong?

Edited by aut1sto
Link to comment
Share on other sites

Basically, you are adding a reload listener that can have its data repopulated using the `/reload` command. Since it looks like your data is all server related, you would need to listen to `AddReloadListenerEvent` on the Forge event bus and register a `PreparableReloadListener`. The reload listener will be responsible for reading your data into the game whenever the world is opened or the `/reload` command is called.

I would recommend using `SimpleJsonResourceReloadListener` instead of implementing your own, as then you just need to implement the storage system and relevant access points from your mod.

However, I must ask, what is the point of your configurations? Looking at it even more closely, it looks more related to feature spawn rates in biomes.

Link to comment
Share on other sites

It's config for quarry, basically list of ores/resources for biomes and height of it. Every tick quarry picks random rarity and random ore from list from config, however if resources didn't exist (for ex. ore from thermal, but no thermal mod installed) it rerolls resource. I tried to recieve random resource from chunk generator, but failed and wrote all of ores in config. Maybe you know the way of getting resource from generator?

Link to comment
Share on other sites

6 hours ago, aut1sto said:

I tried to recieve random resource from chunk generator, but failed and wrote all of ores in config. Maybe you know the way of getting resource from generator?

Is the ore or resource a specific block? Additionally, when you mean chunk generator in this context, do you mean you are trying to generate a list of these ores and resources within the positions inside the chunk itself? Are you trying to grab all the ore features that are generated within a chunk?

Link to comment
Share on other sites

Posted (edited)

I need go get block that will be generated at random X, specific Y, random Z and specific biome (but not generate it in world or e.t.c.)

Edited by aut1sto
Link to comment
Share on other sites

1 hour ago, aut1sto said:

I need go get block that will be generated at random X, specific Y, random Z and specific biome (but not generate it in world or e.t.c.)

So, if you wanted to do the true implementation, you would probably need to use a BiomeModifier to read the placed features for each biome, execute the PlacementModifier list for each placed feature to get the block positions the feature would spawn in, and then group it by feature. The main issue there is that you have no context what feature is which. You could attempt to use the registry key to find similar naming schemes (e.g., name contains ore or something like that). You would also need to invalidate the data every time the biome modifier is reloaded.

 

Of course, as this is highly complicated to properly implement, it's probably just better to use a config with optional entries to handle your logic.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hiya! I've just been using FTB Launcher there since I was having problems with Curseforge and now I've run into bother with this as well. It began out of nowhere but whenever I was trying to load AllTheMods 8 one day it didn't work so I deleted the config for some broken mods; usually works for me. Nothing worked so I uninstalled the whole instance, and I've been redownloading it again and again trying different things - Allocating more ram, reinstalling Java, the works.   It'd be greatly appreciated if anyone were able to help me, every couple of weeks I have to tear these modpacks apart to actually get them to work and it's so annoying.   Here's the log if that helps? The guy on the other post said to post the whole debug but I couldn't get it: https://ibb.co/5G03gX4 Sorry that it's linked it wouldn't let me copy and paste, the newest debug will be below too:   [09Jun2023 15:31:10.155] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, SillyDillyXoxo, --version, 1.19.2-forge-43.2.11, --gameDir, D:\ftb\c4f3a60c-f9e7-49d8-970a-17b98825359e, --assetsDir, C:\Users\Dylan Lunney\AppData\Local\.ftba\bin\assets, --assetIndex, 1.19, --uuid, cef43407-3d1e-48f8-96a5-ec6b2b30a9a9, --accessToken, ????????, --clientId, ${clientid}, --xuid, ${auth_xuid}, --userType, msa, --versionType, release, --width, 1720, --height, 840, --launchTarget, forgeclient, --fml.forgeVersion, 43.2.11, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [09Jun2023 15:31:10.160] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.4 by Eclipse Adoptium; OS Windows 10 arch amd64 version 10.0 [09Jun2023 15:31:10.180] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Found launch services [fmlclientdev,forgeclient,minecraft,forgegametestserverdev,fmlserveruserdev,fmlclient,fmldatauserdev,forgeserverdev,forgeserveruserdev,forgeclientdev,forgeclientuserdev,forgeserver,forgedatadev,fmlserver,fmlclientuserdev,fmlserverdev,forgedatauserdev,testharness,forgegametestserveruserdev] [09Jun2023 15:31:10.190] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [srgtomcp] [09Jun2023 15:31:10.203] [main/DEBUG] [cpw.mods.modlauncher.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [mixin,eventbus,slf4jfixer,object_holder_definalize,runtime_enum_extender,capability_token_subclass,accesstransformer,runtimedistcleaner] [09Jun2023 15:31:10.211] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services        
    • Are you tired of “modern” skyblock servers that are nothing like the original? Are you looking for a skyblock server that is just like the original skyblock servers used to be? So was I, but I couldn't find one, so, I decided to make my own. Many modern servers have mutated the Skyblock game mode to the point where it is unrecognizable compared to the original. We are seeking to create a space where those who loved classic Skyblock can enjoy the original game mode. Even if you have not played classic Skyblock before, we encourage you to join our community to learn about what the original mode was like and why there was so much excitement around it. Server Description Classic Skies is designed just like the original skyblock servers but in the modern version, 1.19.4. There is a server shop where you can buy some of the items that you can’t obtain naturally with in-game money, as well as a plugin that allows you to set up your own shops on your island, causing a mostly player-run economy. Classic Skies’ goal is to bring back the nostalgic and classic feel of the original Skyblock as much as possible. We have a dedicated staff team and an owner with years of experience running small to medium-sized Minecraft servers. Classic Skies is a small server with a tight-knit community, and we are looking for new members to enjoy our server. Additionally, we are dedicated to delivering a lag-free, fair, and safe experience for every member of the community. Server Info Server IP: play.classicskies.com Supports Java & Bedrock Edition Bedrock Port: 19132 Game Version: 1.19.4 Discord: https://discord.gg/n7qXHnhksA
    • https://gist.github.com/Jayv6/7e39a9c1b3eb10b0d5d76442718d80e0
    • Hey Harry007! I recently created a server called Classic Skies. It is an amazing skyblock server. Here is the information: Are you tired of “modern” skyblock servers that are nothing like the original? Are you looking for a skyblock server that is just like the original skyblock servers used to be? So was I, but I couldn't find one, so, I decided to make my own.   Many modern servers have mutated the Skyblock game mode to the point where it is unrecognizable compared to the original. We are seeking to create a space where those who loved classic Skyblock can enjoy the original game mode. Even if you have not played classic Skyblock before, we encourage you to join our community to learn about what the original mode was like and why there was so much excitement around it.   Server Description Classic Skies is designed just like the original skyblock servers but in the modern version, 1.19.4. There is a server shop where you can buy some of the items that you can’t obtain naturally with in-game money, as well as a plugin that allows you to set up your own shops on your island, causing a mostly player-run economy. Classic Skies’ goal is to bring back the nostalgic and classic feel of the original Skyblock as much as possible. We have a dedicated staff team and an owner with years of experience running small to medium-sized Minecraft servers. Classic Skies is a small server with a tight-knit community, and we are looking for new members to enjoy our server. Additionally, we are dedicated to delivering a lag-free, fair, and safe experience for every member of the community.   Server Info Server IP: play.classicskies.com Supports Java & Bedrock Edition Bedrock Port: 19132 Game Version: 1.19.4 Discord: https://discord.gg/n7qXHnhksA
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.