<commit_before>package tamaized.aov.client;

import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumHandSide;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.RenderHandEvent;
import net.minecraftforge.client.event.RenderLivingEvent;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.client.event.RenderSpecificHandEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.opengl.GL11;
import tamaized.aov.AoV;
import tamaized.aov.client.entity.ModelPolymorphWolf;
import tamaized.aov.client.gui.AoVOverlay;
import tamaized.aov.common.capabilities.CapabilityList;
import tamaized.aov.common.capabilities.aov.IAoVCapability;
import tamaized.aov.common.capabilities.leap.ILeapCapability;
import tamaized.aov.common.capabilities.polymorph.IPolymorphCapability;
import tamaized.aov.common.core.abilities.Abilities;
import tamaized.tammodized.common.helper.CapabilityHelper;

public class RenderPlayer {

	private static final ResourceLocation TEXTURE_WING = new ResourceLocation(AoV.modid, "textures/entity/wing.png");
	private static final ResourceLocation TEXTURE_SUNBODY = new ResourceLocation(AoV.modid, "textures/entity/sunbody.png");
	private static final ModelPolymorphWolf WOLF_MODEL = new ModelPolymorphWolf();
	private static final ResourceLocation WOLF_TEXTURES = new ResourceLocation("textures/entity/wolf/wolf.png");
	private static boolean hackyshit = false;

	@SubscribeEvent
	public void render(RenderPlayerEvent.Pre e) {
		EntityPlayer player = e.getEntityPlayer();
		IPolymorphCapability cap = CapabilityHelper.getCap(player, CapabilityList.POLYMORPH, null);
		if (cap != null) {
			if (cap.getMorph() == IPolymorphCapability.Morph.Wolf) {
				GlStateManager.pushMatrix();
				float swingProgress = player.limbSwing - player.limbSwingAmount * (1.0F - e.getPartialRenderTick());//e.getRenderer().getMainModel().swingProgress;
				float swingAmount = player.prevLimbSwingAmount + (player.limbSwingAmount - player.prevLimbSwingAmount) * e.getPartialRenderTick();
				if (swingAmount > 1.0F)
					swingAmount = 1.0F;
				float f = this.interpolateRotation(player.prevRenderYawOffset, player.renderYawOffset, e.getPartialRenderTick());
				float f1 = this.interpolateRotation(player.prevRotationYawHead, player.rotationYawHead, e.getPartialRenderTick());
				float netHeadYaw = f1 - f;
				float headPitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * e.getPartialRenderTick();
				float ticksExisted = 0.53F * (float) Math.PI;
				applyRotations(player, ticksExisted, f, e.getPartialRenderTick());
				float scale = e.getRenderer().prepareScale((AbstractClientPlayer) player, e.getPartialRenderTick());
				WOLF_MODEL.setLivingAnimations(player, swingProgress, swingAmount, e.getPartialRenderTick());
				WOLF_MODEL.setRotationAngles(swingProgress, swingAmount, ticksExisted, netHeadYaw, headPitch, scale, player);
				e.getRenderer().bindTexture(WOLF_TEXTURES);
				WOLF_MODEL.render(player, swingProgress, swingAmount, ticksExisted, netHeadYaw, headPitch, scale);
				GlStateManager.popMatrix();
				e.setCanceled(true);
			}
		}
	}

