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


Java Score.func_96648_a方法代码示例

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


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

示例1: addToPlayerScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
/**
 * Adds a value to the player score. Currently not actually used and the entity passed in does nothing. Args:
 * entity, scoreToAdd
 */
public void addToPlayerScore(Entity entityIn, int amount)
{
    this.addScore(amount);
    Collection<ScoreObjective> collection = this.getWorldScoreboard().getObjectivesFromCriteria(IScoreObjectiveCriteria.totalKillCount);

    if (entityIn instanceof EntityPlayer)
    {
        this.triggerAchievement(StatList.playerKillsStat);
        collection.addAll(this.getWorldScoreboard().getObjectivesFromCriteria(IScoreObjectiveCriteria.playerKillCount));
        collection.addAll(this.func_175137_e(entityIn));
    }
    else
    {
        this.triggerAchievement(StatList.mobKillsStat);
    }

    for (ScoreObjective scoreobjective : collection)
    {
        Score score = this.getWorldScoreboard().getValueFromObjective(this.getName(), scoreobjective);
        score.func_96648_a();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:27,代码来源:EntityPlayer.java

示例2: addToPlayerScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public void addToPlayerScore(Entity p_70084_1_, int p_70084_2_)
{
	addScore(p_70084_2_);
	Collection collection = getWorldScoreboard().func_96520_a(IScoreObjectiveCriteria.totalKillCount);
	if ((p_70084_1_ instanceof EntityPlayer))
	{
		addStat(StatList.playerKillsStat, 1);
		collection.addAll(getWorldScoreboard().func_96520_a(IScoreObjectiveCriteria.playerKillCount));
	}
	else
	{
		addStat(StatList.mobKillsStat, 1);
	}
	Iterator iterator = collection.iterator();
	while (iterator.hasNext())
	{
		ScoreObjective scoreobjective = (ScoreObjective)iterator.next();
		Score score = getWorldScoreboard().func_96529_a(getCommandSenderName(), scoreobjective);
		score.func_96648_a();
	}
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:22,代码来源:EntityPlayer.java

示例3: addToPlayerScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
/**
 * Adds a value to the player score. Currently not actually used and the entity passed in does nothing. Args:
 * entity, scoreToAdd
 */
public void addToPlayerScore(Entity par1Entity, int par2)
{
    this.addScore(par2);
    Collection var3 = this.getWorldScoreboard().func_96520_a(IScoreObjectiveCriteria.totalKillCount);

    if (par1Entity instanceof EntityPlayer)
    {
        this.addStat(StatList.playerKillsStat, 1);
        var3.addAll(this.getWorldScoreboard().func_96520_a(IScoreObjectiveCriteria.playerKillCount));
    }
    else
    {
        this.addStat(StatList.mobKillsStat, 1);
    }

    Iterator var4 = var3.iterator();

    while (var4.hasNext())
    {
        ScoreObjective var5 = (ScoreObjective)var4.next();
        Score var6 = this.getWorldScoreboard().func_96529_a(this.getCommandSenderName(), var5);
        var6.func_96648_a();
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:29,代码来源:EntityPlayer.java

示例4: addToPlayerScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public void addToPlayerScore(Entity p_70084_1_, int p_70084_2_)
{
    this.addScore(p_70084_2_);
    // CraftBukkit - Get our scores instead
    Collection<Score> collection = this.worldObj.getServer().getScoreboardManager().getScoreboardScores(IScoreObjectiveCriteria.totalKillCount, this.getCommandSenderName(), new java.util.ArrayList<Score>());

    if (p_70084_1_ instanceof EntityPlayer)
    {
        this.addStat(StatList.playerKillsStat, 1);
        // CraftBukkit - Get our scores instead
        this.worldObj.getServer().getScoreboardManager().getScoreboardScores(IScoreObjectiveCriteria.playerKillCount, this.getCommandSenderName(), collection);
    }
    else
    {
        this.addStat(StatList.mobKillsStat, 1);
    }

    Iterator iterator = collection.iterator();

    while (iterator.hasNext())
    {
        Score score = (Score) iterator.next(); // CraftBukkit - Use our scores instead
        score.func_96648_a();
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:26,代码来源:EntityPlayer.java

示例5: addToPlayerScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public void addToPlayerScore(Entity p_70084_1_, int p_70084_2_)
{
    this.addScore(p_70084_2_);
    Collection collection = this.getWorldScoreboard().func_96520_a(IScoreObjectiveCriteria.totalKillCount);

    if (p_70084_1_ instanceof EntityPlayer)
    {
        this.addStat(StatList.playerKillsStat, 1);
        collection.addAll(this.getWorldScoreboard().func_96520_a(IScoreObjectiveCriteria.playerKillCount));
    }
    else
    {
        this.addStat(StatList.mobKillsStat, 1);
    }

    Iterator iterator = collection.iterator();

    while (iterator.hasNext())
    {
        ScoreObjective scoreobjective = (ScoreObjective)iterator.next();
        Score score = this.getWorldScoreboard().func_96529_a(this.getCommandSenderName(), scoreobjective);
        score.func_96648_a();
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:25,代码来源:EntityPlayer.java

示例6: func_70645_a

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public void func_70645_a(DamageSource p_70645_1_) {
   this.field_71133_b.func_71203_ab().func_92062_k(this.func_110142_aN().func_94546_b());
   if(!this.field_70170_p.func_82736_K().func_82766_b("keepInventory")) {
      this.field_71071_by.func_70436_m();
   }

   Collection var2 = this.field_70170_p.func_96441_U().func_96520_a(ScoreObjectiveCriteria.field_96642_c);
   Iterator var3 = var2.iterator();

   while(var3.hasNext()) {
      ScoreObjective var4 = (ScoreObjective)var3.next();
      Score var5 = this.func_96123_co().func_96529_a(this.func_70023_ak(), var4);
      var5.func_96648_a();
   }

   EntityLivingBase var6 = this.func_94060_bK();
   if(var6 != null) {
      var6.func_70084_c(this, this.field_70744_aE);
   }

   this.func_71064_a(StatList.field_75960_y, 1);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:EntityPlayerMP.java

示例7: func_70084_c

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public void func_70084_c(Entity p_70084_1_, int p_70084_2_) {
   this.func_85039_t(p_70084_2_);
   Collection var3 = this.func_96123_co().func_96520_a(ScoreObjectiveCriteria.field_96640_e);
   if(p_70084_1_ instanceof EntityPlayer) {
      this.func_71064_a(StatList.field_75932_A, 1);
      var3.addAll(this.func_96123_co().func_96520_a(ScoreObjectiveCriteria.field_96639_d));
   } else {
      this.func_71064_a(StatList.field_75959_z, 1);
   }

   Iterator var4 = var3.iterator();

   while(var4.hasNext()) {
      ScoreObjective var5 = (ScoreObjective)var4.next();
      Score var6 = this.func_96123_co().func_96529_a(this.func_70023_ak(), var5);
      var6.func_96648_a();
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:20,代码来源:EntityPlayer.java

示例8: addToPlayerScore

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
/**
 * Adds a value to the player score. Currently not actually used and the entity passed in does nothing. Args:
 * entity, scoreToAdd
 */
public void addToPlayerScore(Entity par1Entity, int par2)
{
    this.addScore(par2);
    Collection collection = this.getWorldScoreboard().func_96520_a(ScoreObjectiveCriteria.totalKillCount);

    if (par1Entity instanceof EntityPlayer)
    {
        this.addStat(StatList.playerKillsStat, 1);
        collection.addAll(this.getWorldScoreboard().func_96520_a(ScoreObjectiveCriteria.playerKillCount));
    }
    else
    {
        this.addStat(StatList.mobKillsStat, 1);
    }

    Iterator iterator = collection.iterator();

    while (iterator.hasNext())
    {
        ScoreObjective scoreobjective = (ScoreObjective)iterator.next();
        Score score = this.getWorldScoreboard().func_96529_a(this.getEntityName(), scoreobjective);
        score.func_96648_a();
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:29,代码来源:EntityPlayer.java

示例9: func_175137_e

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
private Collection<ScoreObjective> func_175137_e(Entity p_175137_1_)
{
    ScorePlayerTeam scoreplayerteam = this.getWorldScoreboard().getPlayersTeam(this.getName());

    if (scoreplayerteam != null)
    {
        int i = scoreplayerteam.getChatFormat().getColorIndex();

        if (i >= 0 && i < IScoreObjectiveCriteria.field_178793_i.length)
        {
            for (ScoreObjective scoreobjective : this.getWorldScoreboard().getObjectivesFromCriteria(IScoreObjectiveCriteria.field_178793_i[i]))
            {
                Score score = this.getWorldScoreboard().getValueFromObjective(p_175137_1_.getName(), scoreobjective);
                score.func_96648_a();
            }
        }
    }

    ScorePlayerTeam scoreplayerteam1 = this.getWorldScoreboard().getPlayersTeam(p_175137_1_.getName());

    if (scoreplayerteam1 != null)
    {
        int j = scoreplayerteam1.getChatFormat().getColorIndex();

        if (j >= 0 && j < IScoreObjectiveCriteria.field_178792_h.length)
        {
            return this.getWorldScoreboard().getObjectivesFromCriteria(IScoreObjectiveCriteria.field_178792_h[j]);
        }
    }

    return Lists.<ScoreObjective>newArrayList();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:33,代码来源:EntityPlayer.java

示例10: onDeath

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
/**
 * Called when the mob's health reaches 0.
 */
public void onDeath(DamageSource par1DamageSource)
{
    this.mcServer.getConfigurationManager().func_148539_a(this.func_110142_aN().func_151521_b());

    if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
    {
        this.inventory.dropAllItems();
    }

    Collection var2 = this.worldObj.getScoreboard().func_96520_a(IScoreObjectiveCriteria.deathCount);
    Iterator var3 = var2.iterator();

    while (var3.hasNext())
    {
        ScoreObjective var4 = (ScoreObjective)var3.next();
        Score var5 = this.getWorldScoreboard().func_96529_a(this.getCommandSenderName(), var4);
        var5.func_96648_a();
    }

    EntityLivingBase var6 = this.func_94060_bK();

    if (var6 != null)
    {
        int var7 = EntityList.getEntityID(var6);
        EntityList.EntityEggInfo var8 = (EntityList.EntityEggInfo)EntityList.entityEggs.get(Integer.valueOf(var7));

        if (var8 != null)
        {
            this.addStat(var8.field_151513_e, 1);
        }

        var6.addToPlayerScore(this, this.scoreValue);
    }

    this.addStat(StatList.deathsStat, 1);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:40,代码来源:EntityPlayerMP.java

示例11: onDeath

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
/**
 * Called when the mob's health reaches 0.
 */
public void onDeath(DamageSource cause)
{
    if (this.worldObj.getGameRules().getBoolean("showDeathMessages"))
    {
        Team team = this.getTeam();

        if (team != null && team.getDeathMessageVisibility() != Team.EnumVisible.ALWAYS)
        {
            if (team.getDeathMessageVisibility() == Team.EnumVisible.HIDE_FOR_OTHER_TEAMS)
            {
                this.mcServer.getConfigurationManager().sendMessageToAllTeamMembers(this, this.getCombatTracker().getDeathMessage());
            }
            else if (team.getDeathMessageVisibility() == Team.EnumVisible.HIDE_FOR_OWN_TEAM)
            {
                this.mcServer.getConfigurationManager().sendMessageToTeamOrEvryPlayer(this, this.getCombatTracker().getDeathMessage());
            }
        }
        else
        {
            this.mcServer.getConfigurationManager().sendChatMsg(this.getCombatTracker().getDeathMessage());
        }
    }

    if (!this.worldObj.getGameRules().getBoolean("keepInventory"))
    {
        this.inventory.dropAllItems();
    }

    for (ScoreObjective scoreobjective : this.worldObj.getScoreboard().getObjectivesFromCriteria(IScoreObjectiveCriteria.deathCount))
    {
        Score score = this.getWorldScoreboard().getValueFromObjective(this.getName(), scoreobjective);
        score.func_96648_a();
    }

    EntityLivingBase entitylivingbase = this.func_94060_bK();

    if (entitylivingbase != null)
    {
        EntityList.EntityEggInfo entitylist$entityegginfo = (EntityList.EntityEggInfo)EntityList.entityEggs.get(Integer.valueOf(EntityList.getEntityID(entitylivingbase)));

        if (entitylist$entityegginfo != null)
        {
            this.triggerAchievement(entitylist$entityegginfo.field_151513_e);
        }

        entitylivingbase.addToPlayerScore(this, this.scoreValue);
    }

    this.triggerAchievement(StatList.deathsStat);
    this.func_175145_a(StatList.timeSinceDeathStat);
    this.getCombatTracker().reset();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:56,代码来源:EntityPlayerMP.java

示例12: onDeath

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
/**
 * @author jamierocks - 2nd October 2016
 * @reason Overwrite to use Canary's {@link Configuration} rather than the original server.properties
 *         and fire the {@link PlayerDeathHook}.
 */
@Overwrite
public void onDeath(DamageSource cause) {
    // Neptune - PlayerDeathHook start
    PlayerDeathHook hook = (PlayerDeathHook) new PlayerDeathHook(
            this,
            (net.canarymod.api.DamageSource) cause,
            (ChatComponent) this.getCombatTracker().getDeathMessage()
    ).call();
    // Neptune - PlayerDeathHook end

    //if (this.worldObj.getGameRules().getBoolean("showDeathMessages")) {
    if (Configuration.getServerConfig().isDeathMessageEnabled()) { // Neptune - Use Canary configuration
        Team team = this.getTeam();

        if (team != null && team.getDeathMessageVisibility() != Team.EnumVisible.ALWAYS) {
            if (team.getDeathMessageVisibility() == Team.EnumVisible.HIDE_FOR_OTHER_TEAMS) {
                this.mcServer.getConfigurationManager()
                        .sendMessageToAllTeamMembers((EntityPlayerMP) (Object) this, (IChatComponent) hook.getDeathMessage1());
            } else if (team.getDeathMessageVisibility() == Team.EnumVisible.HIDE_FOR_OWN_TEAM) {
                this.mcServer.getConfigurationManager().sendMessageToTeamOrEvryPlayer(
                        (EntityPlayerMP) (Object) this, (IChatComponent) hook.getDeathMessage1());
            }
        } else {
            this.mcServer.getConfigurationManager().sendChatMsg((IChatComponent) hook.getDeathMessage1());
        }
    }

    if (!this.worldObj.getGameRules().getBoolean("keepInventory")) {
        this.inventory.dropAllItems();
    }

    for (ScoreObjective scoreobjective : this.worldObj.getScoreboard().getObjectivesFromCriteria(IScoreObjectiveCriteria.deathCount)) {
        Score score = this.getWorldScoreboard().getValueFromObjective(this.getName(), scoreobjective);
        score.func_96648_a();
    }

    EntityLivingBase entitylivingbase = this.getAttackingEntity();

    if (entitylivingbase != null) {
        EntityList.EntityEggInfo entitylist$entityegginfo = EntityList.entityEggs.get(EntityList.getEntityID(entitylivingbase));

        if (entitylist$entityegginfo != null) {
            this.triggerAchievement(entitylist$entityegginfo.field_151513_e);
        }

        entitylivingbase.addToPlayerScore((EntityPlayerMP) (Object) this, this.scoreValue);
    }

    this.triggerAchievement(StatList.deathsStat);
    this.func_175145_a(StatList.timeSinceDeathStat);
    this.getCombatTracker().reset();
}
 
开发者ID:NeptunePowered,项目名称:NeptuneMod,代码行数:58,代码来源:MixinEntityPlayerMP.java

示例13: onDeath

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
public void onDeath(DamageSource p_70645_1_)
{
    if (ForgeHooks.onLivingDeath(this, p_70645_1_)) return;
    this.mcServer.getConfigurationManager().sendChatMsg(this.func_110142_aN().func_151521_b());

    if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
    {
        captureDrops = true;
        capturedDrops.clear();

        this.inventory.dropAllItems();

        captureDrops = false;
        PlayerDropsEvent event = new PlayerDropsEvent(this, p_70645_1_, capturedDrops, recentlyHit > 0);
        if (!MinecraftForge.EVENT_BUS.post(event))
        {
            for (EntityItem item : capturedDrops)
            {
                joinEntityItemWithWorld(item);
            }
        }
    }

    Collection collection = this.worldObj.getScoreboard().func_96520_a(IScoreObjectiveCriteria.deathCount);
    Iterator iterator = collection.iterator();

    while (iterator.hasNext())
    {
        ScoreObjective scoreobjective = (ScoreObjective)iterator.next();
        Score score = this.getWorldScoreboard().func_96529_a(this.getCommandSenderName(), scoreobjective);
        score.func_96648_a();
    }

    EntityLivingBase entitylivingbase = this.func_94060_bK();

    if (entitylivingbase != null)
    {
        int i = EntityList.getEntityID(entitylivingbase);
        EntityList.EntityEggInfo entityegginfo = (EntityList.EntityEggInfo)EntityList.entityEggs.get(Integer.valueOf(i));

        if (entityegginfo != null)
        {
            this.addStat(entityegginfo.field_151513_e, 1);
        }

        entitylivingbase.addToPlayerScore(this, this.scoreValue);
    }

    this.addStat(StatList.deathsStat, 1);
    this.func_110142_aN().func_94549_h();
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:52,代码来源:EntityPlayerMP.java

示例14: onDeath

import net.minecraft.scoreboard.Score; //导入方法依赖的package包/类
/**
 * Called when the mob's health reaches 0.
 */
public void onDeath(DamageSource par1DamageSource)
{
    if (ForgeHooks.onLivingDeath(this, par1DamageSource)) return;
    this.mcServer.getConfigurationManager().sendChatMsg(this.func_110142_aN().func_94546_b());

    if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
    {
        captureDrops = true;
        capturedDrops.clear();

        this.inventory.dropAllItems();

        captureDrops = false;
        PlayerDropsEvent event = new PlayerDropsEvent(this, par1DamageSource, capturedDrops, recentlyHit > 0);
        if (!MinecraftForge.EVENT_BUS.post(event))
        {
            for (EntityItem item : capturedDrops)
            {
                joinEntityItemWithWorld(item);
            }
        }
    }

    Collection collection = this.worldObj.getScoreboard().func_96520_a(ScoreObjectiveCriteria.deathCount);
    Iterator iterator = collection.iterator();

    while (iterator.hasNext())
    {
        ScoreObjective scoreobjective = (ScoreObjective)iterator.next();
        Score score = this.getWorldScoreboard().func_96529_a(this.getEntityName(), scoreobjective);
        score.func_96648_a();
    }

    EntityLivingBase entitylivingbase = this.func_94060_bK();

    if (entitylivingbase != null)
    {
        entitylivingbase.addToPlayerScore(this, this.scoreValue);
    }

    this.addStat(StatList.deathsStat, 1);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:46,代码来源:EntityPlayerMP.java


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