@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick)
{
if (tileEntity instanceof TileEntityAludel)
{
TileEntityAludel tileEntityAludel = (TileEntityAludel) tileEntity;
GL11.glPushMatrix();
// Scale, Translate, Rotate
scaleTranslateRotate(x, y, z, tileEntityAludel.getOrientation());
// Bind texture
this.bindTexture(Textures.Model.ALUDEL);
// Render
modelAludel.render();
GL11.glPopMatrix();
/**
* Render the ghost item inside of the Aludel, slowly spinning
*/
GL11.glPushMatrix();
TileEntity tileGlassBell = tileEntityAludel.getWorldObj().getTileEntity(tileEntityAludel.xCoord, tileEntityAludel.yCoord + 1, tileEntityAludel.zCoord);
if (tileGlassBell instanceof TileEntityGlassBell)
{
if (tileEntityAludel.outputItemStack != null)
{
float scaleFactor = getGhostItemScaleFactor(tileEntityAludel.outputItemStack);
float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
EntityItem ghostEntityItem = new EntityItem(tileEntityAludel.getWorldObj());
ghostEntityItem.hoverStart = 0.0F;
ghostEntityItem.setEntityItemStack(tileEntityAludel.outputItemStack);
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.25F, (float) z + 0.5F);
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);