More fixes
This commit is contained in:
parent
53b34857be
commit
1ea5f5a52a
2 changed files with 5 additions and 6 deletions
|
@ -103,8 +103,8 @@ public abstract class Config {
|
||||||
protected float getFloat(ConfigKey key, float defaultValue) {
|
protected float getFloat(ConfigKey key, float defaultValue) {
|
||||||
Float val = keeper.getValue(key, FloatEntry.class);
|
Float val = keeper.getValue(key, FloatEntry.class);
|
||||||
if (val == null) {
|
if (val == null) {
|
||||||
keeper.registerEntry(key, new FloatEntry(defaultValue));
|
FloatEntry entry = keeper.registerEntry(key, new FloatEntry(defaultValue));
|
||||||
return defaultValue;
|
return entry.getValue();
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
@ -129,8 +129,8 @@ public abstract class Config {
|
||||||
protected boolean getBoolean(ConfigKey key, boolean defaultValue) {
|
protected boolean getBoolean(ConfigKey key, boolean defaultValue) {
|
||||||
Boolean val = keeper.getValue(key, BooleanEntry.class);
|
Boolean val = keeper.getValue(key, BooleanEntry.class);
|
||||||
if (val == null) {
|
if (val == null) {
|
||||||
keeper.registerEntry(key, new BooleanEntry(defaultValue));
|
BooleanEntry entry = keeper.registerEntry(key, new BooleanEntry(defaultValue));
|
||||||
return defaultValue;
|
return entry.getValue();
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.world.BlockView;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.WorldAccess;
|
import net.minecraft.world.WorldAccess;
|
||||||
import net.minecraft.world.WorldView;
|
import net.minecraft.world.WorldView;
|
||||||
|
import ru.betterend.config.Configs;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndTags;
|
import ru.betterend.registry.EndTags;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlocksHelper;
|
||||||
|
@ -43,9 +44,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
||||||
GeneratorOptions.init();
|
GeneratorOptions.init();
|
||||||
if (GeneratorOptions.changeChorusPlant()) {
|
if (GeneratorOptions.changeChorusPlant()) {
|
||||||
builder.add(BlocksHelper.ROOTS);
|
builder.add(BlocksHelper.ROOTS);
|
||||||
System.out.println("Added!");
|
|
||||||
}
|
}
|
||||||
System.out.println("Added? " + GeneratorOptions.changeChorusPlant());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "withConnectionProperties", at = @At("RETURN"), cancellable = true)
|
@Inject(method = "withConnectionProperties", at = @At("RETURN"), cancellable = true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue