Skip to content

Commit

Permalink
Change max_age to 15 minutes; remove skip_unloaded.
Browse files Browse the repository at this point in the history
It would seem better to let block entities time out than manually
removing them.
  • Loading branch information
noobanidus committed Mar 30, 2024
1 parent 1cee01a commit e0df162
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/main/java/noobanidus/mods/lootr/Lootr.java
Expand Up @@ -36,6 +36,10 @@ public Lootr() {
context.registerConfig(ModConfig.Type.COMMON, ConfigManager.COMMON_CONFIG);
context.registerConfig(ModConfig.Type.CLIENT, ConfigManager.CLIENT_CONFIG);
ConfigManager.loadConfig(ConfigManager.COMMON_CONFIG, FMLPaths.CONFIGDIR.get().resolve(LootrAPI.MODID + "-common.toml"));
if (ConfigManager.MAXIMUM_AGE.get() == ConfigManager.OLD_MAX_AGE) {
ConfigManager.MAXIMUM_AGE.set(60 * 20 * 15);
ConfigManager.COMMON_CONFIG.save();
}
ConfigManager.loadConfig(ConfigManager.CLIENT_CONFIG, FMLPaths.CONFIGDIR.get().resolve(LootrAPI.MODID + "-client.toml"));
MinecraftForge.EVENT_BUS.addListener(this::onCommands);
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/noobanidus/mods/lootr/config/ConfigManager.java
Expand Up @@ -59,7 +59,7 @@ public class ConfigManager {

// Conversion
public static final ForgeConfigSpec.BooleanValue DISABLE;
public static final ForgeConfigSpec.BooleanValue SKIP_UNLOADED;
public static final int OLD_MAX_AGE = 60 * 10 * 10;
public static final ForgeConfigSpec.IntValue MAXIMUM_AGE;
public static final ForgeConfigSpec.BooleanValue CONVERT_MINESHAFTS;
public static final ForgeConfigSpec.BooleanValue CONVERT_ELYTRAS;
Expand Down Expand Up @@ -134,9 +134,8 @@ public class ConfigManager {

static {
RANDOMISE_SEED = COMMON_BUILDER.comment("determine whether or not loot generated is the same for all players using the provided seed, or randomised per player").define("randomise_seed", true);
MAXIMUM_AGE = COMMON_BUILDER.comment("the maximum age for containers; entries above this age will be discarded [default: 180 * 20, 3 minutes]").defineInRange("max_age", 60 * 10 * 10, 0, Integer.MAX_VALUE);
MAXIMUM_AGE = COMMON_BUILDER.comment("the maximum age for containers; entries above this age will be discarded [default: 60 * 20 * 15, fifteen minutes] [note: the value 6000 will be corrected to 18000. if you wish to use 6000, please use 6001 or 5999.]").defineInRange("max_age", 60 * 20 * 15, 0, Integer.MAX_VALUE);
DISABLE = COMMON_BUILDER.comment("if true, no chests will be converted").define("disable", false);
SKIP_UNLOADED = COMMON_BUILDER.comment("skip unloaded block entities that are eligible for conversion, set to false to potentially resolve issues with containers that aren't being converted [default: true]").define("skip_unloaded", true);
CONVERT_MINESHAFTS = COMMON_BUILDER.comment("whether or not mineshaft chest minecarts should be converted to standard loot chests").define("convert_mineshafts", true);
CONVERT_ELYTRAS = COMMON_BUILDER.comment("whether or not the Elytra item frame should be converted into a standard loot chest with a guaranteed elytra").define("convert_elytras", true);
CONVERT_QUARK = COMMON_BUILDER.comment("whether or not quark chests used in world generation for loot purposes should be replaced with Lootr chests").define("convert_quark", true);
Expand Down

0 comments on commit e0df162

Please sign in to comment.