Remove justified lexicon config, closes #3290

This commit is contained in:
Hubry committed 2020-05-16 00:04:46 +02:00
1 parent 905591345b
commit a0aa8a2796
2 files changed
-20

No files matched your search

@@ -233,25 +233,9 @@ public class RenderLexicon {
for (List<String> words : lines) {
int xi = x;
int spacing = 4;
int wcount = words.size();
int compensationSpaces = 0;
boolean justify = ConfigHandler.CLIENT.lexiconJustifiedText.get() && wcount > 0 && lines.size() > i && !lines.get(i + 1).isEmpty();
if (justify) {
String s = Joiner.on("").join(words);
int swidth = font.getStringWidth(s);
int space = width - swidth;
spacing = wcount == 1 ? 0 : space / (wcount - 1);
compensationSpaces = wcount == 1 ? 0 : space % (wcount - 1);
}
for (String s : words) {
int extra = 0;
if (compensationSpaces > 0) {
compensationSpaces--;
extra++;
}
font.renderString(s, xi, y, color, false, matrix, buffers, false, 0, light);
xi += font.getStringWidth(s) + spacing + extra;
}
@@ -17,7 +17,6 @@ public final class ConfigHandler {
public static class Client {
public final ForgeConfigSpec.BooleanValue useShaders;
public final ForgeConfigSpec.BooleanValue lexiconRotatingItems;
public final ForgeConfigSpec.BooleanValue lexiconJustifiedText;
public final ForgeConfigSpec.BooleanValue subtlePowerSystem;
public final ForgeConfigSpec.BooleanValue staticWandBeam;
public final ForgeConfigSpec.BooleanValue boundBlockWireframe;
@@ -44,9 +43,6 @@ public final class ConfigHandler {
lexiconRotatingItems = builder
.comment("Set this to false to disable the rotating items in the petal and rune entries in the Lexica Botania.")
.define("lexicon.rotating_items", true);
lexiconJustifiedText = builder
.comment("Set this to true to enable justified text in the Lexica Botania's text pages.")
.define("lexicon.justified_text", false);
subtlePowerSystem = builder
.comment("Set this to true to set the power system's particles to be a lot more subtle. Good for low-end systems, if the particles are causing lag.")
.define("subtile_power_system", false);