Fixed charger item render position
This commit is contained in:
parent
788d39da02
commit
9b1fa08fe9
1 changed files with 21 additions and 1 deletions
|
@ -2,7 +2,11 @@ package resonantinduction.electrical.charger;
|
|||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import resonantinduction.core.render.RenderItemOverlayTile;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
|
||||
/** Renderer for electric item charger
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class RenderCharger extends RenderItemOverlayTile
|
||||
{
|
||||
|
||||
|
@ -11,7 +15,23 @@ public class RenderCharger extends RenderItemOverlayTile
|
|||
{
|
||||
if (tile instanceof TileCharger)
|
||||
{
|
||||
this.renderItemSingleSide(tile, x, y, z, ((TileCharger)tile).getStackInSlot(0), ((TileCharger)tile).getDirection(), "IDLE");
|
||||
Vector3 d = new Vector3();
|
||||
switch (((TileCharger) tile).getDirection())
|
||||
{
|
||||
case NORTH:
|
||||
d.translate(0, 0, .58);
|
||||
break;
|
||||
case SOUTH:
|
||||
d.translate(0, 0, -.58);
|
||||
break;
|
||||
case WEST:
|
||||
d.translate(.58, 0, 0);
|
||||
break;
|
||||
case EAST:
|
||||
d.translate(-.58, 0, 0);
|
||||
break;
|
||||
}
|
||||
this.renderItemSingleSide(tile, x + d.x, y + d.y, z + d.z, ((TileCharger) tile).getStackInSlot(0), ((TileCharger) tile).getDirection(), "IDLE");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue