From 59b3e5255cad61164065ec7f03a8245cd285619f Mon Sep 17 00:00:00 2001 From: Wehavecookies56 Date: Sat, 12 Mar 2016 20:12:14 +0000 Subject: [PATCH] Half fixed driver form render rotations --- .../kk/client/model/ModelPlayerDrive.java | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/main/java/wehavecookies56/kk/client/model/ModelPlayerDrive.java b/src/main/java/wehavecookies56/kk/client/model/ModelPlayerDrive.java index 0ca84513..a2b393ff 100644 --- a/src/main/java/wehavecookies56/kk/client/model/ModelPlayerDrive.java +++ b/src/main/java/wehavecookies56/kk/client/model/ModelPlayerDrive.java @@ -6,6 +6,7 @@ import api.player.model.ModelPlayerArmor; import api.player.model.ModelPlayerBase; import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; import wehavecookies56.kk.entities.ExtendedPlayer; @@ -36,10 +37,27 @@ public ModelPlayerDrive (ModelPlayerAPI modelPlayerAPI) { ResourceLocation driveInUseA; ResourceLocation driveInUseB; + ModelPlayerArmor drive; + + @Override + public void beforeRender (Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) { + super.beforeRender(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); + } + + @Override + public void afterRender (Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) { + super.afterRender(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); + + } + + @Override + public void afterSetRotationAngles (float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, Entity paramEntity) { + super.afterSetRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); + } + @Override public void render (Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) { super.render(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - if(ExtendedPlayer.get(Minecraft.getMinecraft().thePlayer).inDrive){ switch(ExtendedPlayer.get(Minecraft.getMinecraft().thePlayer).getDriveInUse()){ case Strings.Form_Valor: @@ -82,22 +100,23 @@ public void render (Entity paramEntity, float paramFloat1, float paramFloat2, fl driveInUseB = null; break; } - if(driveInUseA != null && driveInUseB != null){ - float size = (float) 0.0645; + float size = (float) paramFloat6; + drive = new ModelPlayerArmor(size); Minecraft.getMinecraft().renderEngine.bindTexture(driveInUseA); - ModelPlayerArmor drive = new ModelPlayerArmor(paramFloat6); - drive.setRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); + drive.copyModelAngles(modelPlayer.bipedBodyWear, drive.bipedBody); drive.bipedBody.render(size); + drive.copyModelAngles(modelPlayer.bipedLeftArm, drive.bipedLeftArm); drive.bipedLeftArm.render(size); + drive.copyModelAngles(modelPlayer.bipedRightArm, drive.bipedRightArm); drive.bipedRightArm.render(size); Minecraft.getMinecraft().renderEngine.bindTexture(driveInUseB); + drive.copyModelAngles(modelPlayer.bipedLeftLeg, drive.bipedLeftLeg); drive.bipedLeftLeg.render(size); + drive.copyModelAngles(modelPlayer.bipedRightLeg, drive.bipedRightLeg); drive.bipedRightLeg.render(size); } } - - } @Override @@ -140,7 +159,6 @@ public void renderRightArm () { armour.setRotationAngles(0, 0, 0, 0, 0, 0.0625f, Minecraft.getMinecraft().thePlayer); armour.bipedRightArm.render(0.0625f); } - } } }