2014-02-22 23:14:43 +01:00
|
|
|
package appeng.client.render.blocks;
|
|
|
|
|
|
|
|
import net.minecraft.client.renderer.RenderBlocks;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraft.util.IIcon;
|
|
|
|
import net.minecraft.world.IBlockAccess;
|
|
|
|
import appeng.block.AEBaseBlock;
|
|
|
|
import appeng.client.render.BaseBlockRender;
|
2014-05-26 03:58:44 +02:00
|
|
|
import appeng.client.texture.ExtraBlockTextures;
|
2014-02-22 23:14:43 +01:00
|
|
|
import appeng.tile.misc.TileQuartzGrowthAccelerator;
|
|
|
|
|
|
|
|
public class RenderBlockQuartzAccelerator extends BaseBlockRender
|
|
|
|
{
|
|
|
|
|
|
|
|
public RenderBlockQuartzAccelerator() {
|
|
|
|
super( false, 20 );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean renderInWorld(AEBaseBlock blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
|
|
|
|
{
|
|
|
|
TileEntity te = world.getTileEntity( x, y, z );
|
|
|
|
if ( te instanceof TileQuartzGrowthAccelerator )
|
|
|
|
{
|
|
|
|
if ( ((TileQuartzGrowthAccelerator) te).hasPower )
|
|
|
|
{
|
2014-05-26 03:58:44 +02:00
|
|
|
IIcon top_Bottom = ExtraBlockTextures.BlockQuartzGrowthAcceleratorOn.getIcon();
|
|
|
|
IIcon side = ExtraBlockTextures.BlockQuartzGrowthAcceleratorSideOn.getIcon();
|
2014-02-22 23:14:43 +01:00
|
|
|
blk.getRendererInstance().setTemporaryRenderIcons( top_Bottom, top_Bottom, side, side, side, side );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
boolean out = super.renderInWorld( blk, world, x, y, z, renderer );
|
|
|
|
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
|
|
|
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
}
|