本文整理汇总了Java中net.minecraft.network.play.server.S3BPacketScoreboardObjective.func_149338_e方法的典型用法代码示例。如果您正苦于以下问题:Java S3BPacketScoreboardObjective.func_149338_e方法的具体用法?Java S3BPacketScoreboardObjective.func_149338_e怎么用?Java S3BPacketScoreboardObjective.func_149338_e使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.play.server.S3BPacketScoreboardObjective
的用法示例。
在下文中一共展示了S3BPacketScoreboardObjective.func_149338_e方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleScoreboardObjective
import net.minecraft.network.play.server.S3BPacketScoreboardObjective; //导入方法依赖的package包/类
/**
* May create a scoreboard objective, remove an objective from the scoreboard or
* update an objectives' displayname
*/
public void handleScoreboardObjective(S3BPacketScoreboardObjective packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Scoreboard scoreboard = this.clientWorldController.getScoreboard();
if (packetIn.func_149338_e() == 0) {
ScoreObjective scoreobjective = scoreboard.addScoreObjective(packetIn.func_149339_c(),
IScoreObjectiveCriteria.DUMMY);
scoreobjective.setDisplayName(packetIn.func_149337_d());
scoreobjective.setRenderType(packetIn.func_179817_d());
} else {
ScoreObjective scoreobjective1 = scoreboard.getObjective(packetIn.func_149339_c());
if (packetIn.func_149338_e() == 1) {
scoreboard.removeObjective(scoreobjective1);
} else if (packetIn.func_149338_e() == 2) {
scoreobjective1.setDisplayName(packetIn.func_149337_d());
scoreobjective1.setRenderType(packetIn.func_179817_d());
}
}
}
示例2: handleScoreboardObjective
import net.minecraft.network.play.server.S3BPacketScoreboardObjective; //导入方法依赖的package包/类
/**
* May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
*/
public void handleScoreboardObjective(S3BPacketScoreboardObjective p_147291_1_)
{
Scoreboard var2 = this.clientWorldController.getScoreboard();
ScoreObjective var3;
if (p_147291_1_.func_149338_e() == 0)
{
var3 = var2.addScoreObjective(p_147291_1_.func_149339_c(), IScoreObjectiveCriteria.field_96641_b);
var3.setDisplayName(p_147291_1_.func_149337_d());
}
else
{
var3 = var2.getObjective(p_147291_1_.func_149339_c());
if (p_147291_1_.func_149338_e() == 1)
{
var2.func_96519_k(var3);
}
else if (p_147291_1_.func_149338_e() == 2)
{
var3.setDisplayName(p_147291_1_.func_149337_d());
}
}
}
示例3: handleScoreboardObjective
import net.minecraft.network.play.server.S3BPacketScoreboardObjective; //导入方法依赖的package包/类
public void handleScoreboardObjective(S3BPacketScoreboardObjective p_147291_1_)
{
Scoreboard scoreboard = this.clientWorldController.getScoreboard();
ScoreObjective scoreobjective;
if (p_147291_1_.func_149338_e() == 0)
{
scoreobjective = scoreboard.addScoreObjective(p_147291_1_.func_149339_c(), IScoreObjectiveCriteria.field_96641_b);
scoreobjective.setDisplayName(p_147291_1_.func_149337_d());
}
else
{
scoreobjective = scoreboard.getObjective(p_147291_1_.func_149339_c());
if (p_147291_1_.func_149338_e() == 1)
{
scoreboard.func_96519_k(scoreobjective);
}
else if (p_147291_1_.func_149338_e() == 2)
{
scoreobjective.setDisplayName(p_147291_1_.func_149337_d());
}
}
}
示例4: handleScoreboardObjective
import net.minecraft.network.play.server.S3BPacketScoreboardObjective; //导入方法依赖的package包/类
/**
* May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
*/
public void handleScoreboardObjective(S3BPacketScoreboardObjective packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Scoreboard scoreboard = this.clientWorldController.getScoreboard();
if (packetIn.func_149338_e() == 0)
{
ScoreObjective scoreobjective = scoreboard.addScoreObjective(packetIn.func_149339_c(), IScoreObjectiveCriteria.DUMMY);
scoreobjective.setDisplayName(packetIn.func_149337_d());
scoreobjective.setRenderType(packetIn.func_179817_d());
}
else
{
ScoreObjective scoreobjective1 = scoreboard.getObjective(packetIn.func_149339_c());
if (packetIn.func_149338_e() == 1)
{
scoreboard.removeObjective(scoreobjective1);
}
else if (packetIn.func_149338_e() == 2)
{
scoreobjective1.setDisplayName(packetIn.func_149337_d());
scoreobjective1.setRenderType(packetIn.func_179817_d());
}
}
}