Examples of TileEntityOxygenPipe


Examples of micdoodle8.mods.galacticraft.core.tile.TileEntityOxygenPipe

        {

        }
        else if (metadata > 0 && metadata <= EnumEnclosedBlock.OXYGEN_PIPE.getMetadata())
        {
            return new TileEntityOxygenPipe();
        }
        else if (metadata <= EnumEnclosedBlock.IC2_LV_CABLE.getMetadata())
        {
            if (CompatibilityManager.isIc2Loaded())
            {
View Full Code Here

Examples of micdoodle8.mods.galacticraft.core.tile.TileEntityOxygenPipe

    @Override
    public TileEntity createNewTileEntity(World world, int metadata)
    {
        if (this == AsteroidBlocks.blockWalkwayOxygenPipe)
        {
          return new TileEntityOxygenPipe();
        }

        if (this == AsteroidBlocks.blockWalkwayWire)
        {
          return new TileEntityAluminumWire(2);
View Full Code Here

Examples of micdoodle8.mods.galacticraft.core.tile.TileEntityOxygenPipe

    }

    @Override
    public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6)
    {
        final TileEntityOxygenPipe tile = (TileEntityOxygenPipe) par1World.getTileEntity(par2, par3, par4);

        if (tile != null && tile.getColor() != 15)
        {
            final float f = 0.7F;
            final double d0 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5D;
            final double d1 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.2D + 0.6D;
            final double d2 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5D;
            final EntityItem entityitem = new EntityItem(par1World, par2 + d0, par3 + d1, par4 + d2, new ItemStack(Items.dye, 1, tile.getColor()));
            entityitem.delayBeforeCanPickup = 10;
            par1World.spawnEntityInWorld(entityitem);
        }

        super.breakBlock(par1World, par2, par3, par4, par5, par6);
View Full Code Here

Examples of micdoodle8.mods.galacticraft.core.tile.TileEntityOxygenPipe

    public IIcon getIcon(IBlockAccess par1IBlockAccess, int x, int y, int z, int par5)
    {
        BlockVec3 thisVec = new BlockVec3(x, y, z).modifyPositionFromSide(ForgeDirection.getOrientation(par5));
        final Block blockAt = thisVec.getBlock(par1IBlockAccess);

        final TileEntityOxygenPipe tileEntity = (TileEntityOxygenPipe) par1IBlockAccess.getTileEntity(x, y, z);

        if (blockAt == GCBlocks.oxygenPipe && ((TileEntityOxygenPipe) thisVec.getTileEntity(par1IBlockAccess)).getColor() == tileEntity.getColor())
        {
            return this.pipeIcons[15];
        }

        return this.pipeIcons[tileEntity.getColor()];
    }
View Full Code Here

Examples of micdoodle8.mods.galacticraft.core.tile.TileEntityOxygenPipe

    }

    @Override
    public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
    {
        final TileEntityOxygenPipe tileEntity = (TileEntityOxygenPipe) par1World.getTileEntity(x, y, z);

        if (!par1World.isRemote)
        {
            final ItemStack stack = par5EntityPlayer.inventory.getCurrentItem();

            if (stack != null)
            {
                if (stack.getItem() instanceof ItemDye)
                {
                    final int dyeColor = par5EntityPlayer.inventory.getCurrentItem().getItemDamageForDisplay();

                    final byte colorBefore = tileEntity.getColor();

                    tileEntity.setColor((byte) dyeColor);

                    if (colorBefore != (byte) dyeColor && !par5EntityPlayer.capabilities.isCreativeMode && --par5EntityPlayer.inventory.getCurrentItem().stackSize == 0)
                    {
                        par5EntityPlayer.inventory.mainInventory[par5EntityPlayer.inventory.currentItem] = null;
                    }

                    if (colorBefore != (byte) dyeColor && colorBefore != 15)
                    {
                        final float f = 0.7F;
                        final double d0 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5D;
                        final double d1 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.2D + 0.6D;
                        final double d2 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5D;
                        final EntityItem entityitem = new EntityItem(par1World, x + d0, y + d1, z + d2, new ItemStack(Items.dye, 1, colorBefore));
                        entityitem.delayBeforeCanPickup = 10;
                        par1World.spawnEntityInWorld(entityitem);
                    }

                    //          GCCorePacketManager.sendPacketToClients(GCCorePacketManager.getPacket(GalacticraftCore.CHANNELENTITIES, tileEntity, tileEntity.getColor(), (byte) -1)); TODO Fix pipe color

                    BlockVec3 tileVec = new BlockVec3(tileEntity);
                    for (final ForgeDirection dir : ForgeDirection.values())
                    {
                        final TileEntity tileAt = tileVec.getTileEntityOnSide(tileEntity.getWorldObj(), dir);

                        if (tileAt != null && tileAt instanceof IColorable)
                        {
                            ((IColorable) tileAt).onAdjacentColorChanged(dir);
                        }
View Full Code Here

Examples of micdoodle8.mods.galacticraft.core.tile.TileEntityOxygenPipe

    }

    @Override
    public TileEntity createNewTileEntity(World world, int meta)
    {
      return new TileEntityOxygenPipe();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.