Package com.flansmod.common.network

Examples of com.flansmod.common.network.PacketDriveableGUI


        seats[0].riddenByEntity.mountEntity(null);
              return true;
      }
      case 7 : //Inventory
      {
        FlansMod.getPacketHandler().sendToServer(new PacketDriveableGUI(4));
        ((EntityPlayer)seats[0].riddenByEntity).openGui(FlansMod.INSTANCE, 10, worldObj, chunkCoordX, chunkCoordY, chunkCoordZ);
        return true;
      }
      case 8 : //UseR
      {
View Full Code Here


    int m = i - guiOriginX;
    int n = j - guiOriginY;
    if(m > 185 && m < 195 && n > 5 && n < 15)
      if(driving instanceof EntityMecha)
      {
        FlansMod.getPacketHandler().sendToServer(new PacketDriveableGUI(4));
        (driver).openGui(FlansMod.INSTANCE, 10, driver.worldObj, driving.chunkCoordX, driving.chunkCoordY, driving.chunkCoordZ);
      }
      else
       mc.displayGuiScreen(new GuiDriveableMenu(driver.inventory, driver.worldObj, driving));
  }
View Full Code Here

  protected void actionPerformed(GuiButton button)
    {
    //Replace with a packet requesting the GUI from the server
    if(button.id == 0) //Cargo
        {
      FlansMod.getPacketHandler().sendToServer(new PacketDriveableGUI(3));
      //inventory.player.openGui(FlansMod.INSTANCE, 9, world, entity.chunkCoordX, entity.chunkCoordY, entity.chunkCoordZ);
        }
        if(button.id == 1) //Guns
        {
          FlansMod.getPacketHandler().sendToServer(new PacketDriveableGUI(0));
          //inventory.player.openGui(FlansMod.INSTANCE, 6, world, entity.chunkCoordX, entity.chunkCoordY, entity.chunkCoordZ);
        }
        if(button.id == 2) //Fuel
        {
          FlansMod.getPacketHandler().sendToServer(new PacketDriveableGUI(2));
          //inventory.player.openGui(FlansMod.INSTANCE, 8, world, entity.chunkCoordX, entity.chunkCoordY, entity.chunkCoordZ);
        }
        if(button.id == 3) //Missiles
        {
          FlansMod.getPacketHandler().sendToServer(new PacketDriveableGUI(5));
          //inventory.player.openGui(FlansMod.INSTANCE, 12, world, entity.chunkCoordX, entity.chunkCoordY, entity.chunkCoordZ);
        }
    if(button.id == 4) //Repair
    {
      //No server side required. No interactive slots in this one
      inventory.player.openGui(FlansMod.INSTANCE, 1, world, entity.chunkCoordX, entity.chunkCoordY, entity.chunkCoordZ);
    }
        if(button.id == 5) //Bombs
        {
          FlansMod.getPacketHandler().sendToServer(new PacketDriveableGUI(1));
          //inventory.player.openGui(FlansMod.INSTANCE, 7, world, entity.chunkCoordX, entity.chunkCoordY, entity.chunkCoordZ);
        }

    }
View Full Code Here

    }
    if(m > 161 && m < 171 && n > 5 && n < 15)
    {
      if(driveable instanceof EntityMecha)
      {
        FlansMod.getPacketHandler().sendToServer(new PacketDriveableGUI(4));
        (inventory.player).openGui(FlansMod.INSTANCE, 10, world, driveable.chunkCoordX, driveable.chunkCoordY, driveable.chunkCoordZ);
      }
      else
       mc.displayGuiScreen(new GuiDriveableMenu(inventory, world, driveable));
    }
View Full Code Here

TOP

Related Classes of com.flansmod.common.network.PacketDriveableGUI

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.