Java 类net.minecraft.network.play.server.S3BPacketScoreboardObjective 实例源码

项目:DecompiledMinecraft    文件:ServerScoreboard.java   
public List<Packet> func_96550_d(ScoreObjective p_96550_1_)
{
    List<Packet> list = Lists.<Packet>newArrayList();
    list.add(new S3BPacketScoreboardObjective(p_96550_1_, 0));

    for (int i = 0; i < 19; ++i)
    {
        if (this.getObjectiveInDisplaySlot(i) == p_96550_1_)
        {
            list.add(new S3DPacketDisplayScoreboard(i, p_96550_1_));
        }
    }

    for (Score score : this.getSortedScores(p_96550_1_))
    {
        list.add(new S3CPacketUpdateScore(score));
    }

    return list;
}
项目:DecompiledMinecraft    文件:ServerScoreboard.java   
public List<Packet> func_96550_d(ScoreObjective p_96550_1_)
{
    List<Packet> list = Lists.<Packet>newArrayList();
    list.add(new S3BPacketScoreboardObjective(p_96550_1_, 0));

    for (int i = 0; i < 19; ++i)
    {
        if (this.getObjectiveInDisplaySlot(i) == p_96550_1_)
        {
            list.add(new S3DPacketDisplayScoreboard(i, p_96550_1_));
        }
    }

    for (Score score : this.getSortedScores(p_96550_1_))
    {
        list.add(new S3CPacketUpdateScore(score));
    }

    return list;
}
项目:BaseClient    文件:ServerScoreboard.java   
public List<Packet> func_96550_d(ScoreObjective p_96550_1_)
{
    List<Packet> list = Lists.<Packet>newArrayList();
    list.add(new S3BPacketScoreboardObjective(p_96550_1_, 0));

    for (int i = 0; i < 19; ++i)
    {
        if (this.getObjectiveInDisplaySlot(i) == p_96550_1_)
        {
            list.add(new S3DPacketDisplayScoreboard(i, p_96550_1_));
        }
    }

    for (Score score : this.getSortedScores(p_96550_1_))
    {
        list.add(new S3CPacketUpdateScore(score));
    }

    return list;
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
/**
 * 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());
        }
    }
}
项目:BaseClient    文件:ServerScoreboard.java   
public List<Packet> func_96550_d(ScoreObjective p_96550_1_)
{
    List<Packet> list = Lists.<Packet>newArrayList();
    list.add(new S3BPacketScoreboardObjective(p_96550_1_, 0));

    for (int i = 0; i < 19; ++i)
    {
        if (this.getObjectiveInDisplaySlot(i) == p_96550_1_)
        {
            list.add(new S3DPacketDisplayScoreboard(i, p_96550_1_));
        }
    }

    for (Score score : this.getSortedScores(p_96550_1_))
    {
        list.add(new S3CPacketUpdateScore(score));
    }

    return list;
}
项目:Resilience-Client-Source    文件:NetHandlerPlayClient.java   
/**
 * 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());
        }
    }
}
项目:Resilience-Client-Source    文件:ServerScoreboard.java   
public List func_96550_d(ScoreObjective par1ScoreObjective)
{
    ArrayList var2 = new ArrayList();
    var2.add(new S3BPacketScoreboardObjective(par1ScoreObjective, 0));

    for (int var3 = 0; var3 < 3; ++var3)
    {
        if (this.func_96539_a(var3) == par1ScoreObjective)
        {
            var2.add(new S3DPacketDisplayScoreboard(var3, par1ScoreObjective));
        }
    }

    Iterator var5 = this.func_96534_i(par1ScoreObjective).iterator();

    while (var5.hasNext())
    {
        Score var4 = (Score)var5.next();
        var2.add(new S3CPacketUpdateScore(var4, 0));
    }

    return var2;
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
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());
        }
    }
}
项目:Cauldron    文件:ServerScoreboard.java   
public List func_96550_d(ScoreObjective p_96550_1_)
{
    ArrayList arraylist = new ArrayList();
    arraylist.add(new S3BPacketScoreboardObjective(p_96550_1_, 0));

    for (int i = 0; i < 3; ++i)
    {
        if (this.func_96539_a(i) == p_96550_1_)
        {
            arraylist.add(new S3DPacketDisplayScoreboard(i, p_96550_1_));
        }
    }

    Iterator iterator = this.func_96534_i(p_96550_1_).iterator();

    while (iterator.hasNext())
    {
        Score score = (Score)iterator.next();
        arraylist.add(new S3CPacketUpdateScore(score, 0));
    }

    return arraylist;
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
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());
        }
    }
}
项目:Cauldron    文件:ServerScoreboard.java   
public List func_96550_d(ScoreObjective p_96550_1_)
{
    ArrayList arraylist = new ArrayList();
    arraylist.add(new S3BPacketScoreboardObjective(p_96550_1_, 0));

    for (int i = 0; i < 3; ++i)
    {
        if (this.func_96539_a(i) == p_96550_1_)
        {
            arraylist.add(new S3DPacketDisplayScoreboard(i, p_96550_1_));
        }
    }

    Iterator iterator = this.func_96534_i(p_96550_1_).iterator();

    while (iterator.hasNext())
    {
        Score score = (Score)iterator.next();
        arraylist.add(new S3CPacketUpdateScore(score, 0));
    }

    return arraylist;
}
项目:nailed    文件:PlayerScoreboardManager.java   
@Nonnull
@Override
public Objective getOrCreateObjective(@Nonnull String id) {
    Checks.notNull(id, "Id may not be null");
    Checks.check(id.length() <= 16, "Id must not be longer than 16");

    NailedObjective objective = objectivesById.get(id);
    if(objective == null){
        objective = new NailedObjective(id, this);
        this.objectives.add(objective);
        this.objectivesById.put(id, objective);
        S3BPacketScoreboardObjective packet = new S3BPacketScoreboardObjective();
        packet.objectiveName = objective.getId();
        packet.objectiveValue = objective.getDisplayName();
        packet.field_149342_c = 0; //0 = Create
        packet.type = IScoreObjectiveCriteria.EnumRenderType.INTEGER; //TODO: config option
        this.sendPacket(packet);
    }
    return objective;
}
项目:nailed    文件:MapScoreboardManager.java   
@Nonnull
@Override
public Objective getOrCreateObjective(@Nonnull String id) {
    Checks.notNull(id, "Id may not be null");
    Checks.check(id.length() <= 16, "Id must not be longer than 16");

    NailedObjective objective = objectivesById.get(id);
    if(objective == null){
        objective = new NailedObjective(id, this);
        this.objectives.add(objective);
        this.objectivesById.put(id, objective);
        S3BPacketScoreboardObjective packet = new S3BPacketScoreboardObjective();
        packet.objectiveName = objective.getId();
        packet.objectiveValue = objective.getDisplayName();
        packet.field_149342_c = 0; //0 = Create
        packet.type = IScoreObjectiveCriteria.EnumRenderType.INTEGER; //TODO: config option
        this.sendPacket(packet);
    }
    return objective;
}
项目:DecompiledMinecraft    文件:ServerScoreboard.java   
public void func_96532_b(ScoreObjective p_96532_1_)
{
    super.func_96532_b(p_96532_1_);

    if (this.field_96553_b.contains(p_96532_1_))
    {
        this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3BPacketScoreboardObjective(p_96532_1_, 2));
    }

    this.func_96551_b();
}
项目:DecompiledMinecraft    文件:ServerScoreboard.java   
public List<Packet> func_96548_f(ScoreObjective p_96548_1_)
{
    List<Packet> list = Lists.<Packet>newArrayList();
    list.add(new S3BPacketScoreboardObjective(p_96548_1_, 1));

    for (int i = 0; i < 19; ++i)
    {
        if (this.getObjectiveInDisplaySlot(i) == p_96548_1_)
        {
            list.add(new S3DPacketDisplayScoreboard(i, p_96548_1_));
        }
    }

    return list;
}
项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
/**
 * 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());
        }
    }
}
项目:DecompiledMinecraft    文件:ServerScoreboard.java   
public void func_96532_b(ScoreObjective p_96532_1_)
{
    super.func_96532_b(p_96532_1_);

    if (this.field_96553_b.contains(p_96532_1_))
    {
        this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3BPacketScoreboardObjective(p_96532_1_, 2));
    }

    this.func_96551_b();
}
项目:DecompiledMinecraft    文件:ServerScoreboard.java   
public List<Packet> func_96548_f(ScoreObjective p_96548_1_)
{
    List<Packet> list = Lists.<Packet>newArrayList();
    list.add(new S3BPacketScoreboardObjective(p_96548_1_, 1));

    for (int i = 0; i < 19; ++i)
    {
        if (this.getObjectiveInDisplaySlot(i) == p_96548_1_)
        {
            list.add(new S3DPacketDisplayScoreboard(i, p_96548_1_));
        }
    }

    return list;
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
/**
 * 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());
        }
    }
}
项目:BaseClient    文件:ServerScoreboard.java   
public void func_96532_b(ScoreObjective p_96532_1_)
{
    super.func_96532_b(p_96532_1_);

    if (this.field_96553_b.contains(p_96532_1_))
    {
        this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3BPacketScoreboardObjective(p_96532_1_, 2));
    }

    this.func_96551_b();
}
项目:BaseClient    文件:ServerScoreboard.java   
public List<Packet> func_96548_f(ScoreObjective p_96548_1_)
{
    List<Packet> list = Lists.<Packet>newArrayList();
    list.add(new S3BPacketScoreboardObjective(p_96548_1_, 1));

    for (int i = 0; i < 19; ++i)
    {
        if (this.getObjectiveInDisplaySlot(i) == p_96548_1_)
        {
            list.add(new S3DPacketDisplayScoreboard(i, p_96548_1_));
        }
    }

    return list;
}
项目:BaseClient    文件:ServerScoreboard.java   
public void func_96532_b(ScoreObjective p_96532_1_)
{
    super.func_96532_b(p_96532_1_);

    if (this.field_96553_b.contains(p_96532_1_))
    {
        this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3BPacketScoreboardObjective(p_96532_1_, 2));
    }

    this.func_96551_b();
}
项目:BaseClient    文件:ServerScoreboard.java   
public List<Packet> func_96548_f(ScoreObjective p_96548_1_)
{
    List<Packet> list = Lists.<Packet>newArrayList();
    list.add(new S3BPacketScoreboardObjective(p_96548_1_, 1));

    for (int i = 0; i < 19; ++i)
    {
        if (this.getObjectiveInDisplaySlot(i) == p_96548_1_)
        {
            list.add(new S3DPacketDisplayScoreboard(i, p_96548_1_));
        }
    }

    return list;
}
项目:Resilience-Client-Source    文件:ServerScoreboard.java   
public void func_96532_b(ScoreObjective par1ScoreObjective)
{
    super.func_96532_b(par1ScoreObjective);

    if (this.field_96553_b.contains(par1ScoreObjective))
    {
        this.scoreboardMCServer.getConfigurationManager().func_148540_a(new S3BPacketScoreboardObjective(par1ScoreObjective, 2));
    }

    this.func_96551_b();
}
项目:Resilience-Client-Source    文件:ServerScoreboard.java   
public List func_96548_f(ScoreObjective par1ScoreObjective)
{
    ArrayList var2 = new ArrayList();
    var2.add(new S3BPacketScoreboardObjective(par1ScoreObjective, 1));

    for (int var3 = 0; var3 < 3; ++var3)
    {
        if (this.func_96539_a(var3) == par1ScoreObjective)
        {
            var2.add(new S3DPacketDisplayScoreboard(var3, par1ScoreObjective));
        }
    }

    return var2;
}
项目:Cauldron    文件:ServerScoreboard.java   
public void func_96532_b(ScoreObjective p_96532_1_)
{
    super.func_96532_b(p_96532_1_);

    if (this.field_96553_b.contains(p_96532_1_))
    {
        this.sendAll(new S3BPacketScoreboardObjective(p_96532_1_, 2)); // CraftBukkit - Internal packet method
    }

    this.func_96551_b();
}
项目:Cauldron    文件:ServerScoreboard.java   
public List func_96548_f(ScoreObjective p_96548_1_)
{
    ArrayList arraylist = new ArrayList();
    arraylist.add(new S3BPacketScoreboardObjective(p_96548_1_, 1));

    for (int i = 0; i < 3; ++i)
    {
        if (this.func_96539_a(i) == p_96548_1_)
        {
            arraylist.add(new S3DPacketDisplayScoreboard(i, p_96548_1_));
        }
    }

    return arraylist;
}
项目:Cauldron    文件:ServerScoreboard.java   
public void func_96532_b(ScoreObjective p_96532_1_)
{
    super.func_96532_b(p_96532_1_);

    if (this.field_96553_b.contains(p_96532_1_))
    {
        this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3BPacketScoreboardObjective(p_96532_1_, 2));
    }

    this.func_96551_b();
}
项目:Cauldron    文件:ServerScoreboard.java   
public List func_96548_f(ScoreObjective p_96548_1_)
{
    ArrayList arraylist = new ArrayList();
    arraylist.add(new S3BPacketScoreboardObjective(p_96548_1_, 1));

    for (int i = 0; i < 3; ++i)
    {
        if (this.func_96539_a(i) == p_96548_1_)
        {
            arraylist.add(new S3DPacketDisplayScoreboard(i, p_96548_1_));
        }
    }

    return arraylist;
}
项目:nailed    文件:NailedObjective.java   
@Override
public void setDisplayName(@Nonnull String displayName) {
    Checks.notNull(displayName, "displayName may not be null");
    Checks.check(displayName.length() <= 32, "displayName may not be longer than 32");

    this.displayName = displayName;
    S3BPacketScoreboardObjective packet = new S3BPacketScoreboardObjective();
    packet.objectiveName = this.id;
    packet.objectiveValue = this.displayName;
    packet.type = IScoreObjectiveCriteria.EnumRenderType.INTEGER; //TODO: config option
    packet.field_149342_c = 2; //Update
    this.manager.sendPacket(packet);
}
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
/**
 * May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
 */
void handleScoreboardObjective(S3BPacketScoreboardObjective packetIn);
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
/**
 * May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
 */
void handleScoreboardObjective(S3BPacketScoreboardObjective packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
/**
 * May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
 */
void handleScoreboardObjective(S3BPacketScoreboardObjective packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
/**
 * May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
 */
void handleScoreboardObjective(S3BPacketScoreboardObjective packetIn);
项目:Resilience-Client-Source    文件:INetHandlerPlayClient.java   
/**
 * May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
 */
void handleScoreboardObjective(S3BPacketScoreboardObjective var1);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleScoreboardObjective(S3BPacketScoreboardObjective p_147291_1_);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleScoreboardObjective(S3BPacketScoreboardObjective p_147291_1_);