Package micdoodle8.mods.galacticraft.core.tile

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


        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 createTileEntity(World world, int metadata)
    {
        return new TileEntityOxygenSealer();
    }
View Full Code Here

                            {
                                FMLLog.info("Oxygen Sealer replacing head at x" + this.head.x + " y" + (this.head.y - 1) + " z" + this.head.z);
                            }
                            if (!sealersSave.isEmpty())
                            {
                                TileEntityOxygenSealer oldHead = sealersSave.get(0);
                                if (!this.sealers.contains(oldHead))
                                {
                                    this.sealers.add(oldHead);
                                }
                            }
                            this.head = newhead.clone();
                            otherSealer.threadSeal = this;
                            otherSealer.stopSealThreadCooldown = 75 + TileEntityOxygenSealer.countEntities;
                            checkedSave.addAll(this.checked);
                            break;
                        }
                        else
                        {
                            sealersDone.addAll(this.sealers);
                        }

                        checkedSave.addAll(this.checked);
                    }
                }

                // Restore sealers to what it was, if this search did not
                // result in a seal
                if (!this.sealed)
                {
                    this.sealers = sealersSave;
                    this.torchesToUpdate = torchesSave;
                }
                else
                {
                    //If the second search sealed the area, there may also be air or torches to update
                    if (!this.airToReplace.isEmpty() || !this.airToReplaceBright.isEmpty())
                    {
                        List<ScheduledBlockChange> changeList = new LinkedList<ScheduledBlockChange>();

                        Block breatheableAirID = GCBlocks.breatheableAir;
                        for (BlockVec3 airVec : this.airToReplace)
                        {
                            changeList.add(new ScheduledBlockChange(airVec.clone(), breatheableAirID, 0));
                        }
                        for (BlockVec3 airVec : this.airToReplaceBright)
                        {
                            changeList.add(new ScheduledBlockChange(airVec.clone(), GCBlocks.brightBreatheableAir, 0));
                        }
                        TickHandlerServer.scheduleNewBlockChange(this.world.provider.dimensionId, changeList);

                    }
                    if (!this.torchesToUpdate.isEmpty())
                    {
                        TickHandlerServer.scheduleNewTorchUpdate(this.world.provider.dimensionId, this.torchesToUpdate);
                    }
                }
            }
            this.checked = checkedSave;

            if (!this.sealed)
            {
                if (this.head.getBlockID(this.world) == GCBlocks.breatheableAir)
                {
                    this.breatheableToReplace.add(this.head);
                }
                if (this.head.getBlockID(this.world) == GCBlocks.brightBreatheableAir)
                {
                    this.breatheableToReplaceBright.add(this.head);
                }
                if (!this.breatheableToReplace.isEmpty() || !this.breatheableToReplaceBright.isEmpty())
                {
                    List<ScheduledBlockChange> changeList = new LinkedList<ScheduledBlockChange>();
                    for (BlockVec3 checkedVec : this.breatheableToReplace)
                    {
                        changeList.add(new ScheduledBlockChange(checkedVec.clone(), Blocks.air, 0));
                    }
                    for (BlockVec3 checkedVec : this.breatheableToReplaceBright)
                    {
                        changeList.add(new ScheduledBlockChange(checkedVec.clone(), GCBlocks.brightAir, 0));
                    }
                    TickHandlerServer.scheduleNewBlockChange(this.world.provider.dimensionId, changeList);
                }
                if (!this.torchesToUpdate.isEmpty())
                {
                    TickHandlerServer.scheduleNewTorchUpdate(this.world.provider.dimensionId, this.torchesToUpdate);
                }
            }
        }

        // Set any sealers found which are not the head sealer, not to run their
        // own seal checks for a while
        // (The player can control which is the head sealer in a space by
        // enabling just that one and disabling all the others)
        TileEntityOxygenSealer headSealer = this.sealersAround.get(this.head.clone().translate(0, -1, 0));

        // If it is sealed, cooldown can be extended as frequent checks are not needed
        if (headSealer != null)
        {
            headSealer.stopSealThreadCooldown += 75;
View Full Code Here

                                nextLayer.add(sideVec);
                                this.breatheableToReplace.add(sideVec);
                            }
                            else if (id == oxygenSealerID)
                            {
                                TileEntityOxygenSealer sealer = this.sealersAround.get(sideVec);

                                if (sealer != null && !this.sealers.contains(sealer))
                                {
                                    if (side == 0)
                                    {
View Full Code Here

                            nextLayer.add(sideVec);
                            this.breatheableToReplace.add(sideVec);
                        }
                        else if (id == oxygenSealerID)
                        {
                            TileEntityOxygenSealer sealer = this.sealersAround.get(sideVec);

                            if (sealer != null && !this.sealers.contains(sealer))
                            {
                                if (side == 0)
                                {
View Full Code Here

                                {
                                    nextLayer.add(sideVec);
                                }
                                else if (id == oxygenSealerID)
                                {
                                    TileEntityOxygenSealer sealer = this.sealersAround.get(sideVec);

                                    if (sealer != null && !this.sealers.contains(sealer))
                                    {
                                        if (side == 0)
                                        {
                                            this.sealers.add(sealer);
                                            this.checkCount += sealer.getFindSealChecks();
                                        }
                                        else
                                        {
                                            //Allow this sealer to be checked from other sides
                                            checkedLocal.remove(sideVec);
View Full Code Here

TOP

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

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.