Java 类net.minecraft.network.packet.Packet209SetPlayerTeam 实例源码

项目:RuneCraftery    文件:ServerConfigurationManager.java   
protected void func_96456_a(ServerScoreboard p_96456_1_, EntityPlayerMP p_96456_2_) {
   HashSet var3 = new HashSet();
   Iterator var4 = p_96456_1_.func_96525_g().iterator();

   while(var4.hasNext()) {
      ScorePlayerTeam var5 = (ScorePlayerTeam)var4.next();
      p_96456_2_.field_71135_a.func_72567_b(new Packet209SetPlayerTeam(var5, 0));
   }

   for(int var9 = 0; var9 < 3; ++var9) {
      ScoreObjective var10 = p_96456_1_.func_96539_a(var9);
      if(var10 != null && !var3.contains(var10)) {
         List var6 = p_96456_1_.func_96550_d(var10);
         Iterator var7 = var6.iterator();

         while(var7.hasNext()) {
            Packet var8 = (Packet)var7.next();
            p_96456_2_.field_71135_a.func_72567_b(var8);
         }

         var3.add(var10);
      }
   }

}
项目:RuneCraftery    文件:ServerConfigurationManager.java   
protected void func_96456_a(ServerScoreboard par1ServerScoreboard, EntityPlayerMP par2EntityPlayerMP)
{
    HashSet hashset = new HashSet();
    Iterator iterator = par1ServerScoreboard.func_96525_g().iterator();

    while (iterator.hasNext())
    {
        ScorePlayerTeam scoreplayerteam = (ScorePlayerTeam)iterator.next();
        par2EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet209SetPlayerTeam(scoreplayerteam, 0));
    }

    for (int i = 0; i < 3; ++i)
    {
        ScoreObjective scoreobjective = par1ServerScoreboard.func_96539_a(i);

        if (scoreobjective != null && !hashset.contains(scoreobjective))
        {
            List list = par1ServerScoreboard.func_96550_d(scoreobjective);
            Iterator iterator1 = list.iterator();

            while (iterator1.hasNext())
            {
                Packet packet = (Packet)iterator1.next();
                par2EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(packet);
            }

            hashset.add(scoreobjective);
        }
    }
}
项目:RuneCraftery    文件:ServerScoreboard.java   
/**
 * Removes the given username from the given ScorePlayerTeam. If the player is not on the team then an
 * IllegalStateException is thrown.
 */
public void removePlayerFromTeam(String par1Str, ScorePlayerTeam par2ScorePlayerTeam)
{
    super.removePlayerFromTeam(par1Str, par2ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par2ScorePlayerTeam, Arrays.asList(new String[] {par1Str}), 4));
    this.func_96551_b();
}
项目:BetterNutritionMod    文件:ServerConfigurationManager.java   
protected void func_96456_a(ServerScoreboard par1ServerScoreboard, EntityPlayerMP par2EntityPlayerMP)
{
    HashSet hashset = new HashSet();
    Iterator iterator = par1ServerScoreboard.func_96525_g().iterator();

    while (iterator.hasNext())
    {
        ScorePlayerTeam scoreplayerteam = (ScorePlayerTeam)iterator.next();
        par2EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet209SetPlayerTeam(scoreplayerteam, 0));
    }

    for (int i = 0; i < 3; ++i)
    {
        ScoreObjective scoreobjective = par1ServerScoreboard.func_96539_a(i);

        if (scoreobjective != null && !hashset.contains(scoreobjective))
        {
            List list = par1ServerScoreboard.func_96550_d(scoreobjective);
            Iterator iterator1 = list.iterator();

            while (iterator1.hasNext())
            {
                Packet packet = (Packet)iterator1.next();
                par2EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(packet);
            }

            hashset.add(scoreobjective);
        }
    }
}
项目:BetterNutritionMod    文件:ServerScoreboard.java   
/**
 * Removes the given username from the given ScorePlayerTeam. If the player is not on the team then an
 * IllegalStateException is thrown.
 */
