Remove per-world config override (#1094)

Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
slprimeandMartin Robertz authored and GitHub committed 2026-11-02 18:20:18 +02:00
1 parent a0b2430458
commit afc8a2380b
35 files changed
+76 -364

No files matched your search

@@ -29,7 +29,6 @@ public class GuiHighlightTips extends GuiScreenWidget {
private GuiCCButton toggleButton;
private final Option opt;
private final GuiOptionList parentGui;
private final boolean world;
private Point dragDown;
public GuiHighlightTips(Option opt) {
@@ -37,7 +36,6 @@ public class GuiHighlightTips extends GuiScreenWidget {
this.opt = opt;
name = opt.name;
this.parentGui = (GuiOptionList) Minecraft.getMinecraft().currentScreen;
this.world = parentGui.worldConfig();
}
@Override
@@ -63,15 +61,11 @@ public class GuiHighlightTips extends GuiScreenWidget {
}
private boolean show() {
return renderTag(name).getBooleanValue();
return getTag(name).getBooleanValue();
}
private ConfigTag getTag(String s) {
return (world ? opt.worldConfigSet() : opt.globalConfigSet()).config.getTag(s);
}
private ConfigTag renderTag(String s) {
return (world && opt.worldSpecific(s) ? opt.worldConfigSet() : opt.globalConfigSet()).config.getTag(s);
return opt.configSet().config.getTag(s);
}
@Override
@@ -95,7 +89,7 @@ public class GuiHighlightTips extends GuiScreenWidget {
}
public Point getPos() {
return new Point(renderTag(name + ".x").getIntValue(), renderTag(name + ".y").getIntValue());
return new Point(getTag(name + ".x").getIntValue(), getTag(name + ".y").getIntValue());
}
public Dimension sampleSize() // copied from HUDManager when running with the sample for this gui
@@ -161,7 +155,6 @@ public class GuiHighlightTips extends GuiScreenWidget {
}
private void setPos(Point p) {
getTag(name).setBooleanValue(show()); // duplicates global tag for the option gui if in world mode
getTag(name + ".x").setIntValue(p.x);
getTag(name + ".y").setIntValue(p.y);
}