Add regex support for height hack handlers config (#177)

* Make handler height hack configured via regex
This commit is contained in:
D-Cysteine authored and GitHub committed 2021-11-28 14:25:48 -08:00
1 parent a7ca6c8527
commit 304cc12750
3 files changed
+27 -14

No files matched your search

@@ -48,6 +48,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.function.Function;
import java.util.regex.Pattern;
public class NEIClientConfig {
private static boolean configLoaded;
@@ -68,8 +69,9 @@ public class NEIClientConfig {
// Set of handlers that need to be run in serial
public static HashSet<String> serialHandlers = new HashSet<>();
// Set of handler ID of handlers that need the hack in GuiRecipe.startHeightHack().
public static HashSet<String> heightHackHandlers = new HashSet<>();
// Set of regexes matching handler ID of handlers that need the hack in GuiRecipe.startHeightHack().
// We use regex here so that we can apply the height hack to entire mods with one entry.
public static HashSet<Pattern> heightHackHandlerRegex = new HashSet<>();
// Map of handler ID to sort order.
// Handlers will be sorted in ascending order, so smaller numbers show up earlier.