Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MerchantPug committed Mar 13, 2024
1 parent b002216 commit 5a617e8
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.PostChain;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.resources.ResourceManager;
Expand All @@ -37,6 +38,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import javax.annotation.Nullable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Optional;
Expand All @@ -59,6 +61,11 @@ public abstract class GameRendererMixin {
@Final
private ResourceManager resourceManager;

@Shadow @Nullable
private PostChain postEffect;

@Shadow private boolean effectActive;

@Shadow
public abstract void loadEffect(ResourceLocation identifier);

Expand All @@ -78,7 +85,7 @@ private void loadShaderFromPowerOnCameraEntity(Entity entity, CallbackInfo ci) {
}
}

/*@Inject(at = @At("HEAD"), method = "render")
@Inject(at = @At("HEAD"), method = "render")
private void loadShaderFromPower(float tickDelta, long startTime, boolean tick, CallbackInfo ci) {
if (ApoliPowers.SHADER.isPresent()) {
IPowerContainer.withPower(this.minecraft.getCameraEntity(), ApoliPowers.SHADER.get(), null, shaderPower -> {
Expand All @@ -97,7 +104,7 @@ private void loadShaderFromPower(float tickDelta, long startTime, boolean tick,
this.currentlyLoadedShader = null;
}
}
}*/
}

@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;getMainRenderTarget()Lcom/mojang/blaze3d/pipeline/RenderTarget;"), method = "render")
private void fixHudWithShaderEnabled(float tickDelta, long nanoTime, boolean renderLevel, CallbackInfo info) {
Expand Down

0 comments on commit 5a617e8

Please sign in to comment.