Skip to content

Commit

Permalink
Continued work on adding translations for configs, and fix a couple d…
Browse files Browse the repository at this point in the history
…eprecations for defining config lists
  • Loading branch information
pupnewfster committed Aug 9, 2024
1 parent 41c83f9 commit fd05d22
Show file tree
Hide file tree
Showing 34 changed files with 529 additions and 198 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ emi_version=1.1.10
grand_power_version=3.0.0
jade_api_id=5427895
jade_id=5572926
jei_version=19.5.2.66
jei_version=19.8.2.99
json_things_version=0.12.0
top_version=1.21_neo-12.0.0-1
wthit_version=12.2.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import mekanism.additions.common.config.AdditionsConfigTranslations.BabySpawnTranslations;
import mekanism.additions.common.entity.baby.BabyType;
import mekanism.additions.common.registries.AdditionsEntityTypes;
import mekanism.api.functions.ConstantPredicates;
import mekanism.common.config.BaseMekanismConfig;
import mekanism.common.config.IMekanismConfig;
import mekanism.common.config.value.CachedBooleanValue;
Expand All @@ -18,6 +17,7 @@
import net.minecraft.SharedConstants;
import net.minecraft.core.Holder;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.biome.MobSpawnSettings;
Expand All @@ -43,7 +43,7 @@ public class AdditionsConfig extends BaseMekanismConfig {
obsidianTNTDelay = CachedIntValue.wrap(this, AdditionsConfigTranslations.SERVER_OBSIDIAN_DELAY.applyToBuilder(builder)
.defineInRange("delay", 5 * SharedConstants.TICKS_PER_SECOND, 0, Integer.MAX_VALUE));
obsidianTNTBlastRadius = CachedFloatValue.wrap(this, AdditionsConfigTranslations.SERVER_OBSIDIAN_RADIUS.applyToBuilder(builder)
.defineInRange("blast_radius", 12, 0.1, 1_000));
.defineInRange("blastRadius", 12, 0.1, 1_000));
builder.pop();

AdditionsConfigTranslations.SERVER_VOICE.applyToBuilder(builder).push("voice_server");
Expand Down Expand Up @@ -136,9 +136,9 @@ private SpawnConfig(IMekanismConfig config, ModConfigSpec.Builder builder, Strin
.worldRestart()
.defineInRange("maxSpawnCostPercentage", 1D, 0, 100));
this.biomeBlackList = CachedResourceLocationListValue.define(config, translations.biomeBlacklist().applyToBuilder(builder)
.worldRestart(), "biomeBlackList", ConstantPredicates.alwaysTrue());
.worldRestart(), "biomeBlackList", ResourceLocation.withDefaultNamespace("plains"));
this.structureBlackList = CachedResourceLocationListValue.define(config, translations.structureBlacklist().applyToBuilder(builder)
.worldRestart(), "structureBlackList", BuiltInRegistries.STRUCTURE_TYPE::containsKey);
.worldRestart(), "structureBlackList", ResourceLocation.withDefaultNamespace("fortress"), BuiltInRegistries.STRUCTURE_TYPE::containsKey);
builder.pop();
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fd05d22

Please sign in to comment.