Skip to content

Commit

Permalink
Fix (#33) config value resetting after each game start.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crystal-Spider committed Jun 27, 2024
1 parent 1d0ebd4 commit 0a9f2b0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ protected void define(ModConfigSpec.Builder builder) {
" From lesser to greater, Vanilla tiers are: " + String.join(", ", Stream.of(Tiers.values()).sorted(TierUtils::compare).map(tier -> "\"" + tier.toString().toLowerCase() + "\"").toArray(String[]::new)) + ".",
" When set to \"none\", multi-harvest will be enabled without a tool too. Note that [require hoe] takes precedence.",
" The tier can be specified with either the name of the tier, e.g. \"iron\", or the id of the tier, e.g. \"minecraft:iron\"."
).define("multi-harvest starting tier", Tiers.WOOD.toString().toLowerCase(), value -> value instanceof String string && ("none".equalsIgnoreCase(string) || TierUtils.isIn(TierUtils.getAllTiers(), string)));
).define(
"multi-harvest starting tier",
Tiers.WOOD.toString().toLowerCase(),
// With Forge/NeoForge tier registry, the list of all tiers is empty when the game starts and configurations are first checked.
value -> value instanceof String string && ("none".equalsIgnoreCase(string) || TierUtils.getAllTiers().isEmpty() || TierUtils.isIn(TierUtils.getAllTiers(), string))
);
areaStartingSize = builder.comment(getAreaSizeComments()).defineEnum("starting harvest area size", AreaSize.SINGLE, AreaSize.values());
areaIncrementStep = builder.comment(getAreaStepComments()).defineEnum("area increment step", AreaStep.NONE, AreaStep.values());
}
Expand Down

0 comments on commit 0a9f2b0

Please sign in to comment.