mirror of
https://github.com/PuzzleMC/Puzzle.git
synced 2025-12-16 03:45:10 +01:00
- Removed intrusive branding (previously visible on Title screen and F3 menu) - De-modularized: Previously, Puzzle was split into multiple modules which complicated the development process and was just unnecessary - Experimental NeoForge support - Many small improvements - puzzle-splashscreen: Improved background image blending - puzzle-splashscreen: Added support for custom blend functions for full OptiFine parity
25 lines
2.5 KiB
Java
25 lines
2.5 KiB
Java
package net.puzzlemc.gui.compat;
|
|
|
|
import dev.lambdaurora.lambdynlights.DynamicLightsConfig;
|
|
import dev.lambdaurora.lambdynlights.LambDynLights;
|
|
import net.minecraft.text.Text;
|
|
import net.puzzlemc.gui.PuzzleApi;
|
|
import net.puzzlemc.gui.screen.widget.PuzzleWidget;
|
|
|
|
import static net.puzzlemc.gui.PuzzleGui.NO;
|
|
import static net.puzzlemc.gui.PuzzleGui.YES;
|
|
|
|
public class LDLCompat {
|
|
public static void init() {
|
|
DynamicLightsConfig ldlConfig = LambDynLights.get().config;
|
|
|
|
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.of("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("lambdynlights.option.light_sources.block_entities")), (button) -> button.setMessage(ldlConfig.getBlockEntitiesLightSource().get() ? YES : NO), (button) -> ldlConfig.getBlockEntitiesLightSource().set(!ldlConfig.getBlockEntitiesLightSource().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())));
|
|
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.empty().append("DynLights: ").append(Text.translatable("block.minecraft.tnt")), (button) -> button.setMessage(ldlConfig.getTntLightingMode().getTranslatedText()), (button) -> ldlConfig.setTntLightingMode(ldlConfig.getTntLightingMode().next())));
|
|
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.empty().append("DynLights: ").append(Text.translatable("lambdynlights.option.light_sources.water_sensitive_check")), (button) -> button.setMessage(ldlConfig.getWaterSensitiveCheck().get() ? YES : NO), (button) -> ldlConfig.getWaterSensitiveCheck().set(!ldlConfig.getWaterSensitiveCheck().get())));
|
|
}
|
|
}
|