Fix dagger rotation center and allow more flexibility for that stuff.

This commit is contained in:
Bernhard Bonigl committed 2014-08-31 19:09:46 +02:00
1 parent 3f536410d8
commit 0e07f2c4b9
2 files changed
+25 -6

No files matched your search

@@ -17,9 +17,17 @@ import tconstruct.tools.entity.DaggerEntity;
public class ToolCoreRenderer implements IItemRenderer
{
private final boolean isEntity;
private final boolean noEntityTranslation;
public ToolCoreRenderer() { this(false, false); }
public ToolCoreRenderer(boolean isEntity) {
this(isEntity, false);
}
public ToolCoreRenderer(boolean isEntity, boolean noEntityTranslation) {
this.isEntity = isEntity;
this.noEntityTranslation = noEntityTranslation;
}
@Override
@@ -31,7 +39,6 @@ public class ToolCoreRenderer implements IItemRenderer
switch (type)
{
case ENTITY:
//GL11.glTranslatef(-0.0625F, -0.0625F, 0F);
return true;
case EQUIPPED:
GL11.glTranslatef(0.03f, 0F, -0.09375F);
@@ -162,7 +169,8 @@ public class ToolCoreRenderer implements IItemRenderer
GL11.glTranslatef(0, -4 / 16f, 0);
break;
case ENTITY:
GL11.glTranslatef(-0.5f, 0f, depth);
if(!noEntityTranslation)
GL11.glTranslatef(-0.5f, 0f, depth); // correction of the rotation point when items lie on the ground
break;
default:
}