mirror of
https://github.com/PuzzleMC/Puzzle.git
synced 2025-12-15 11:25:11 +01:00
feat: add icons for mod titles
This commit is contained in:
@@ -22,11 +22,11 @@ public class PuzzleGui {
|
||||
public static void init() {
|
||||
MidnightLib.hiddenMods.add("puzzle");
|
||||
MinecraftClient client = MinecraftClient.getInstance();
|
||||
PuzzleApi.addToMiscOptions(new PuzzleWidget(Text.of("Puzzle")));
|
||||
PuzzleApi.addToMiscOptions(new PuzzleWidget(Text.of("\uD83E\uDDE9 Puzzle")));
|
||||
PuzzleApi.addToMiscOptions(new PuzzleWidget(Text.translatable("puzzle.midnightconfig.title"), (button) -> button.setMessage(Text.of("OPEN")), (button) -> {
|
||||
client.setScreen(PuzzleConfig.getScreen(client.currentScreen, "puzzle"));
|
||||
}));
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("Puzzle")));
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("\uD83E\uDDE9 Puzzle")));
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("puzzle.option.resourcepack_splash_screen"), (button) -> button.setMessage(PuzzleConfig.resourcepackSplashScreen ? YES : NO), (button) -> {
|
||||
PuzzleConfig.resourcepackSplashScreen = !PuzzleConfig.resourcepackSplashScreen;
|
||||
PuzzleSplashScreen.resetColors();
|
||||
|
||||
@@ -11,7 +11,7 @@ import static net.puzzlemc.gui.PuzzleGui.YES;
|
||||
|
||||
public class BorderlessMiningCompat {
|
||||
public static void init() {
|
||||
PuzzleApi.addToMiscOptions(new PuzzleWidget(Text.of("Borderless Mining")));
|
||||
PuzzleApi.addToMiscOptions(new PuzzleWidget(Text.of("\uD83E\uDE9F Borderless Mining")));
|
||||
ConfigHandler bmConfig = ConfigHandler.getInstance();
|
||||
PuzzleApi.addToMiscOptions(new PuzzleWidget(Text.translatable("config.borderlessmining.general.enabled"), (button) -> button.setMessage(bmConfig.isEnabledOrPending() ? YES : NO), (button) -> {
|
||||
bmConfig.setEnabledPending(!bmConfig.isEnabledOrPending());
|
||||
|
||||
@@ -13,7 +13,7 @@ import static net.minecraft.screen.ScreenTexts.YES;
|
||||
public class CITRCompat {
|
||||
public static void init() {
|
||||
if (CITResewnConfig.INSTANCE != null) {
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("CIT Resewn")));
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("⛏ CIT Resewn")));
|
||||
CITResewnConfig citConfig = CITResewnConfig.INSTANCE;
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.citresewn.enabled.title"), (button) -> button.setMessage(citConfig.enabled ? YES : NO), (button) -> {
|
||||
citConfig.enabled = !citConfig.enabled;
|
||||
|
||||
@@ -12,7 +12,7 @@ import static net.puzzlemc.gui.PuzzleGui.YES;
|
||||
|
||||
public class ColormaticCompat {
|
||||
public static void init() {
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("Colormatic")));
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("\uD83C\uDF08 Colormatic")));
|
||||
ColormaticConfig colormaticConfig = Colormatic.config();
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("colormatic.config.option.clearSky"), (button) -> button.setMessage(colormaticConfig.clearSky ? YES : NO), (button) -> {
|
||||
colormaticConfig.clearSky = !colormaticConfig.clearSky;
|
||||
|
||||
@@ -11,7 +11,7 @@ import static net.puzzlemc.gui.PuzzleGui.YES;
|
||||
|
||||
public class ContinuityCompat {
|
||||
public static void init() {
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("Continuity")));
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.of("▒ Continuity")));
|
||||
ContinuityConfig contConfig = ContinuityConfig.INSTANCE;
|
||||
contConfig.getOptionMapView().forEach((s, option) -> {
|
||||
if (s.equals("use_manual_culling")) return;
|
||||
|
||||
@@ -11,7 +11,7 @@ import static net.puzzlemc.gui.PuzzleGui.YES;
|
||||
|
||||
public class CullLeavesCompat {
|
||||
public static void init() {
|
||||
PuzzleApi.addToPerformanceOptions(new PuzzleWidget(Text.of("CullLeaves")));
|
||||
PuzzleApi.addToPerformanceOptions(new PuzzleWidget(Text.of("\uD83C\uDF43 Cull Leaves")));
|
||||
PuzzleApi.addToPerformanceOptions(new PuzzleWidget(Text.translatable("cullleaves.puzzle.option.enabled"), (button) -> button.setMessage(CullLeavesConfig.enabled ? YES : NO), (button) -> {
|
||||
CullLeavesConfig.enabled = !CullLeavesConfig.enabled;
|
||||
CullLeavesConfig.write("cullleaves");
|
||||
|
||||
@@ -13,12 +13,9 @@ import java.util.NavigableSet;
|
||||
import java.util.Objects;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import static net.puzzlemc.gui.PuzzleGui.NO;
|
||||
import static net.puzzlemc.gui.PuzzleGui.YES;
|
||||
|
||||
public class EMFCompat {
|
||||
public static void init() {
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("entity_model_features.title")));
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.literal("\uD83D\uDC37 ").append(Text.translatable("entity_model_features.title"))));
|
||||
EMFConfig emfConfig = EMF.config().getConfig();
|
||||
if (PlatformFunctions.isModLoaded("physicsmod")) {
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("entity_model_features.config.physics"), (button) -> button.setMessage(emfConfig.attemptPhysicsModPatch_2 != EMFConfig.PhysicsModCompatChoice.OFF ?
|
||||
|
||||
@@ -16,7 +16,7 @@ import static net.puzzlemc.gui.PuzzleGui.YES;
|
||||
|
||||
public class ETFCompat {
|
||||
public static void init() {
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.entity_texture_features.title")));
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.literal("\uD83D\uDC2E ").append(Text.translatable("config.entity_texture_features.title"))));
|
||||
ETFConfig etfConfig = ETFApi.getETFConfigObject();
|
||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.entity_texture_features.enable_custom_textures.title"), (button) -> button.setMessage(etfConfig.enableCustomTextures ? YES : NO), (button) -> {
|
||||
etfConfig.enableCustomTextures = !etfConfig.enableCustomTextures;
|
||||
|
||||
@@ -12,7 +12,7 @@ import net.puzzlemc.gui.screen.widget.PuzzleWidget;
|
||||
|
||||
public class IrisCompat {
|
||||
public static void init() {
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.of("Iris")));
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.of("\uD83D\uDC41 Iris")));
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.translatable("iris.puzzle.option.enableShaders"), (button) -> button.setMessage(IrisApi.getInstance().getConfig().areShadersEnabled() ? PuzzleGui.YES : PuzzleGui.NO), (button) -> {
|
||||
IrisApiConfig irisConfig = IrisApi.getInstance().getConfig();
|
||||
irisConfig.setShadersEnabledAndApply(!irisConfig.areShadersEnabled());
|
||||
|
||||
@@ -12,7 +12,7 @@ import static net.puzzlemc.gui.PuzzleGui.YES;
|
||||
public class LBGCompat {
|
||||
public static void init() {
|
||||
LBGConfig lbgConfig = LambdaBetterGrass.get().config;
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.of("LambdaBetterGrass")));
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.of("\uD83C\uDF31 LambdaBetterGrass")));
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.translatable("lambdabettergrass.option.mode"), (button) -> button.setMessage(lbgConfig.getMode().getTranslatedText()), (button) -> lbgConfig.setMode(lbgConfig.getMode().next())));
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.translatable("lambdabettergrass.option.better_snow"), (button) -> button.setMessage(lbgConfig.hasBetterLayer() ? YES : NO), (button) -> lbgConfig.setBetterLayer(!lbgConfig.hasBetterLayer())));
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class LDLCompat {
|
||||
public static void init() {
|
||||
DynamicLightsConfig ldlConfig = LambDynLights.get().config;
|
||||
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.of("LambDynamicLights")));
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.of("\uD83D\uDCA1 LambDynamicLights")));
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.translatable("lambdynlights.option.mode"), (button) -> button.setMessage(ldlConfig.getDynamicLightsMode().getTranslatedText()), (button) -> ldlConfig.setDynamicLightsMode(ldlConfig.getDynamicLightsMode().next())));
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.empty().append("DynLights: ").append(Text.translatable("lambdynlights.option.light_sources.entities")), (button) -> button.setMessage(ldlConfig.getEntitiesLightSource().get() ? YES : NO), (button) -> ldlConfig.getEntitiesLightSource().set(!ldlConfig.getEntitiesLightSource().get())));
|
||||
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.empty().append("DynLights: ").append(Text.translatable("entity.minecraft.creeper")), (button) -> button.setMessage(ldlConfig.getCreeperLightingMode().getTranslatedText()), (button) -> ldlConfig.setCreeperLightingMode(ldlConfig.getCreeperLightingMode().next())));
|
||||
|
||||
Reference in New Issue
Block a user