2018-06-20 23:54:41 +02:00
|
|
|
package com.minelittlepony.mixin;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2018-08-20 22:24:22 +02:00
|
|
|
import com.minelittlepony.render.LevitatingItemRenderer;
|
2018-06-20 23:54:41 +02:00
|
|
|
import com.minelittlepony.render.PonySkullRenderer;
|
|
|
|
|
|
|
|
import net.minecraft.client.renderer.GlStateManager;
|
|
|
|
|
|
|
|
@Mixin(GlStateManager.class)
|
|
|
|
public abstract class MixinGlStateManager {
|
|
|
|
|
|
|
|
@Inject(method = "enableBlendProfile(Lnet/minecraft/client/renderer/GlStateManager$Profile;)V", at = @At("HEAD"), cancellable = true)
|
|
|
|
private static void enableBlendProfile(GlStateManager.Profile profile, CallbackInfo info) {
|
|
|
|
if (profile == GlStateManager.Profile.PLAYER_SKIN && PonySkullRenderer.ponyInstance.usesTransparency()) {
|
2018-08-20 22:24:22 +02:00
|
|
|
LevitatingItemRenderer.enableItemGlowRenderProfile();
|
2018-06-20 23:54:41 +02:00
|
|
|
info.cancel();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|