	@SubscribeEvent
	public void render(RenderPlayerEvent.Post e) {
		EntityPlayer player = e.getEntityPlayer();
		ILeapCapability cap = CapabilityHelper.getCap(player, CapabilityList.LEAP, null);
		if (cap == null || cap.getLeapDuration() <= 0)
			return;
		GlStateManager.pushMatrix();
		{
			Tessellator tess = Tessellator.getInstance();
			BufferBuilder buffer = tess.getBuffer();
			GlStateManager.enableBlend();
			GlStateManager.popMatrix();
			GlStateManager.disableCull();
			float perc = (float) cap.getLeapDuration() / (float) cap.getMaxLeapDuration();
			GlStateManager.color(1, 1, 1, perc);
			float scale = 1;
			GlStateManager.translate(e.getX(), e.getY(), e.getZ());
			GlStateManager.scale(scale, scale, scale);
			GlStateManager.rotate(-player.renderYawOffset, 0, 1, 0);
			if (player.isSneaking()) {<commit_msg>???????<commit_after>package tamaized.aov.client;

import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumHandSide;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.RenderHandEvent;
import net.minecraftforge.client.event.RenderLivingEvent;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.client.event.RenderSpecificHandEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.opengl.GL11;
import tamaized.aov.AoV;
import tamaized.aov.client.entity.ModelPolymorphWolf;
import tamaized.aov.client.gui.AoVOverlay;
import tamaized.aov.common.capabilities.CapabilityList;
import tamaized.aov.common.capabilities.aov.IAoVCapability;
import tamaized.aov.common.capabilities.leap.ILeapCapability;
import tamaized.aov.common.capabilities.polymorph.IPolymorphCapability;
import tamaized.aov.common.core.abilities.Abilities;
import tamaized.tammodized.common.helper.CapabilityHelper;

public class RenderPlayer {

	private static final ResourceLocation TEXTURE_WING = new ResourceLocation(AoV.modid, "textures/entity/wing.png");
	private static final ResourceLocation TEXTURE_SUNBODY = new ResourceLocation(AoV.modid, "textures/entity/sunbody.png");
	private static final ModelPolymorphWolf WOLF_MODEL = new ModelPolymorphWolf();
	private static final ResourceLocation WOLF_TEXTURES = new ResourceLocation("textures/entity/wolf/wolf.png");
	private static boolean hackyshit = false;

	@SubscribeEvent
	public void render(RenderPlayerEvent.Pre e) {
		EntityPlayer player = e.getEntityPlayer();
		IPolymorphCapability cap = CapabilityHelper.getCap(player, CapabilityList.POLYMORPH, null);
		if (cap != null) {
			if (cap.getMorph() == IPolymorphCapability.Morph.Wolf) {
				GlStateManager.pushMatrix();
				float swingProgress = player.limbSwing - player.limbSwingAmount * (1.0F - e.getPartialRenderTick());//e.getRenderer().getMainModel().swingProgress;
				float swingAmount = player.prevLimbSwingAmount + (player.limbSwingAmount - player.prevLimbSwingAmount) * e.getPartialRenderTick();
				if (swingAmount > 1.0F)
					swingAmount = 1.0F;
				float f = this.interpolateRotation(player.prevRenderYawOffset, player.renderYawOffset, e.getPartialRenderTick());
				float f1 = this.interpolateRotation(player.prevRotationYawHead, player.rotationYawHead, e.getPartialRenderTick());
				float netHeadYaw = f1 - f;
				float headPitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * e.getPartialRenderTick();
				float ticksExisted = 0.53F * (float) Math.PI;
				applyRotations(player, ticksExisted, f, e.getPartialRenderTick());
				float scale = e.getRenderer().prepareScale((AbstractClientPlayer) player, e.getPartialRenderTick());
				WOLF_MODEL.setLivingAnimations(player, swingProgress, swingAmount, e.getPartialRenderTick());
				WOLF_MODEL.setRotationAngles(swingProgress, swingAmount, ticksExisted, netHeadYaw, headPitch, scale, player);
				e.getRenderer().bindTexture(WOLF_TEXTURES);
				WOLF_MODEL.render(player, swingProgress, swingAmount, ticksExisted, netHeadYaw, headPitch, scale);
				GlStateManager.popMatrix();
				e.setCanceled(true);
			}
		}
	}

	@SubscribeEvent
	public void render(RenderPlayerEvent.Post e) {
		EntityPlayer player = e.getEntityPlayer();
		ILeapCapability cap = CapabilityHelper.getCap(player, CapabilityList.LEAP, null);
		if (cap == null || cap.getLeapDuration() <= 0)
			return;
		GlStateManager.pushMatrix();
		{
			Tessellator tess = Tessellator.getInstance();
			BufferBuilder buffer = tess.getBuffer();
			GlStateManager.enableBlend();
			GlStateManager.disableCull();
			float perc = (float) cap.getLeapDuration() / (float) cap.getMaxLeapDuration();
			GlStateManager.color(1, 1, 1, perc);
			float scale = 1;
			GlStateManager.translate(e.getX(), e.getY(), e.getZ());
			GlStateManager.scale(scale, scale, scale);
			GlStateManager.rotate(-player.renderYawOffset, 0, 1, 0);
			if (player.isSneaking()) {
{'fraction_non_alphanumeric': 0.11007482919423056, 'fraction_numerical': 0.004554820518381954, 'mean_word_length': 6.0504587155963305, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7315371', 'n_tokens_mistral': 3153, 'n_tokens_neox': 2932, 'n_words': 491}