package JAKJ . RedstoneInMotion ;

public class MotiveSpectreRenderer extends TileEntityRenderer
{
	@Override
	public void Render ( net . minecraft . tileentity . TileEntity TileEntity , float PartialTick )
	{
		MotiveSpectreEntity Spectre = ( MotiveSpectreEntity ) TileEntity ;

		if ( Spectre . RenderCacheKey == null )
		{
			return ;
		}

		{
			double Offset = Spectre . Velocity * ( Spectre . TicksExisted + PartialTick ) ;

			Render . Translate ( Offset * Spectre . MotionDirection . DeltaX - Spectre . xCoord , Offset * Spectre . MotionDirection . DeltaY - Spectre . yCoord ,
				Offset * Spectre . MotionDirection . DeltaZ - Spectre . zCoord ) ;
		}

		Integer DisplayList = CarriageRenderCache . Lookup ( Spectre . RenderCacheKey ) ;

		if ( DisplayList != null )
		{
			RenderEngine . ResetBoundTexture ( ) ;

			Render . ExecuteDisplayList ( DisplayList ) ;

			RenderEngine . ResetBoundTexture ( ) ;
		}
	}
}
