mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-19 03:49:22 +00:00
remove access transformer to invoke EntityRenderer#getNightVisionBrightness (#1001)
This commit is contained in:
1 parent
49c04cf776
commit
a8153fa0f7
5 files changed
+10
-24
No files matched your search
@@ -196,12 +196,6 @@ public enum Mixins implements IMixins {
|
||||
)
|
||||
),
|
||||
|
||||
IRIS_ACCESSORS(new MixinBuilder()
|
||||
.setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableIris)
|
||||
.addClientMixins("shaders.accessors.MixinEntityRenderer")
|
||||
),
|
||||
|
||||
ANGELICA_TEXTURE(new MixinBuilder()
|
||||
.setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.enableIris || AngelicaConfig.enableSodium)
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.awt.image.BufferedImage;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.gtnewhorizons.angelica.mixins.interfaces.EntityRendererAccessor;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.potion.Potion;
|
||||
@@ -83,9 +84,8 @@ public final class Lightmap {
|
||||
}
|
||||
|
||||
private float getNightVisionStrength(EntityRenderer renderer, float n) {
|
||||
|
||||
if (Minecraft.getMinecraft().thePlayer.isPotionActive(Potion.nightVision)) {
|
||||
return renderer.getNightVisionBrightness(Minecraft.getMinecraft().thePlayer, n);
|
||||
return ((EntityRendererAccessor) renderer).invokeGetNightVisionBrightness(Minecraft.getMinecraft().thePlayer, n);
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user