Skip to content

Commit

Permalink
Merge branch '1.21/dev' into 1.21/stable
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed Dec 4, 2024
2 parents ff29b4e + b8d3c07 commit 3c70431
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ plugins {
id("fabric-loom") version ("1.8.9") apply (false)
}

val MINECRAFT_VERSION by extra { "1.21.3" }
val NEOFORGE_VERSION by extra { "21.3.0-beta" }
val MINECRAFT_VERSION by extra { "1.21.4" }
val NEOFORGE_VERSION by extra { "21.4.2-beta" }
val FABRIC_LOADER_VERSION by extra { "0.16.9" }
val FABRIC_API_VERSION by extra { "0.108.0+1.21.3" }
val FABRIC_API_VERSION by extra { "0.110.5+1.21.4" }

// This value can be set to null to disable Parchment.
val PARCHMENT_VERSION by extra { null }

// https://semver.org/
val MAVEN_GROUP by extra { "me.flashyreese.mods" }
val ARCHIVE_NAME by extra { "sodium-extra" }
val MOD_VERSION by extra { "0.6.0" }
val SODIUM_VERSION by extra { "mc1.21.3-0.6.0" }
val MOD_VERSION by extra { "0.6.1" }
val SODIUM_VERSION by extra { "mc1.21.4-0.6.2" }

allprojects {
apply(plugin = "java")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,9 @@ private void setOffset(int value) {
this.updateThumbPosition();
this.onSetOffset.run();
}

@Override
public boolean isMouseOver(double x, double y) {
return this.dim.containsCursor(x, y);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import me.flashyreese.mods.sodiumextra.client.SodiumExtraClientMod;
import net.minecraft.client.Camera;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.WeatherEffectRenderer;
import net.minecraft.server.level.ParticleStatus;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;

@Mixin(WeatherEffectRenderer.class)
public class MixinLevelRenderer {
Expand All @@ -22,8 +20,8 @@ public void tickRainSplashing(ClientLevel clientLevel, Camera camera, int i, Par
}
}

@Inject(method = "render(Lnet/minecraft/world/level/Level;Lnet/minecraft/client/renderer/LightTexture;IFLnet/minecraft/world/phys/Vec3;)V", at = @At(value = "HEAD"), cancellable = true)
private void renderWeather(Level level, LightTexture lightTexture, int i, float f, Vec3 vec3, CallbackInfo ci) {
@Inject(method = "render(Lnet/minecraft/client/renderer/MultiBufferSource;Lnet/minecraft/world/phys/Vec3;IFLjava/util/List;Ljava/util/List;)V", at = @At(value = "HEAD"), cancellable = true, locals = LocalCapture.NO_CAPTURE)
private void renderWeather(CallbackInfo ci) {
if (!(SodiumExtraClientMod.options().detailSettings.rainSnow)) {
ci.cancel();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.flashyreese.mods.sodiumextra.mixin.sky;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.Tesselator;
import me.flashyreese.mods.sodiumextra.client.SodiumExtraClientMod;
import net.minecraft.client.renderer.FogParameters;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.SkyRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -23,21 +23,21 @@ public void redirectRenderSkyDisc(float f, float g, float h, CallbackInfo ci) {
}

@Inject(method = "renderEndSky", at = @At(value = "HEAD"), cancellable = true)
public void preRenderEndSky(PoseStack stack, CallbackInfo ci) {
public void preRenderEndSky(CallbackInfo ci) {
if (!SodiumExtraClientMod.options().detailSettings.sky) {
ci.cancel();
}
}

@Inject(method = "renderSun", at = @At(value = "HEAD"), cancellable = true)
private void renderSun(float f, Tesselator tesselator, PoseStack poseStack, CallbackInfo ci) {
private void renderSun(float f, MultiBufferSource multiBufferSource, PoseStack poseStack, CallbackInfo ci) {
if (!SodiumExtraClientMod.options().detailSettings.sun) {
ci.cancel();
}
}

@Inject(method = "renderMoon", at = @At(value = "HEAD"), cancellable = true)
private void renderMoon(int i, float f, Tesselator tesselator, PoseStack poseStack, CallbackInfo ci) {
private void renderMoon(int i, float f, MultiBufferSource multiBufferSource, PoseStack poseStack, CallbackInfo ci) {
if (!SodiumExtraClientMod.options().detailSettings.moon) {
ci.cancel();
}
Expand Down

0 comments on commit 3c70431

Please sign in to comment.