Skip to content

Commit

Permalink
we love mixin remapping
Browse files Browse the repository at this point in the history
  • Loading branch information
gliscowo committed Dec 9, 2024
1 parent 1884dcb commit b5a115c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class SodiumProgramsMixin {
@Unique
private static final TerrainRenderPass SKY_PASS = Arrays.stream(DefaultTerrainRenderPasses.ALL).filter(pass -> ((TerrainRenderPassAccessor) pass).affinity$getLayer() == SkyCaptureBuffer.SKY_STENCIL_LAYER).findFirst().get();

@Inject(method = "mapTerrainRenderPass", at = @At("HEAD"), cancellable = true)
@Inject(method = "mapTerrainRenderPass", at = @At("HEAD"), cancellable = true, remap = false)
private void fixSky(TerrainRenderPass pass, CallbackInfoReturnable<SodiumPrograms.Pass> cir) {
if (pass != SKY_PASS) return;
cir.setReturnValue(ShadowRenderingState.areShadowsCurrentlyBeingRendered() ? SodiumPrograms.Pass.SHADOW : SodiumPrograms.Pass.TERRAIN);
Expand Down

0 comments on commit b5a115c

Please sign in to comment.