More attempts at the armour rendering, and an attempt to fix the entities.
This commit is contained in:
parent
43c1386c78
commit
32e6539deb
10 changed files with 20 additions and 19 deletions
|
@ -29,9 +29,11 @@ public class ClientEventHandler
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void renderPOVArmour(RenderHandEvent event)
|
public void renderPOVArmour(RenderHandEvent event)
|
||||||
{
|
{
|
||||||
if (this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.enableEverythingIsScrewedUpMode())
|
// if (this.mc.thePlayer.worldObj.isRemote && this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.enableEverythingIsScrewedUpMode())
|
||||||
{
|
{
|
||||||
currentPlayerTexture = ((AbstractClientPlayer) mc.thePlayer).getLocationSkin();
|
currentPlayerTexture = ((AbstractClientPlayer) mc.thePlayer).getLocationSkin();
|
||||||
|
|
||||||
|
// if(mc.thePlayer.isAirBorne)
|
||||||
ClientUtils.renderPlayerArmourInPOV(mc.thePlayer, event.partialTicks);
|
ClientUtils.renderPlayerArmourInPOV(mc.thePlayer, event.partialTicks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.client;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||||
import net.minecraft.client.entity.EntityPlayerSP;
|
import net.minecraft.client.entity.EntityPlayerSP;
|
||||||
|
import net.minecraft.client.model.ModelRenderer;
|
||||||
import net.minecraft.client.renderer.OpenGlHelper;
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.renderer.entity.Render;
|
import net.minecraft.client.renderer.entity.Render;
|
||||||
|
@ -26,11 +27,11 @@ public class ClientUtils
|
||||||
float f1 = 1.0f;//this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTickTime;
|
float f1 = 1.0f;//this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTickTime;
|
||||||
EntityClientPlayerMP entityclientplayermp = mc.thePlayer;
|
EntityClientPlayerMP entityclientplayermp = mc.thePlayer;
|
||||||
float f2 = entityclientplayermp.prevRotationPitch + (entityclientplayermp.rotationPitch - entityclientplayermp.prevRotationPitch) * partialTickTime;
|
float f2 = entityclientplayermp.prevRotationPitch + (entityclientplayermp.rotationPitch - entityclientplayermp.prevRotationPitch) * partialTickTime;
|
||||||
GL11.glPushMatrix();
|
// GL11.glPushMatrix();
|
||||||
GL11.glRotatef(f2, 1.0F, 0.0F, 0.0F);
|
GL11.glRotatef(180 - (entityclientplayermp.prevRotationYaw + (entityclientplayermp.rotationYaw - entityclientplayermp.prevRotationYaw) * partialTickTime), 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glRotatef(entityclientplayermp.prevRotationYaw + (entityclientplayermp.rotationYaw - entityclientplayermp.prevRotationYaw) * partialTickTime, 0.0F, 1.0F, 0.0F);
|
GL11.glRotatef(-f2, 1.0F, 0.0F, 0.0F);
|
||||||
RenderHelper.enableStandardItemLighting();
|
RenderHelper.enableStandardItemLighting();
|
||||||
GL11.glPopMatrix();
|
// GL11.glPopMatrix();
|
||||||
EntityPlayerSP entityplayersp = (EntityPlayerSP)entityclientplayermp;
|
EntityPlayerSP entityplayersp = (EntityPlayerSP)entityclientplayermp;
|
||||||
float f3 = entityplayersp.prevRenderArmPitch + (entityplayersp.renderArmPitch - entityplayersp.prevRenderArmPitch) * partialTickTime;
|
float f3 = entityplayersp.prevRenderArmPitch + (entityplayersp.renderArmPitch - entityplayersp.prevRenderArmPitch) * partialTickTime;
|
||||||
float f4 = entityplayersp.prevRenderArmYaw + (entityplayersp.renderArmYaw - entityplayersp.prevRenderArmYaw) * partialTickTime;
|
float f4 = entityplayersp.prevRenderArmYaw + (entityplayersp.renderArmYaw - entityplayersp.prevRenderArmYaw) * partialTickTime;
|
||||||
|
@ -215,9 +216,14 @@ public class ClientUtils
|
||||||
{
|
{
|
||||||
float f = 1.0F;
|
float f = 1.0F;
|
||||||
GL11.glColor3f(f, f, f);
|
GL11.glColor3f(f, f, f);
|
||||||
renderer.modelBipedMain.onGround = 0.0F;
|
|
||||||
renderer.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, player);
|
ModelRenderer mRenderer = new POVArmourModelWrapper(renderer.modelBipedMain);
|
||||||
renderer.modelBipedMain.bipedRightArm.addChild(new POVArmourModelWrapper(renderer.modelBipedMain));
|
// renderer.modelBipedMain.onGround = 0.0F;
|
||||||
renderer.modelBipedMain.bipedRightArm.render(0.0625F);
|
// mRenderer.rotateAngleX = 1;
|
||||||
|
GL11.glTranslatef(-0.3f, -0.25f, 0);
|
||||||
|
mRenderer.render(0.0625F);
|
||||||
|
// renderer.modelBipedMain.bipedRightArm.addChild(new POVArmourModelWrapper(renderer.modelBipedMain));
|
||||||
|
// renderer.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, player);
|
||||||
|
// renderer.modelBipedMain.bipedRightArm.render(0.0625F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class POVArmourModelWrapper extends ModelRenderer
|
||||||
// if (info != null && info.hasPart)
|
// if (info != null && info.hasPart)
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslated(0.3, -.1, 0);
|
// GL11.glTranslated(0.3, -.1, 0);
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(resource);
|
Minecraft.getMinecraft().renderEngine.bindTexture(resource);
|
||||||
armModel.render(partialTicks);
|
armModel.render(partialTicks);
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,6 @@ public class EntityBileDemon extends EntityDemon
|
||||||
{
|
{
|
||||||
super.entityInit();
|
super.entityInit();
|
||||||
this.dataWatcher.addObject(18, this.getHealth());
|
this.dataWatcher.addObject(18, this.getHealth());
|
||||||
this.dataWatcher.addObject(19, 0);
|
|
||||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
||||||
{
|
{
|
||||||
super.entityInit();
|
super.entityInit();
|
||||||
this.dataWatcher.addObject(18, this.getHealth());
|
this.dataWatcher.addObject(18, this.getHealth());
|
||||||
this.dataWatcher.addObject(19, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -115,7 +115,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
||||||
{
|
{
|
||||||
super.entityInit();
|
super.entityInit();
|
||||||
this.dataWatcher.addObject(18, this.getHealth());
|
this.dataWatcher.addObject(18, this.getHealth());
|
||||||
this.dataWatcher.addObject(19, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -99,7 +99,6 @@ public class EntityLowerGuardian extends EntityDemon
|
||||||
{
|
{
|
||||||
super.entityInit();
|
super.entityInit();
|
||||||
this.dataWatcher.addObject(18, this.getHealth());
|
this.dataWatcher.addObject(18, this.getHealth());
|
||||||
this.dataWatcher.addObject(19, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -105,7 +105,6 @@ public class EntityShade extends EntityDemon
|
||||||
{
|
{
|
||||||
super.entityInit();
|
super.entityInit();
|
||||||
this.dataWatcher.addObject(18, this.getHealth());
|
this.dataWatcher.addObject(18, this.getHealth());
|
||||||
this.dataWatcher.addObject(19, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -103,7 +103,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
||||||
{
|
{
|
||||||
super.entityInit();
|
super.entityInit();
|
||||||
this.dataWatcher.addObject(18, this.getHealth());
|
this.dataWatcher.addObject(18, this.getHealth());
|
||||||
this.dataWatcher.addObject(19, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -107,7 +107,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
||||||
{
|
{
|
||||||
super.entityInit();
|
super.entityInit();
|
||||||
this.dataWatcher.addObject(18, this.getHealth());
|
this.dataWatcher.addObject(18, this.getHealth());
|
||||||
this.dataWatcher.addObject(19, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue