use of forestry.core.blocks.BlockBase in project ForestryMC by ForestryMC.
the class RenderEngine method render.
@Override
public void render(TileEngine engine, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
if (engine != null) {
World worldObj = engine.getWorldObj();
if (worldObj.isBlockLoaded(engine.getPos())) {
IBlockState blockState = worldObj.getBlockState(engine.getPos());
if (blockState.getBlock() instanceof BlockBase) {
EnumFacing facing = blockState.getValue(BlockBase.FACING);
render(engine.getTemperatureState(), engine.progress, facing, x, y, z);
return;
}
}
}
render(TemperatureState.COOL, 0.25F, EnumFacing.UP, x, y, z);
}
use of forestry.core.blocks.BlockBase in project ForestryMC by ForestryMC.
the class RenderAnalyzer method render.
/**
* @param analyzer If it null its render the item else it render the tile entity.
*/
@Override
public void render(TileAnalyzer analyzer, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
if (analyzer != null) {
World worldObj = analyzer.getWorldObj();
if (worldObj.isBlockLoaded(analyzer.getPos())) {
IBlockState blockState = worldObj.getBlockState(analyzer.getPos());
if (blockState.getBlock() instanceof BlockBase) {
EnumFacing facing = blockState.getValue(BlockBase.FACING);
render(analyzer.getIndividualOnDisplay(), analyzer.getWorld(), facing, x, y, z);
return;
}
}
}
render(ItemStack.EMPTY, null, EnumFacing.WEST, x, y, z);
}
use of forestry.core.blocks.BlockBase in project ForestryMC by ForestryMC.
the class RenderMachine method render.
/**
* @param tile If it null its render the item else it render the tile entity.
*/
@Override
public void render(TileBase tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
if (tile != null) {
IRenderableTile generator = (IRenderableTile) tile;
World worldObj = tile.getWorldObj();
if (worldObj.isBlockLoaded(tile.getPos())) {
IBlockState blockState = worldObj.getBlockState(tile.getPos());
if (blockState.getBlock() instanceof BlockBase) {
EnumFacing facing = blockState.getValue(BlockBase.FACING);
render(generator.getResourceTankInfo(), generator.getProductTankInfo(), facing, x, y, z, destroyStage);
return;
}
}
}
render(TankRenderInfo.EMPTY, TankRenderInfo.EMPTY, EnumFacing.SOUTH, x, y, z, -1);
}
use of forestry.core.blocks.BlockBase in project ForestryMC by ForestryMC.
the class RenderNaturalistChest method render.
/**
* @param chest If it null its render the item else it render the tile entity.
*/
@Override
public void render(TileNaturalistChest chest, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
if (chest != null) {
World worldObj = chest.getWorldObj();
if (worldObj.isBlockLoaded(chest.getPos())) {
IBlockState blockState = worldObj.getBlockState(chest.getPos());
if (blockState.getBlock() instanceof BlockBase) {
EnumFacing facing = blockState.getValue(BlockBase.FACING);
render(facing, chest.prevLidAngle, chest.lidAngle, x, y, z, partialTicks);
return;
}
}
}
render(EnumFacing.SOUTH, 0, 0, x, y, z, 0);
}
use of forestry.core.blocks.BlockBase in project ForestryMC by ForestryMC.
the class RenderEscritoire method render.
/**
* @param escritoire If it null its render the item else it render the tile entity.
*/
@Override
public void render(TileEscritoire escritoire, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
if (escritoire != null) {
World world = escritoire.getWorldObj();
if (world.isBlockLoaded(escritoire.getPos())) {
IBlockState blockState = world.getBlockState(escritoire.getPos());
if (blockState.getBlock() instanceof BlockBase) {
EnumFacing facing = blockState.getValue(BlockBase.FACING);
render(escritoire.getIndividualOnDisplay(), world, facing, x, y, z);
return;
}
}
}
render(ItemStack.EMPTY, null, EnumFacing.SOUTH, x, y, z);
}
Aggregations