diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiEditArray.java b/src/main/java/net/minecraftforge/fml/client/config/GuiEditArray.java index 201bdd479..900982857 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiEditArray.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiEditArray.java @@ -103,7 +103,7 @@ public class GuiEditArray extends GuiScreen @Override public void initGui() { - this.entryList = new GuiEditArrayEntries(this, this.mc, this.configElement, this.beforeValues, this.currentValues); + this.entryList = createEditArrayEntries(); int undoGlyphWidth = mc.fontRenderer.getStringWidth(UNDO_CHAR) * 2; int resetGlyphWidth = mc.fontRenderer.getStringWidth(RESET_CHAR) * 2; @@ -136,15 +136,20 @@ public class GuiEditArray extends GuiScreen else if (button.id == 2001) { this.currentValues = configElement.getDefaults(); - this.entryList = new GuiEditArrayEntries(this, this.mc, this.configElement, this.beforeValues, this.currentValues); + this.entryList = createEditArrayEntries(); } else if (button.id == 2002) { this.currentValues = Arrays.copyOf(beforeValues, beforeValues.length); - this.entryList = new GuiEditArrayEntries(this, this.mc, this.configElement, this.beforeValues, this.currentValues); + this.entryList = createEditArrayEntries(); } } + protected GuiEditArrayEntries createEditArrayEntries() + { + return new GuiEditArrayEntries(this, this.mc, this.configElement, this.beforeValues, this.currentValues); + } + @Override public void handleMouseInput() throws IOException {