当前位置: 首页>>代码示例>>Java>>正文


Java S3EPacketTeams.func_149307_h方法代码示例

本文整理汇总了Java中net.minecraft.network.play.server.S3EPacketTeams.func_149307_h方法的典型用法代码示例。如果您正苦于以下问题:Java S3EPacketTeams.func_149307_h方法的具体用法?Java S3EPacketTeams.func_149307_h怎么用?Java S3EPacketTeams.func_149307_h使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.network.play.server.S3EPacketTeams的用法示例。


在下文中一共展示了S3EPacketTeams.func_149307_h方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handleTeams

import net.minecraft.network.play.server.S3EPacketTeams; //导入方法依赖的package包/类
/**
 * Updates a team managed by the scoreboard: Create/Remove the team registration, Register/Remove the player-team-
 * memberships, Set team displayname/prefix/suffix and/or whether friendly fire is enabled
 */
public void handleTeams(S3EPacketTeams packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Scoreboard scoreboard = this.clientWorldController.getScoreboard();
    ScorePlayerTeam scoreplayerteam;

    if (packetIn.func_149307_h() == 0)
    {
        scoreplayerteam = scoreboard.createTeam(packetIn.func_149312_c());
    }
    else
    {
        scoreplayerteam = scoreboard.getTeam(packetIn.func_149312_c());
    }

    if (packetIn.func_149307_h() == 0 || packetIn.func_149307_h() == 2)
    {
        scoreplayerteam.setTeamName(packetIn.func_149306_d());
        scoreplayerteam.setNamePrefix(packetIn.func_149311_e());
        scoreplayerteam.setNameSuffix(packetIn.func_149309_f());
        scoreplayerteam.setChatFormat(EnumChatFormatting.func_175744_a(packetIn.func_179813_h()));
        scoreplayerteam.func_98298_a(packetIn.func_149308_i());
        Team.EnumVisible team$enumvisible = Team.EnumVisible.func_178824_a(packetIn.func_179814_i());

        if (team$enumvisible != null)
        {
            scoreplayerteam.setNameTagVisibility(team$enumvisible);
        }
    }

    if (packetIn.func_149307_h() == 0 || packetIn.func_149307_h() == 3)
    {
        for (String s : packetIn.func_149310_g())
        {
            scoreboard.addPlayerToTeam(s, packetIn.func_149312_c());
        }
    }

    if (packetIn.func_149307_h() == 4)
    {
        for (String s1 : packetIn.func_149310_g())
        {
            scoreboard.removePlayerFromTeam(s1, scoreplayerteam);
        }
    }

    if (packetIn.func_149307_h() == 1)
    {
        scoreboard.removeTeam(scoreplayerteam);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:56,代码来源:NetHandlerPlayClient.java

示例2: handleTeams

import net.minecraft.network.play.server.S3EPacketTeams; //导入方法依赖的package包/类
/**
 * Updates a team managed by the scoreboard: Create/Remove the team
 * registration, Register/Remove the player-team- memberships, Set team
 * displayname/prefix/suffix and/or whether friendly fire is enabled
 */
public void handleTeams(S3EPacketTeams packetIn) {
	PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
	Scoreboard scoreboard = this.clientWorldController.getScoreboard();
	ScorePlayerTeam scoreplayerteam;

	if (packetIn.func_149307_h() == 0) {
		scoreplayerteam = scoreboard.createTeam(packetIn.func_149312_c());
	} else {
		scoreplayerteam = scoreboard.getTeam(packetIn.func_149312_c());
	}

	if (packetIn.func_149307_h() == 0 || packetIn.func_149307_h() == 2) {
		scoreplayerteam.setTeamName(packetIn.func_149306_d());
		scoreplayerteam.setNamePrefix(packetIn.func_149311_e());
		scoreplayerteam.setNameSuffix(packetIn.func_149309_f());
		scoreplayerteam.setChatFormat(EnumChatFormatting.func_175744_a(packetIn.func_179813_h()));
		scoreplayerteam.func_98298_a(packetIn.func_149308_i());
		Team.EnumVisible team$enumvisible = Team.EnumVisible.func_178824_a(packetIn.func_179814_i());

		if (team$enumvisible != null) {
			scoreplayerteam.setNameTagVisibility(team$enumvisible);
		}
	}

	if (packetIn.func_149307_h() == 0 || packetIn.func_149307_h() == 3) {
		for (String s : packetIn.func_149310_g()) {
			scoreboard.addPlayerToTeam(s, packetIn.func_149312_c());
		}
	}

	if (packetIn.func_149307_h() == 4) {
		for (String s1 : packetIn.func_149310_g()) {
			scoreboard.removePlayerFromTeam(s1, scoreplayerteam);
		}
	}

	if (packetIn.func_149307_h() == 1) {
		scoreboard.removeTeam(scoreplayerteam);
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:46,代码来源:NetHandlerPlayClient.java

示例3: handleTeams

import net.minecraft.network.play.server.S3EPacketTeams; //导入方法依赖的package包/类
/**
 * Updates a team managed by the scoreboard: Create/Remove the team registration, Register/Remove the player-team-
 * memberships, Set team displayname/prefix/suffix and/or whether friendly fire is enabled
 */
public void handleTeams(S3EPacketTeams p_147247_1_)
{
    Scoreboard var2 = this.clientWorldController.getScoreboard();
    ScorePlayerTeam var3;

    if (p_147247_1_.func_149307_h() == 0)
    {
        var3 = var2.createTeam(p_147247_1_.func_149312_c());
    }
    else
    {
        var3 = var2.getTeam(p_147247_1_.func_149312_c());
    }

    if (p_147247_1_.func_149307_h() == 0 || p_147247_1_.func_149307_h() == 2)
    {
        var3.setTeamName(p_147247_1_.func_149306_d());
        var3.setNamePrefix(p_147247_1_.func_149311_e());
        var3.setNameSuffix(p_147247_1_.func_149309_f());
        var3.func_98298_a(p_147247_1_.func_149308_i());
    }

    Iterator var4;
    String var5;

    if (p_147247_1_.func_149307_h() == 0 || p_147247_1_.func_149307_h() == 3)
    {
        var4 = p_147247_1_.func_149310_g().iterator();

        while (var4.hasNext())
        {
            var5 = (String)var4.next();
            var2.func_151392_a(var5, p_147247_1_.func_149312_c());
        }
    }

    if (p_147247_1_.func_149307_h() == 4)
    {
        var4 = p_147247_1_.func_149310_g().iterator();

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

    if (p_147247_1_.func_149307_h() == 1)
    {
        var2.removeTeam(var3);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:57,代码来源:NetHandlerPlayClient.java

示例4: handleTeams

import net.minecraft.network.play.server.S3EPacketTeams; //导入方法依赖的package包/类
public void handleTeams(S3EPacketTeams p_147247_1_)
{
    Scoreboard scoreboard = this.clientWorldController.getScoreboard();
    ScorePlayerTeam scoreplayerteam;

    if (p_147247_1_.func_149307_h() == 0)
    {
        scoreplayerteam = scoreboard.createTeam(p_147247_1_.func_149312_c());
    }
    else
    {
        scoreplayerteam = scoreboard.getTeam(p_147247_1_.func_149312_c());
    }

    if (p_147247_1_.func_149307_h() == 0 || p_147247_1_.func_149307_h() == 2)
    {
        scoreplayerteam.setTeamName(p_147247_1_.func_149306_d());
        scoreplayerteam.setNamePrefix(p_147247_1_.func_149311_e());
        scoreplayerteam.setNameSuffix(p_147247_1_.func_149309_f());
        scoreplayerteam.func_98298_a(p_147247_1_.func_149308_i());
    }

    Iterator iterator;
    String s;

    if (p_147247_1_.func_149307_h() == 0 || p_147247_1_.func_149307_h() == 3)
    {
        iterator = p_147247_1_.func_149310_g().iterator();

        while (iterator.hasNext())
        {
            s = (String)iterator.next();
            scoreboard.func_151392_a(s, p_147247_1_.func_149312_c());
        }
    }

    if (p_147247_1_.func_149307_h() == 4)
    {
        iterator = p_147247_1_.func_149310_g().iterator();

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

    if (p_147247_1_.func_149307_h() == 1)
    {
        scoreboard.removeTeam(scoreplayerteam);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:53,代码来源:NetHandlerPlayClient.java


注:本文中的net.minecraft.network.play.server.S3EPacketTeams.func_149307_h方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。