public void removePlayerFromTeam(String par1Str, ScorePlayerTeam par2ScorePlayerTeam)
{
    super.removePlayerFromTeam(par1Str, par2ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par2ScorePlayerTeam, Arrays.asList(new String[] {par1Str}), 4));
    this.func_96551_b();
}
项目:forge_world_downloader    文件:WDLNetClientHandler.java   
@Override
public void handleSetPlayerTeam(Packet209SetPlayerTeam par1Packet209SetPlayerTeam)
{
    nch.handleSetPlayerTeam(par1Packet209SetPlayerTeam);        
}
项目:RuneCraftery    文件:NetHandler.java   
public void func_96435_a(Packet209SetPlayerTeam p_96435_1_) {
   this.func_72509_a(p_96435_1_);
}
项目:RuneCraftery    文件:NetClientHandler.java   
public void func_96435_a(Packet209SetPlayerTeam p_96435_1_) {
   Scoreboard var2 = this.field_72564_i.func_96441_U();
   ScorePlayerTeam var3;
   if(p_96435_1_.field_96489_f == 0) {
      var3 = var2.func_96527_f(p_96435_1_.field_96495_a);
   } else {
      var3 = var2.func_96508_e(p_96435_1_.field_96495_a);
   }

   if(p_96435_1_.field_96489_f == 0 || p_96435_1_.field_96489_f == 2) {
      var3.func_96664_a(p_96435_1_.field_96493_b);
      var3.func_96666_b(p_96435_1_.field_96494_c);
      var3.func_96662_c(p_96435_1_.field_96491_d);
      var3.func_98298_a(p_96435_1_.field_98212_g);
   }

   Iterator var4;
   String var5;
   if(p_96435_1_.field_96489_f == 0 || p_96435_1_.field_96489_f == 3) {
      var4 = p_96435_1_.field_96492_e.iterator();

      while(var4.hasNext()) {
         var5 = (String)var4.next();
         var2.func_96521_a(var5, var3);
      }
   }

   if(p_96435_1_.field_96489_f == 4) {
      var4 = p_96435_1_.field_96492_e.iterator();

      while(var4.hasNext()) {
         var5 = (String)var4.next();
         var2.func_96512_b(var5, var3);
      }
   }

   if(p_96435_1_.field_96489_f == 1) {
      var2.func_96511_d(var3);
   }

}
项目:RuneCraftery    文件:ServerScoreboard.java   
public void func_96521_a(String p_96521_1_, ScorePlayerTeam p_96521_2_) {
   super.func_96521_a(p_96521_1_, p_96521_2_);
   this.field_96555_a.func_71203_ab().func_72384_a(new Packet209SetPlayerTeam(p_96521_2_, Arrays.asList(new String[]{p_96521_1_}), 3));
   this.func_96551_b();
}
项目:RuneCraftery    文件:ServerScoreboard.java   
public void func_96512_b(String p_96512_1_, ScorePlayerTeam p_96512_2_) {
   super.func_96512_b(p_96512_1_, p_96512_2_);
   this.field_96555_a.func_71203_ab().func_72384_a(new Packet209SetPlayerTeam(p_96512_2_, Arrays.asList(new String[]{p_96512_1_}), 4));
   this.func_96551_b();
}
项目:RuneCraftery    文件:ServerScoreboard.java   
public void func_96523_a(ScorePlayerTeam p_96523_1_) {
   super.func_96523_a(p_96523_1_);
   this.field_96555_a.func_71203_ab().func_72384_a(new Packet209SetPlayerTeam(p_96523_1_, 0));
   this.func_96551_b();
}
项目:RuneCraftery    文件:ServerScoreboard.java   
public void func_96538_b(ScorePlayerTeam p_96538_1_) {
   super.func_96538_b(p_96538_1_);
   this.field_96555_a.func_71203_ab().func_72384_a(new Packet209SetPlayerTeam(p_96538_1_, 2));
   this.func_96551_b();
}
项目:RuneCraftery    文件:ServerScoreboard.java   
public void func_96513_c(ScorePlayerTeam p_96513_1_) {
   super.func_96513_c(p_96513_1_);
   this.field_96555_a.func_71203_ab().func_72384_a(new Packet209SetPlayerTeam(p_96513_1_, 1));
   this.func_96551_b();
}
项目:RuneCraftery    文件:NetClientHandler.java   
/**
 * Handle a set player team packet.
 */
