mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-23 21:59:44 +00:00
Fix for GUI lighting states (#148)
* Fix for GUI lighting states * Lighting fix after RenderTickEvent because mods love to abuse it * Remove unnecessary glEnable * Remove unused import
This commit is contained in:
1 parent
17dddb6691
commit
d497c301c9
3 files changed
+21
-28
No files matched your search
@@ -26,6 +26,7 @@ public enum Mixins {
|
||||
.setPhase(Phase.EARLY).addMixinClasses(
|
||||
"angelica.MixinActiveRenderInfo"
|
||||
,"angelica.MixinEntityRenderer"
|
||||
,"angelica.MixinMinecraft"
|
||||
)
|
||||
),
|
||||
ANGELICA_VBO(
|
||||
@@ -49,12 +50,6 @@ public enum Mixins {
|
||||
)
|
||||
),
|
||||
|
||||
ANGELICA_THAUMCRAFT_COMPAT(new Builder("Angelica Thaumcraft Compat").addTargetedMod(TargetedMod.THAUMCRAFT).setSide(Side.CLIENT)
|
||||
.setPhase(Phase.EARLY).addMixinClasses(
|
||||
"angelica.thaumcraft.MixinClientTickEventsFML"
|
||||
)
|
||||
),
|
||||
|
||||
// Not compatible with the lwjgl debug callbacks, so disable if that's enabled
|
||||
ARCHAIC_SPLASH(new Builder("ArchaicFix Splash").addTargetedMod(TargetedMod.VANILLA).setSide(Side.CLIENT)
|
||||
.setPhase(Phase.EARLY).setApplyIf(() -> AngelicaConfig.showSplashMemoryBar && !AngelicaMod.lwjglDebug).addMixinClasses(
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.gtnewhorizons.angelica.mixins.early.angelica;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
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;
|
||||
|
||||
@Mixin(Minecraft.class)
|
||||
public class MixinMinecraft {
|
||||
|
||||
@Inject(
|
||||
method = "runGameLoop",
|
||||
at = @At(value = "INVOKE", target = "Lcpw/mods/fml/common/FMLCommonHandler;onRenderTickEnd(F)V", shift = At.Shift.AFTER)
|
||||
)
|
||||
private void angelica$injectLightingFixPostRenderTick(CallbackInfo ci) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
package com.gtnewhorizons.angelica.mixins.early.angelica.thaumcraft;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
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 thaumcraft.client.lib.ClientTickEventsFML;
|
||||
|
||||
@Mixin(ClientTickEventsFML.class)
|
||||
public class MixinClientTickEventsFML {
|
||||
|
||||
/**
|
||||
* Thaumcraft disables lighting and only re-enables it if actually drawing an aspect(hovering over an item that
|
||||
* you can see the aspect for and draws it). This shoves in a lighting re-enable at the end so that it is always
|
||||
* re-enabled regardless.
|
||||
*/
|
||||
@Inject(method = "renderAspectsInGui", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glPopAttrib()V"), remap = false)
|
||||
private void angelica$lightingFix(CallbackInfo ci) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user