Skip to content

Commit

Permalink
Some bugfixes for newer Rubidium
Browse files Browse the repository at this point in the history
Using local maven until Rubidium release
  • Loading branch information
Asek3 committed Sep 5, 2023
1 parent 71fdbf0 commit 1f3fedd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ version = project.mod_version
group = project.maven_group

repositories {
mavenLocal()
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
Expand All @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Options, Integer> createMaxShadowDistanceSlider(MinecraftOptionsStorage vanillaOpts) {
OptionImpl<Options, Integer> 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 {
Expand All @@ -41,10 +41,9 @@ public static OptionImpl<Options, Integer> createMaxShadowDistanceSlider(Minecra

public static OptionImpl<Options, SupportedGraphicsMode> 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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ protected MixinSodiumOptionsGUI(Component title) {

@Inject(method = "<init>", 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);
}

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/iris/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1f3fedd

Please sign in to comment.