mirror of
https://github.com/PuzzleMC/Puzzle.git
synced 2025-12-15 11:25:11 +01:00
Modulized into: puzzle-base (update checker + config) puzzle-gui (unified config gui) puzzle-models (remove limitations) puzzle-blocks (custom render layers) puzzle-splashscreen (resourcepack-provided spash screen) Updated to 1.17
40 lines
1.8 KiB
Java
Executable File
40 lines
1.8 KiB
Java
Executable File
package net.puzzlemc.gui;
|
|
|
|
import net.puzzlemc.core.config.PuzzleConfig;
|
|
import net.puzzlemc.gui.screen.widget.PuzzleWidget;
|
|
import org.apache.logging.log4j.LogManager;
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
public class PuzzleApi {
|
|
private static Logger LOGGER = LogManager.getLogger("puzzle-gui");
|
|
|
|
public static List<PuzzleWidget> GRAPHICS_OPTIONS = new ArrayList<>();
|
|
public static List<PuzzleWidget> MISC_OPTIONS = new ArrayList<>();
|
|
public static List<PuzzleWidget> PERFORMANCE_OPTIONS = new ArrayList<>();
|
|
public static List<PuzzleWidget> RESOURCE_OPTIONS = new ArrayList<>();
|
|
|
|
public static void addToGraphicsOptions(PuzzleWidget button) {
|
|
GRAPHICS_OPTIONS.add(button);
|
|
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + " -> Graphics Options");
|
|
}
|
|
public static void addToMiscOptions(PuzzleWidget button) {
|
|
MISC_OPTIONS.add(button);
|
|
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + " -> Misc Options");
|
|
}
|
|
public static void addToPerformanceOptions(PuzzleWidget button) {
|
|
PERFORMANCE_OPTIONS.add(button);
|
|
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + "- > Performance Options");
|
|
}
|
|
public static void addToResourceOptions(PuzzleWidget button) {
|
|
RESOURCE_OPTIONS.add(button);
|
|
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + " -> Resource Options");
|
|
}
|
|
@Deprecated public static void addToTextureOptions(PuzzleWidget button) {
|
|
RESOURCE_OPTIONS.add(button);
|
|
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + " -> LEGACY Texture Options");
|
|
}
|
|
}
|