Package micdoodle8.mods.galacticraft.core.network

Examples of micdoodle8.mods.galacticraft.core.network.PacketSimple


    public void onSelectionChanged(GuiElementCheckbox checkbox, boolean newSelected)
    {
        if (checkbox.equals(this.checkboxRedstoneSignal))
        {
            this.controller.redstoneActivation = newSelected;
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 0, this.controller.xCoord, this.controller.yCoord, this.controller.zCoord, this.controller.redstoneActivation ? 1 : 0 }));
            // PacketDispatcher.sendPacketToServer(PacketUtil.createPacket(GalacticraftCore.CHANNEL,
            // EnumPacketServer.ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 0,
            // this.controller.xCoord, this.controller.yCoord,
            // this.controller.zCoord, this.controller.redstoneActivation ? 1 :
            // 0 }));
        }
        else if (checkbox.equals(this.checkboxPlayerDistance))
        {
            this.controller.playerDistanceActivation = newSelected;
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 1, this.controller.xCoord, this.controller.yCoord, this.controller.zCoord, this.controller.playerDistanceActivation ? 1 : 0 }));
            // PacketDispatcher.sendPacketToServer(PacketUtil.createPacket(GalacticraftCore.CHANNEL,
            // EnumPacketServer.ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 1,
            // this.controller.xCoord, this.controller.yCoord,
            // this.controller.zCoord, this.controller.playerDistanceActivation
            // ? 1 : 0 }));
        }
        else if (checkbox.equals(this.checkboxOpenForPlayer))
        {
            this.controller.playerNameMatches = newSelected;
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 3, this.controller.xCoord, this.controller.yCoord, this.controller.zCoord, this.controller.playerNameMatches ? 1 : 0 }));
            // PacketDispatcher.sendPacketToServer(PacketUtil.createPacket(GalacticraftCore.CHANNEL,
            // EnumPacketServer.ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 3,
            // this.controller.xCoord, this.controller.yCoord,
            // this.controller.zCoord, this.controller.playerNameMatches ? 1 : 0
            // }));
        }
        else if (checkbox.equals(this.checkboxInvertSelection))
        {
            this.controller.invertSelection = newSelected;
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 4, this.controller.xCoord, this.controller.yCoord, this.controller.zCoord, this.controller.invertSelection ? 1 : 0 }));
            // PacketDispatcher.sendPacketToServer(PacketUtil.createPacket(GalacticraftCore.CHANNEL,
            // EnumPacketServer.ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 4,
            // this.controller.xCoord, this.controller.yCoord,
            // this.controller.zCoord, this.controller.invertSelection ? 1 : 0
            // }));
        }
        else if (checkbox.equals(this.checkboxHorizontalMode))
        {
            this.controller.lastHorizontalModeEnabled = this.controller.horizontalModeEnabled;
            this.controller.horizontalModeEnabled = newSelected;
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 5, this.controller.xCoord, this.controller.yCoord, this.controller.zCoord, this.controller.horizontalModeEnabled ? 1 : 0 }));
            // PacketDispatcher.sendPacketToServer(PacketUtil.createPacket(GalacticraftCore.CHANNEL,
            // EnumPacketServer.ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 5,
            // this.controller.xCoord, this.controller.yCoord,
            // this.controller.zCoord, this.controller.horizontalModeEnabled ? 1
            // : 0 }));
View Full Code Here


    public void onSelectionChanged(GuiElementDropdown dropdown, int selection)
    {
        if (dropdown.equals(this.dropdownPlayerDistance))
        {
            this.controller.playerDistanceSelection = selection;
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 2, this.controller.xCoord, this.controller.yCoord, this.controller.zCoord, this.controller.playerDistanceSelection }));
        }
    }
View Full Code Here

    public void onTextChanged(GuiElementTextBox textBox, String newText)
    {
        if (textBox.equals(this.textBoxPlayerToOpenFor))
        {
            this.controller.playerToOpenFor = newText != null ? newText : "";
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_ON_ADVANCED_GUI_CLICKED_STRING, new Object[] { 0, this.controller.xCoord, this.controller.yCoord, this.controller.zCoord, this.controller.playerToOpenFor }));
        }
    }
