Skip to content

Commit

Permalink
Reimplement the changes to the entity rendering in the custom rendere…
Browse files Browse the repository at this point in the history
…rs so their animations n stuff isn't b0rked anymore. (todo: do properly later)
  • Loading branch information
bonii-xx committed Oct 10, 2014
1 parent 28f16ac commit 17593a3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/main/java/tconstruct/client/FlexibleToolRenderer.java
Expand Up @@ -96,9 +96,6 @@ public void renderItem (ItemRenderType type, ItemStack item, Object... data) {
GL11.glEnable(GL12.GL_RESCALE_NORMAL);

if(type != ItemRenderType.ENTITY) {
GL11.glTranslatef(0.5f, 0.5f, 0);
GL11.glScalef(0.5f, 0.5f, 0.5f);

specialAnimation(type, item);
}
else
Expand Down
Expand Up @@ -21,6 +21,9 @@ public class BowRenderer extends FlexibleToolRenderer {
protected void specialAnimation(ItemRenderType type, ItemStack item) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;

GL11.glTranslatef(0.5f, 0.5f, 0);
GL11.glScalef(0.5f, 0.5f, 0.5f);

if(type == ItemRenderType.EQUIPPED)
{
//GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
Expand Down Expand Up @@ -111,5 +114,7 @@ else if(type == ItemRenderType.EQUIPPED && player.isUsingItem())
GL11.glScalef(2.3f, 2.3f, 1.0f);
else if(item.getItem() == TinkerWeaponry.shortbow)
GL11.glScalef(1.7f, 1.7f, 1.0f);

GL11.glTranslatef(-0.5f, -0.5f, 0f);
}
}
Expand Up @@ -19,6 +19,9 @@ protected void specialAnimation(ItemRenderType type, ItemStack item) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
Crossbow crossbow = (Crossbow)item.getItem();

GL11.glTranslatef(0.5f, 0.5f, 0);
GL11.glScalef(0.5f, 0.5f, 0.5f);

GL11.glScalef(1.5f, 1.5f, 1.5f);

if(type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
Expand Down Expand Up @@ -69,5 +72,7 @@ protected void specialAnimation(ItemRenderType type, ItemStack item) {
GL11.glTranslatef(0.25f, 0, 0);
GL11.glRotatef(45.0F, 0.0F, 0.0F, 1.0F);
}

GL11.glTranslatef(-0.5f, -0.5f, 0f);
}
}
Expand Up @@ -10,6 +10,9 @@ public class JavelinRenderer extends AmmoItemRenderer {

@Override
protected void specialAnimation(ItemRenderType type, ItemStack item) {
GL11.glTranslatef(0.5f, 0.5f, 0);
GL11.glScalef(0.5f, 0.5f, 0.5f);

float progress = ((IWindup)item.getItem()).getWindupProgress(item, Minecraft.getMinecraft().thePlayer); // 0.5 while not winding

if(type == ItemRenderType.EQUIPPED)
Expand All @@ -21,5 +24,7 @@ protected void specialAnimation(ItemRenderType type, ItemStack item) {
if(type == ItemRenderType.EQUIPPED_FIRST_PERSON)
GL11.glTranslatef(0, progress * 0.4f, 0);
GL11.glRotatef(45, 0, 0, 1);

GL11.glTranslatef(-0.5f, -0.5f, 0f);
}
}
Expand Up @@ -15,6 +15,9 @@ public class ThrowingKnifeRenderer extends AmmoItemRenderer {

@Override
protected void specialAnimation(ItemRenderType type, ItemStack item) {
GL11.glTranslatef(0.5f, 0.5f, 0);
GL11.glScalef(0.5f, 0.5f, 0.5f);

float progress = ((IWindup)item.getItem()).getWindupProgress(item, mc.thePlayer);

if(type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
Expand Down Expand Up @@ -65,5 +68,7 @@ protected void specialAnimation(ItemRenderType type, ItemStack item) {
if(type == ItemRenderType.EQUIPPED)
GL11.glRotatef(-180, 0, 0, 1);


GL11.glTranslatef(-0.5f, -0.5f, 0f);
}
}

0 comments on commit 17593a3

Please sign in to comment.