Package micdoodle8.mods.galacticraft.core.inventory

Examples of micdoodle8.mods.galacticraft.core.inventory.InventoryExtended


    }

    @Override
    public Container getResultContainer(EntityPlayer player, int x, int y, int z)
    {
        return new ContainerSchematic(player.inventory, x, y, z);
    }
View Full Code Here


    }

    @Override
    public Container getResultContainer(EntityPlayer player, int x, int y, int z)
    {
        return new ContainerSchematicTier1Rocket(player.inventory, x, y, z);
    }
View Full Code Here

                {
                    GCPlayerStats stats = GCPlayerStats.get(thePlayer);

                    if (astring[0].equalsIgnoreCase("drop"))
                    {
                        InventoryExtended gcInventory = stats.extendedInventory;
                        gcInventory.dropExtendedItems(thePlayer);
                    }
                    else if (astring[0].equalsIgnoreCase("save"))
                    {
                        InventoryExtended gcInventory = stats.extendedInventory;
                        ItemStack[] saveinv = new ItemStack[gcInventory.getSizeInventory()];
                        for (int i = 0; i < gcInventory.getSizeInventory(); i++)
                        {
                            saveinv[i] = gcInventory.getStackInSlot(i);
                            gcInventory.setInventorySlotContents(i, null);
                        }

                        CommandGCInv.savedata.put(astring[1].toLowerCase(), saveinv);
                        CommandGCInv.dontload.add(astring[1].toLowerCase());
                        CommandGCInv.writefile();
                        System.out.println("[GCInv] Saving and clearing GC inventory slots of " + thePlayer.getGameProfile().getName());
                    }
                    else if (astring[0].equalsIgnoreCase("restore"))
                    {
                        ItemStack[] saveinv = CommandGCInv.savedata.get(astring[1].toLowerCase());
                        CommandGCInv.dontload.remove(astring[1].toLowerCase());
                        if (saveinv == null)
                        {
                            System.out.println("[GCInv] Tried to restore but player " + thePlayer.getGameProfile().getName() + " had no saved GC inventory items.");
                            return;
                        }

                        CommandGCInv.doLoad(thePlayer);
                    }
                    else if (astring[0].equalsIgnoreCase("clear"))
                    {
                        InventoryExtended gcInventory = stats.extendedInventory;
                        for (int i = 0; i < gcInventory.getSizeInventory(); i++)
                        {
                            gcInventory.setInventorySlotContents(i, null);
                        }
                    }
                    else
                    {
                        throw new WrongUsageException("Invalid GCInv command. Usage: " + this.getCommandUsage(icommandsender), new Object[0]);
View Full Code Here

        // has yet been run.
        // Dontload resets to nothing on server restart so that all will
        // auto-restore on a server restart.
        {
            ItemStack[] saveinv = CommandGCInv.savedata.get(theName);
            InventoryExtended gcInventory = GCPlayerStats.get(thePlayer).extendedInventory;
            for (int i = 0; i < gcInventory.getSizeInventory(); i++)
            {
                gcInventory.setInventorySlotContents(i, saveinv[i]);
            }
            CommandGCInv.savedata.remove(theName);
            CommandGCInv.writefile();
            System.out.println("[GCInv] Restored GC inventory slots of " + thePlayer.getGameProfile().getName());
View Full Code Here

        GalacticraftCore.satelliteSpaceStation = (Satellite) new Satellite("spaceStation.overworld").setParentBody(GalacticraftCore.planetOverworld).setRelativeSize(0.2667F).setRelativeDistanceFromCenter(new CelestialBody.ScalableDistance(9F, 9F)).setRelativeOrbitTime(1 / 0.05F);
        GalacticraftCore.satelliteSpaceStation.setDimensionInfo(ConfigManagerCore.idDimensionOverworldOrbit, WorldProviderOrbit.class, false).setTierRequired(1);
        GalacticraftCore.satelliteSpaceStation.setBodyIcon(new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "textures/gui/celestialbodies/spaceStation.png"));

        ForgeChunkManager.setForcedChunkLoadingCallback(GalacticraftCore.instance, new ChunkLoadingCallback());
        FMLCommonHandler.instance().bus().register(new ConnectionEvents());

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

    {
        super.updateEntity();

        if (!this.worldObj.isRemote && this.ticks % 60 == 0 && this.lastPipeColor != this.getColor())
        {
            GalacticraftCore.packetPipeline.sendToDimension(new PacketDynamic(this), this.worldObj.provider.dimensionId);
            this.lastPipeColor = this.getColor();
        }
    }
View Full Code Here

            }
        }

        if (!this.worldObj.isRemote && this.ticks % 5 == 0)
        {
            GalacticraftCore.packetPipeline.sendToAllAround(new PacketDynamic(this), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, 50.0D));
        }

        if (this.worldObj.isRemote && this.ticks % 5 == 0)
        {
            GalacticraftCore.packetPipeline.sendToServer(new PacketDynamic(this));
        }

        this.prevPosX = this.posX;
        this.prevPosY = this.posY;
        this.prevPosZ = this.posZ;
View Full Code Here

                    {
                        e.printStackTrace();
                    }
                }

                GalacticraftCore.packetPipeline.sendToAllAround(new PacketDynamic(this), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, this.getPacketRange()));
            }

            if (this.worldObj.isRemote && this.ticks % this.getPacketCooldown(Side.SERVER) == 0)
            {
                if (this.fieldCacheServer == null)
                {
                    try
                    {
                        this.initFieldCache();
                    }
                    catch (Exception e)
                    {
                        e.printStackTrace();
                    }
                }

                GalacticraftCore.packetPipeline.sendToServer(new PacketDynamic(this));
            }
        }
    }
View Full Code Here

                }
            }

            if (this.worldObj.isRemote && this.fieldCacheServer.size() > 0)
            {
                GalacticraftCore.packetPipeline.sendToServer(new PacketDynamic(this));
            }
            else if (!this.worldObj.isRemote && this.fieldCacheClient.size() > 0)
            {
                GalacticraftCore.packetPipeline.sendToAllAround(new PacketDynamic(this), new TargetPoint(this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, this.getPacketRange()));
            }
        }
    }
View Full Code Here

    {
        super.onUpdate();

        if (!this.worldObj.isRemote)
        {
            GalacticraftCore.packetPipeline.sendToAllAround(new PacketDynamic(this), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, this.getPacketRange()));
            // PacketDispatcher.sendPacketToAllAround(this.posX, this.posY,
            // this.posZ, this.getPacketRange(),
            // this.worldObj.provider.dimensionId,
            // GCCorePacketManager.getPacket(GalacticraftCore.CHANNELENTITIES,
            // this, this.getNetworkedData(new ArrayList<Object>())));
View Full Code Here

TOP

Related Classes of micdoodle8.mods.galacticraft.core.inventory.InventoryExtended

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.