View Full Code Here

                if (playerToInvite != null && !this.recentlyInvited.containsKey(playerToInvite.value))
                {
                    SpaceRace race = SpaceRaceManager.getSpaceRaceFromPlayer(this.thePlayer.getGameProfile().getName());
                    if (race != null)
                    {
                        GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_INVITE_RACE_PLAYER, new Object[] { playerToInvite.value, race.getSpaceRaceID() }));
                        this.recentlyInvited.put(playerToInvite.value, 20 * 60);
                    }
                }
            }
            else if (this.currentState == EnumSpaceRaceGui.REMOVE_PLAYER)
            {
                ListElement playerToRemove = this.gradientListRemovePlayers.getSelectedElement();
                if (playerToRemove != null)
                {
                    SpaceRace race = SpaceRaceManager.getSpaceRaceFromPlayer(this.thePlayer.getGameProfile().getName());
                    if (race != null)
                    {
                        GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_REMOVE_RACE_PLAYER, new Object[] { playerToRemove.value, race.getSpaceRaceID() }));
                    }
                }
            }
            break;
        case 3:
View Full Code Here

            objList.add(this.spaceRaceData.getSpaceRaceID());
            objList.add(this.spaceRaceData.getTeamName());
            objList.add(this.spaceRaceData.getFlagData());
            objList.add(this.spaceRaceData.getTeamColor());
            objList.add(this.spaceRaceData.getPlayerNames().toArray(new String[this.spaceRaceData.getPlayerNames().size()]));
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_START_NEW_SPACE_RACE, objList));
        }
    }
View Full Code Here

    protected void actionPerformed(GuiButton par1GuiButton)
    {
        switch (par1GuiButton.id)
        {
        case 0:
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_UPDATE_DISABLEABLE_BUTTON, new Object[] { this.solarPanel.xCoord, this.solarPanel.yCoord, this.solarPanel.zCoord, 0 }));
            break;
        }
    }
View Full Code Here

        if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayerMP)
        {
            if (!this.worldObj.isRemote)
            {
                GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_RESET_THIRD_PERSON, new Object[] { }), (EntityPlayerMP) par1EntityPlayer);
                GCPlayerStats stats = GCPlayerStats.get((EntityPlayerMP) par1EntityPlayer);
                stats.chatCooldown = 0;
                par1EntityPlayer.mountEntity(null);
            }

            return true;
        }
        else if (par1EntityPlayer instanceof EntityPlayerMP)
        {
            if (!this.worldObj.isRemote)
            {
                GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_DISPLAY_ROCKET_CONTROLS, new Object[] { }), (EntityPlayerMP) par1EntityPlayer);
                GCPlayerStats stats = GCPlayerStats.get((EntityPlayerMP) par1EntityPlayer);
                stats.chatCooldown = 0;
                par1EntityPlayer.mountEntity(this);
            }
View Full Code Here

    @Override
    public void onSelectionChanged(GuiElementCheckbox checkbox, boolean newSelected)
    {
        this.distributor.oxygenBubble.setShouldRender(newSelected);
        GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_ON_ADVANCED_GUI_CLICKED_INT, new Object[] { 6, this.distributor.xCoord, this.distributor.yCoord, this.distributor.zCoord, newSelected ? 1 : 0 }));
    }
View Full Code Here

          else
          {
              this.renderEngine.bindTexture(new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "textures/gui/celestialbodies/earth.png"));
              if (!ClientProxyCore.overworldTextureRequestSent)
              {
                  GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(PacketSimple.EnumSimplePacket.S_REQUEST_OVERWORLD_IMAGE, new Object[] {}));
                  ClientProxyCore.overworldTextureRequestSent = true;
              }
          }
          draw2DTexture();
          break;
View Full Code Here

    }

    @Override
    public void onTabClicked()
    {
        GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_OPEN_EXTENDED_INVENTORY, new Object[] { }));
        ClientProxyCore.playerClientHandler.onBuild(0, FMLClientHandler.instance().getClientPlayerEntity());
    }
View Full Code Here

TOP

Related Classes of micdoodle8.mods.galacticraft.core.network.PacketSimple

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.