use of micdoodle8.mods.galacticraft.planets.mars.tile.TileEntityGasLiquefier in project Galacticraft by micdoodle8.
the class BlockMachineMarsT2 method randomDisplayTick.
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand) {
final TileEntity te = worldIn.getTileEntity(pos);
if (te instanceof TileEntityGasLiquefier) {
final TileEntityGasLiquefier tileEntity = (TileEntityGasLiquefier) te;
if (tileEntity.processTicks > 0) {
final float x = pos.getX() + 0.5F;
final float y = pos.getY() + 0.8F + 0.05F * rand.nextInt(3);
final float z = pos.getZ() + 0.5F;
for (float i = -0.41F + 0.16F * rand.nextFloat(); i < 0.5F; i += 0.167F) {
if (rand.nextInt(3) == 0) {
GalacticraftCore.proxy.spawnParticle("whiteSmokeTiny", new Vector3(x + i, y, z - 0.41F), new Vector3(0.0D, -0.015D, -0.0015D), new Object[] {});
}
if (rand.nextInt(3) == 0) {
GalacticraftCore.proxy.spawnParticle("whiteSmokeTiny", new Vector3(x + i, y, z + 0.537F), new Vector3(0.0D, -0.015D, 0.0015D), new Object[] {});
}
if (rand.nextInt(3) == 0) {
GalacticraftCore.proxy.spawnParticle("whiteSmokeTiny", new Vector3(x - 0.41F, y, z + i), new Vector3(-0.0015D, -0.015D, 0.0D), new Object[] {});
}
if (rand.nextInt(3) == 0) {
GalacticraftCore.proxy.spawnParticle("whiteSmokeTiny", new Vector3(x + 0.537F, y, z + i), new Vector3(0.0015D, -0.015D, 0.0D), new Object[] {});
}
}
}
}
}
use of micdoodle8.mods.galacticraft.planets.mars.tile.TileEntityGasLiquefier in project Galacticraft by micdoodle8.
the class BlockMachineMarsT2 method createTileEntity.
@Override
public TileEntity createTileEntity(World world, IBlockState state) {
int metadata = state.getBlock().getMetaFromState(state);
metadata &= 12;
if (metadata == BlockMachineMarsT2.GAS_LIQUEFIER_META) {
return new TileEntityGasLiquefier();
} else if (metadata == BlockMachineMarsT2.METHANE_SYNTHESIZER_META) {
return new TileEntityMethaneSynthesizer();
} else if (metadata == BlockMachineMarsT2.ELECTROLYZER_META) {
return new TileEntityElectrolyzer();
}
return null;
}
Aggregations