Package micdoodle8.mods.galacticraft.core.tile

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


        for (int i = GCItems.oilCanister.getMaxDamage() - 1; i > 0; i--)
        {
            FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(GalacticraftCore.fluidOil, GCItems.oilCanister.getMaxDamage() - i), new ItemStack(GCItems.oilCanister, 1, i), new ItemStack(GCItems.oilCanister, 1, GCItems.fuelCanister.getMaxDamage())));
        }

        SchematicRegistry.registerSchematicRecipe(new SchematicRocketT1());
        SchematicRegistry.registerSchematicRecipe(new SchematicMoonBuggy());
        SchematicRegistry.registerSchematicRecipe(new SchematicAdd());
        ChunkPowerHandler.initiate();
        EnergyConfigHandler.initGas();
View Full Code Here


        }

        CompatibilityManager.checkForCompatibleMods();
        RecipeManagerGC.loadRecipes();
        NetworkRegistry.INSTANCE.registerGuiHandler(GalacticraftCore.instance, new GuiHandler());
        FMLCommonHandler.instance().bus().register(new TickHandlerServer());
        GalaxyRegistry.refreshGalaxies();
       
      GalacticraftRegistry.registerScreen(new GameScreenText())//Screen API demo
      //Note: add-ons can register their own screens in postInit by calling GalacticraftRegistry.registerScreen(IGameScreen) like this.
      //[Called on both client and server: do not include any client-specific code in the new game screen's constructor method.]
View Full Code Here

                }
            }
        }
        else if (metadata <= EnumEnclosedBlock.ALUMINUM_WIRE.getMetadata())
        {
            return new TileEntityAluminumWire(1);
        }
        else if (metadata <= EnumEnclosedBlock.ALUMINUM_WIRE_HEAVY.getMetadata())
        {
            return new TileEntityAluminumWire(2);
        }

        return null;
    }
View Full Code Here

    }

    @Override
    public TileEntity createTileEntity(World world, int metadata)
    {
        return new TileEntityFuelLoader();
    }
View Full Code Here

        {

        }
        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

    @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

    }

    @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

    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

    }

    @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

    }

    @Override
    public TileEntity createNewTileEntity(World world, int meta)
    {
      return new TileEntityOxygenPipe();
    }
View Full Code Here

TOP

Related Classes of micdoodle8.mods.galacticraft.core.tile.TileEntityOxygenPipe

Copyright © 2018 www.massapicom. 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.