Skip to content

Commit

Permalink
Update FluidRendererMixin.java to support Sodium 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
StartsMercury authored Aug 5, 2023
1 parent 15a6088 commit 51e81ae
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
import com.github.startsmercury.simply.no.shading.client.Config;
import com.github.startsmercury.simply.no.shading.client.SimplyNoShading;

import me.jellysquid.mods.sodium.client.model.color.ColorProvider;
import me.jellysquid.mods.sodium.client.model.light.LightPipeline;
import me.jellysquid.mods.sodium.client.model.quad.ModelQuadView;
import me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.FluidRenderer;
import me.jellysquid.mods.sodium.client.world.WorldSlice;

/**
* The {@code FluidRendererMixin} is a {@linkplain Mixin mixin} class for the
Expand All @@ -27,7 +31,7 @@ private FluidRendererMixin() {
/**
* This is a {@linkplain ModifyVariable variable modifier} that modifies the
* parameter {@code brightness} in
* {@code FluidRenderer.updateQuad(ModelQuadView, BlockAndTintGetter, BlockPos, LightPipeline, Direction, float, ColorSampler, FluidState)}.
* {@code FluidRenderer.updateQuad(ModelQuadView, WorldSlice, BlockPos, LightPipeline, Direction, float, ColorProvider<FluidState>, FluidState)}.
* <p>
* Returns the {@code brightness} when {@linkplain Config#blockShadingEnabled
* block shading is enabled}; {@code 1.0f} otherwise.
Expand All @@ -37,7 +41,7 @@ private FluidRendererMixin() {
* {@linkplain Config#blockShadingEnabled block shading is enabled};
* {@code 1.0f} otherwise
*/
@ModifyVariable(method = "updateQuad(Lme/jellysquid/mods/sodium/client/model/quad/ModelQuadView;Lnet/minecraft/world/level/BlockAndTintGetter;Lnet/minecraft/core/BlockPos;Lme/jellysquid/mods/sodium/client/model/light/LightPipeline;Lnet/minecraft/core/Direction;FLme/jellysquid/mods/sodium/client/model/quad/blender/ColorSampler;Lnet/minecraft/world/level/material/FluidState;)V",
@ModifyVariable(method = "updateQuad(Lme/jellysquid/mods/sodium/client/model/quad/ModelQuadView;Lme/jellysquid/mods/sodium/client/world/WorldSlice;Lnet/minecraft/core/BlockPos;Lme/jellysquid/mods/sodium/client/model/light/LightPipeline;Lnet/minecraft/core/Direction;FLme/jellysquid/mods/sodium/client/model/color/ColorProvider;Lnet/minecraft/world/level/material/FluidState;)V",
at = @At("HEAD"),
argsOnly = true)
private final float changeShade(final float brightness) {
Expand Down

0 comments on commit 51e81ae

Please sign in to comment.