diff --git a/src/main/java/ru/betterend/config/Config.java b/src/main/java/ru/betterend/config/Config.java index edcec1b9..1e8f3d3f 100644 --- a/src/main/java/ru/betterend/config/Config.java +++ b/src/main/java/ru/betterend/config/Config.java @@ -103,8 +103,8 @@ public abstract class Config { protected float getFloat(ConfigKey key, float defaultValue) { Float val = keeper.getValue(key, FloatEntry.class); if (val == null) { - keeper.registerEntry(key, new FloatEntry(defaultValue)); - return defaultValue; + FloatEntry entry = keeper.registerEntry(key, new FloatEntry(defaultValue)); + return entry.getValue(); } return val; } @@ -129,8 +129,8 @@ public abstract class Config { protected boolean getBoolean(ConfigKey key, boolean defaultValue) { Boolean val = keeper.getValue(key, BooleanEntry.class); if (val == null) { - keeper.registerEntry(key, new BooleanEntry(defaultValue)); - return defaultValue; + BooleanEntry entry = keeper.registerEntry(key, new BooleanEntry(defaultValue)); + return entry.getValue(); } return val; } diff --git a/src/main/java/ru/betterend/mixin/common/ChorusPlantBlockMixin.java b/src/main/java/ru/betterend/mixin/common/ChorusPlantBlockMixin.java index 883a4cd0..79010145 100644 --- a/src/main/java/ru/betterend/mixin/common/ChorusPlantBlockMixin.java +++ b/src/main/java/ru/betterend/mixin/common/ChorusPlantBlockMixin.java @@ -20,6 +20,7 @@ import net.minecraft.world.BlockView; import net.minecraft.world.World; import net.minecraft.world.WorldAccess; import net.minecraft.world.WorldView; +import ru.betterend.config.Configs; import ru.betterend.registry.EndBlocks; import ru.betterend.registry.EndTags; import ru.betterend.util.BlocksHelper; @@ -43,9 +44,7 @@ public abstract class ChorusPlantBlockMixin extends Block { GeneratorOptions.init(); if (GeneratorOptions.changeChorusPlant()) { builder.add(BlocksHelper.ROOTS); - System.out.println("Added!"); } - System.out.println("Added? " + GeneratorOptions.changeChorusPlant()); } @Inject(method = "withConnectionProperties", at = @At("RETURN"), cancellable = true)