package ganymedes01.etfuturum.core.handlers;

import ganymedes01.etfuturum.EtFuturum;
import ganymedes01.etfuturum.client.OpenGLHelper;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.client.event.RenderPlayerEvent.SetArmorModel;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;

public class ClientEventHandler {

	@SubscribeEvent
	public void renderPlayerEventPre(RenderPlayerEvent.Pre event) {
		if (EtFuturum.enableTransparentAmour)
			OpenGLHelper.enableBlend();
	}

	@SubscribeEvent
	public void renderPlayerSetArmour(SetArmorModel event) {
		if (EtFuturum.enableTransparentAmour)
			OpenGLHelper.enableBlend();
	}

	@SubscribeEvent
	public void renderPlayerEventPost(RenderPlayerEvent.Post event) {
		if (EtFuturum.enableTransparentAmour)
			OpenGLHelper.disableBlend();
	}
}
@@ -259,16 +259,48 @@
 rModel;%0A
+%0Aimport org.lwjgl.opengl.GL11;%0A%0A
 import c
@@ -496,32 +496,34 @@
 ransparentAmour)
+ %7B
 %0A%09%09%09OpenGLHelper
@@ -530,32 +530,111 @@
 .enableBlend();%0A
+%09%09%09OpenGLHelper.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);%0A%09%09%7D%0A
 %09%7D%0A%0A%09@SubscribeE
@@ -727,32 +727,34 @@
 ransparentAmour)
+ %7B
 %0A%09%09%09OpenGLHelper
@@ -769,16 +769,95 @@
 lend();%0A
+%09%09%09OpenGLHelper.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);%0A%09%09%7D%0A
 %09%7D%0A%0A%09@Su

Fix blending issue with armours above level 128