public void handleSetPlayerTeam(Packet209SetPlayerTeam par1Packet209SetPlayerTeam)
{
    Scoreboard scoreboard = this.worldClient.getScoreboard();
    ScorePlayerTeam scoreplayerteam;

    if (par1Packet209SetPlayerTeam.mode == 0)
    {
        scoreplayerteam = scoreboard.createTeam(par1Packet209SetPlayerTeam.teamName);
    }
    else
    {
        scoreplayerteam = scoreboard.func_96508_e(par1Packet209SetPlayerTeam.teamName);
    }

    if (par1Packet209SetPlayerTeam.mode == 0 || par1Packet209SetPlayerTeam.mode == 2)
    {
        scoreplayerteam.setTeamName(par1Packet209SetPlayerTeam.teamDisplayName);
        scoreplayerteam.setNamePrefix(par1Packet209SetPlayerTeam.teamPrefix);
        scoreplayerteam.setNameSuffix(par1Packet209SetPlayerTeam.teamSuffix);
        scoreplayerteam.func_98298_a(par1Packet209SetPlayerTeam.friendlyFire);
    }

    Iterator iterator;
    String s;

    if (par1Packet209SetPlayerTeam.mode == 0 || par1Packet209SetPlayerTeam.mode == 3)
    {
        iterator = par1Packet209SetPlayerTeam.playerNames.iterator();

        while (iterator.hasNext())
        {
            s = (String)iterator.next();
            scoreboard.addPlayerToTeam(s, scoreplayerteam);
        }
    }

    if (par1Packet209SetPlayerTeam.mode == 4)
    {
        iterator = par1Packet209SetPlayerTeam.playerNames.iterator();

        while (iterator.hasNext())
        {
            s = (String)iterator.next();
            scoreboard.removePlayerFromTeam(s, scoreplayerteam);
        }
    }

    if (par1Packet209SetPlayerTeam.mode == 1)
    {
        scoreboard.func_96511_d(scoreplayerteam);
    }
}
项目:RuneCraftery    文件:ServerScoreboard.java   
public void addPlayerToTeam(String par1Str, ScorePlayerTeam par2ScorePlayerTeam)
{
    super.addPlayerToTeam(par1Str, par2ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par2ScorePlayerTeam, Arrays.asList(new String[] {par1Str}), 3));
    this.func_96551_b();
}
项目:RuneCraftery    文件:ServerScoreboard.java   
public void func_96523_a(ScorePlayerTeam par1ScorePlayerTeam)
{
    super.func_96523_a(par1ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par1ScorePlayerTeam, 0));
    this.func_96551_b();
}
项目:RuneCraftery    文件:ServerScoreboard.java   
public void func_96538_b(ScorePlayerTeam par1ScorePlayerTeam)
{
    super.func_96538_b(par1ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par1ScorePlayerTeam, 2));
    this.func_96551_b();
}
项目:RuneCraftery    文件:ServerScoreboard.java   
public void func_96513_c(ScorePlayerTeam par1ScorePlayerTeam)
{
    super.func_96513_c(par1ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par1ScorePlayerTeam, 1));
    this.func_96551_b();
}
项目:BetterNutritionMod    文件:NetClientHandler.java   
/**
 * Handle a set player team packet.
 */
public void handleSetPlayerTeam(Packet209SetPlayerTeam par1Packet209SetPlayerTeam)
{
    Scoreboard scoreboard = this.worldClient.getScoreboard();
    ScorePlayerTeam scoreplayerteam;

    if (par1Packet209SetPlayerTeam.mode == 0)
    {
        scoreplayerteam = scoreboard.createTeam(par1Packet209SetPlayerTeam.teamName);
    }
    else
    {
        scoreplayerteam = scoreboard.func_96508_e(par1Packet209SetPlayerTeam.teamName);
    }

    if (par1Packet209SetPlayerTeam.mode == 0 || par1Packet209SetPlayerTeam.mode == 2)
    {
        scoreplayerteam.setTeamName(par1Packet209SetPlayerTeam.teamDisplayName);
        scoreplayerteam.setNamePrefix(par1Packet209SetPlayerTeam.teamPrefix);
        scoreplayerteam.setNameSuffix(par1Packet209SetPlayerTeam.teamSuffix);
        scoreplayerteam.func_98298_a(par1Packet209SetPlayerTeam.friendlyFire);
    }

    Iterator iterator;
    String s;

    if (par1Packet209SetPlayerTeam.mode == 0 || par1Packet209SetPlayerTeam.mode == 3)
    {
        iterator = par1Packet209SetPlayerTeam.playerNames.iterator();

        while (iterator.hasNext())
        {
            s = (String)iterator.next();
            scoreboard.addPlayerToTeam(s, scoreplayerteam);
        }
    }

    if (par1Packet209SetPlayerTeam.mode == 4)
    {
        iterator = par1Packet209SetPlayerTeam.playerNames.iterator();

        while (iterator.hasNext())
        {
            s = (String)iterator.next();
            scoreboard.removePlayerFromTeam(s, scoreplayerteam);
        }
    }

    if (par1Packet209SetPlayerTeam.mode == 1)
    {
        scoreboard.func_96511_d(scoreplayerteam);
    }
}
项目:BetterNutritionMod    文件:ServerScoreboard.java   
public void addPlayerToTeam(String par1Str, ScorePlayerTeam par2ScorePlayerTeam)
{
    super.addPlayerToTeam(par1Str, par2ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par2ScorePlayerTeam, Arrays.asList(new String[] {par1Str}), 3));
    this.func_96551_b();
}
项目:BetterNutritionMod    文件:ServerScoreboard.java   
public void func_96523_a(ScorePlayerTeam par1ScorePlayerTeam)
{
    super.func_96523_a(par1ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par1ScorePlayerTeam, 0));
    this.func_96551_b();
}
项目:BetterNutritionMod    文件:ServerScoreboard.java   
public void func_96538_b(ScorePlayerTeam par1ScorePlayerTeam)
{
    super.func_96538_b(par1ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par1ScorePlayerTeam, 2));
    this.func_96551_b();
}
项目:BetterNutritionMod    文件:ServerScoreboard.java   
public void func_96513_c(ScorePlayerTeam par1ScorePlayerTeam)
{
    super.func_96513_c(par1ScorePlayerTeam);
    this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par1ScorePlayerTeam, 1));
    this.func_96551_b();
}