Skip to content

Commit

Permalink
fix crash on server side
Browse files Browse the repository at this point in the history
fix #38
  • Loading branch information
Glease committed Jul 3, 2023
1 parent c181ee7 commit 7e7b26e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/main/java/net/glease/tc4tweak/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public static void handleMouseInput(GuiResearchRecipe screen) {
@Override
public void preInit(FMLPreInitializationEvent e) {
super.preInit(e);
ConfigurationHandler.INSTANCE.setGUISettings();
try {
Class<GuiResearchTable> guiResearchTableClass = GuiResearchTable.class;
fieldPage = guiResearchTableClass.getDeclaredField("page");
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/net/glease/tc4tweak/ConfigurationHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ private void loadConfig(boolean send) {
categoryOrder = ImmutableList.copyOf(config.getStringList("categoryOrder", "client", new String[] {"BASICS","THAUMATURGY","ALCHEMY","ARTIFICE","GOLEMANCY","ELDRITCH",}, "Specify a full sorting order of research tabs. An empty list here means the feature is disabled. any research tab not listed here will be appended to the end in their original order. Use NEI utility to dump a list of all research tabs. Default is the list of all vanilla thaumcraft tabs."));
dispenserShootPrimalArrow = config.getBoolean("dispenserShootPrimalArrow", "general", false, "If true, dispenser will shoot primal arrow instead of dropping it into world.");

// config GUI stuff
config.getCategory("client").get("categoryOrder").setArrayEntryClass(StringOrderingEntry.class);

// validation
if (inferBrowserScaleLowerBound > inferBrowserScaleUpperBound)
config.getCategory("client").get("inferBrowserScaleLowerBound").set(inferBrowserScaleUpperBound);
Expand All @@ -141,6 +138,11 @@ private void loadConfig(boolean send) {
config.save();
}

void setGUISettings() {
// config GUI stuff
config.getCategory("client").get("categoryOrder").setArrayEntryClass(StringOrderingEntry.class);
}

public boolean isInverted() {
return inverted;
}
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.11
1.5.12

0 comments on commit 7e7b26e

Please sign in to comment.