Search in sources :

Example 1 with TileEntityGasLiquefier

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[] {});
                }
            }
        }
    }
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) TileEntityGasLiquefier(micdoodle8.mods.galacticraft.planets.mars.tile.TileEntityGasLiquefier) Vector3(micdoodle8.mods.galacticraft.api.vector.Vector3) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 2 with TileEntityGasLiquefier

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;
}
Also used : TileEntityGasLiquefier(micdoodle8.mods.galacticraft.planets.mars.tile.TileEntityGasLiquefier) TileEntityMethaneSynthesizer(micdoodle8.mods.galacticraft.planets.mars.tile.TileEntityMethaneSynthesizer) TileEntityElectrolyzer(micdoodle8.mods.galacticraft.planets.mars.tile.TileEntityElectrolyzer)

Aggregations

TileEntityGasLiquefier (micdoodle8.mods.galacticraft.planets.mars.tile.TileEntityGasLiquefier)2 Vector3 (micdoodle8.mods.galacticraft.api.vector.Vector3)1 TileEntityElectrolyzer (micdoodle8.mods.galacticraft.planets.mars.tile.TileEntityElectrolyzer)1 TileEntityMethaneSynthesizer (micdoodle8.mods.galacticraft.planets.mars.tile.TileEntityMethaneSynthesizer)1 TileEntity (net.minecraft.tileentity.TileEntity)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1