diff --git a/build.gradle b/build.gradle index dbd9daee1e..5f7ce1fd01 100644 --- a/build.gradle +++ b/build.gradle @@ -28,6 +28,7 @@ version = project.mod_version group = project.maven_group repositories { + mavenLocal() maven { name = "Modrinth" url = "https://api.modrinth.com/maven" @@ -47,7 +48,8 @@ dependencies { forge "net.minecraftforge:forge:${minecraft_version}-${forge_version}" compileOnly "org.apache.ant:ant:1.8.2" - modCompileOnly "maven.modrinth:rubidium:0.2.12" + //modCompileOnly "maven.modrinth:rubidium:0.2.12" + modCompileOnly "me.jellysquid.mods:Rubidium:0.2.13" implementation fileTree(include: ['*.jar'], dir: 'libs') toJar fileTree(include: ['antlr4-runtime-4.10.1.jar', 'glsl-transformer-1.0.0-pre21.2.jar'], dir: 'libs') diff --git a/src/main/java/net/coderbot/iris/compat/sodium/impl/options/IrisSodiumOptions.java b/src/main/java/net/coderbot/iris/compat/sodium/impl/options/IrisSodiumOptions.java index 63a20a1fe4..69a3f9114b 100644 --- a/src/main/java/net/coderbot/iris/compat/sodium/impl/options/IrisSodiumOptions.java +++ b/src/main/java/net/coderbot/iris/compat/sodium/impl/options/IrisSodiumOptions.java @@ -12,15 +12,15 @@ import net.coderbot.iris.Iris; import net.coderbot.iris.gui.option.IrisVideoSettings; import net.minecraft.client.Options; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; public class IrisSodiumOptions { public static OptionImpl createMaxShadowDistanceSlider(MinecraftOptionsStorage vanillaOpts) { OptionImpl maxShadowDistanceSlider = OptionImpl.createBuilder(int.class, vanillaOpts) - .setName("Max Shadow Distance") - .setTooltip("The shadow render distance controls how far away terrain can potentially be rendered in the shadow pass. Lower distances mean that less terrain will be " + - "rendered, improving frame rates. This option cannot be changed on packs which explicitly specify a shadow render distance. The actual shadow render distance is capped by the " + - "View Distance setting.") - .setControl(option -> new SliderControl(option, 0, 32, 1, ControlValueFormatter.quantity("Chunks"))) + .setName(new TranslatableComponent("options.iris.shadowDistance")) + .setTooltip(new TranslatableComponent("options.iris.shadowDistance.sodium_tooltip")) + .setControl(option -> new SliderControl(option, 0, 32, 1, ControlValueFormatter.quantity("options.chunks"))) .setBinding((options, value) -> { IrisVideoSettings.shadowDistance = value; try { @@ -41,10 +41,9 @@ public static OptionImpl createMaxShadowDistanceSlider(Minecra public static OptionImpl createLimitedVideoSettingsButton(MinecraftOptionsStorage vanillaOpts) { return OptionImpl.createBuilder(SupportedGraphicsMode.class, vanillaOpts) - .setName("Graphics Quality") - .setTooltip("The default graphics quality controls some legacy options and is necessary for mod compatibility. If the options below are left to " + - "\"Default\", they will use this setting. Fabulous graphics are blocked while shaders are enabled.") - .setControl(option -> new CyclingControl<>(option, SupportedGraphicsMode.class, new String[] { "Fast", "Fancy" })) + .setName(new TranslatableComponent("options.graphics")) + .setTooltip(new TranslatableComponent("sodium.options.graphics_quality.tooltip")) + .setControl(option -> new CyclingControl<>(option, SupportedGraphicsMode.class, new Component[] { new TranslatableComponent("options.graphics.fast"), new TranslatableComponent("options.graphics.fancy") })) .setBinding( (opts, value) -> opts.graphicsMode = value.toVanilla(), opts -> SupportedGraphicsMode.fromVanilla(opts.graphicsMode)) diff --git a/src/main/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinSmoothLightPipeline.java b/src/main/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinSmoothLightPipeline.java index 60314ee6e2..34c67ecd61 100644 --- a/src/main/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinSmoothLightPipeline.java +++ b/src/main/java/net/coderbot/iris/compat/sodium/mixin/directional_shading/MixinSmoothLightPipeline.java @@ -12,7 +12,7 @@ @Mixin(SmoothLightPipeline.class) public class MixinSmoothLightPipeline { - @Inject(method = "applySidedBrightness", at = @At("HEAD"), cancellable = true) + @Inject(method = "applySidedBrightness", at = @At("HEAD"), cancellable = true, remap = false) private void iris$disableDirectionalShading(QuadLightData out, Direction face, boolean shade, CallbackInfo ci) { if (BlockRenderingSettings.INSTANCE.shouldDisableDirectionalShading()) { ci.cancel(); diff --git a/src/main/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumOptionsGUI.java b/src/main/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumOptionsGUI.java index c013ac29a0..11bc99642c 100644 --- a/src/main/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumOptionsGUI.java +++ b/src/main/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumOptionsGUI.java @@ -38,8 +38,7 @@ protected MixinSodiumOptionsGUI(Component title) { @Inject(method = "", at = @At("RETURN")) private void iris$onInit(Screen prevScreen, CallbackInfo ci) { - String shaderPacksTranslated = new TranslatableComponent("options.iris.shaderPackSelection").getString(); - shaderPacks = new OptionPage(shaderPacksTranslated, ImmutableList.of()); + shaderPacks = new OptionPage(new TranslatableComponent("options.iris.shaderPackSelection"), ImmutableList.of()); pages.add(shaderPacks); } diff --git a/src/main/resources/assets/iris/lang/en_us.json b/src/main/resources/assets/iris/lang/en_us.json index 085da7bd44..3054781044 100644 --- a/src/main/resources/assets/iris/lang/en_us.json +++ b/src/main/resources/assets/iris/lang/en_us.json @@ -54,6 +54,7 @@ "options.iris.profile": "Profile", "options.iris.profile.custom": "Custom", "options.iris.shadowDistance": "Max Shadow Distance", + "options.iris.shadowDistance.sodium_tooltip": "The shadow render distance controls how far away terrain can potentially be rendered in the shadow pass. Lower distances mean that less terrain will be rendered, improving frame rates. This option cannot be changed on packs which explicitly specify a shadow render distance. The actual shadow render distance is capped by the View Distance setting.", "options.iris.shadowDistance.enabled": "Allows you to change the maximum distance for shadows. Terrain and entities beyond this distance will not cast shadows. Lowering the shadow distance can significantly increase performance.", "options.iris.shadowDistance.disabled": "Your current shader pack has already set a render distance for shadows; you cannot change it.", "options.iris.gui.hide": "Hide GUI",