• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java S37PacketStatistics类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



S37PacketStatistics类属于net.minecraft.network.play.server包,在下文中一共展示了S37PacketStatistics类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: func_150876_a

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
public void func_150876_a(EntityPlayerMP p_150876_1_)
{
    int i = this.mcServer.getTickCounter();
    Map<StatBase, Integer> map = Maps.<StatBase, Integer>newHashMap();

    if (this.field_150886_g || i - this.field_150885_f > 300)
    {
        this.field_150885_f = i;

        for (StatBase statbase : this.func_150878_c())
        {
            map.put(statbase, Integer.valueOf(this.readStat(statbase)));
        }
    }

    p_150876_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(map));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:StatisticsFile.java


示例2: func_150876_a

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
public void func_150876_a(EntityPlayerMP p_150876_1_)
{
    int var2 = this.field_150890_c.getTickCounter();
    HashMap var3 = Maps.newHashMap();

    if (this.field_150886_g || var2 - this.field_150885_f > 300)
    {
        this.field_150885_f = var2;
        Iterator var4 = this.func_150878_c().iterator();

        while (var4.hasNext())
        {
            StatBase var5 = (StatBase)var4.next();
            var3.put(var5, Integer.valueOf(this.writeStat(var5)));
        }
    }

    p_150876_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(var3));
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:20,代码来源:StatisticsFile.java


示例3: func_150884_b

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
public void func_150884_b(EntityPlayerMP p_150884_1_)
{
    HashMap var2 = Maps.newHashMap();
    Iterator var3 = AchievementList.achievementList.iterator();

    while (var3.hasNext())
    {
        Achievement var4 = (Achievement)var3.next();

        if (this.hasAchievementUnlocked(var4))
        {
            var2.put(var4, Integer.valueOf(this.writeStat(var4)));
            this.field_150888_e.remove(var4);
        }
    }

    p_150884_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(var2));
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:19,代码来源:StatisticsFile.java


示例4: func_150876_a

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
public void func_150876_a(EntityPlayerMP p_150876_1_)
{
    int i = this.field_150890_c.getTickCounter();
    HashMap hashmap = Maps.newHashMap();

    if (this.field_150886_g || i - this.field_150885_f > 300)
    {
        this.field_150885_f = i;
        Iterator iterator = this.func_150878_c().iterator();

        while (iterator.hasNext())
        {
            StatBase statbase = (StatBase)iterator.next();
            hashmap.put(statbase, Integer.valueOf(this.writeStat(statbase)));
        }
    }

    p_150876_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(hashmap));
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:20,代码来源:StatisticsFile.java


示例5: func_150884_b

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
public void func_150884_b(EntityPlayerMP p_150884_1_)
{
    HashMap hashmap = Maps.newHashMap();
    Iterator iterator = AchievementList.achievementList.iterator();

    while (iterator.hasNext())
    {
        Achievement achievement = (Achievement)iterator.next();

        if (this.hasAchievementUnlocked(achievement))
        {
            hashmap.put(achievement, Integer.valueOf(this.writeStat(achievement)));
            this.field_150888_e.remove(achievement);
        }
    }

    p_150884_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(hashmap));
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:StatisticsFile.java


示例6: sendAchievements

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
public void sendAchievements(EntityPlayerMP player)
{
    Map<StatBase, Integer> map = Maps.<StatBase, Integer>newHashMap();

    for (Achievement achievement : AchievementList.achievementList)
    {
        if (this.hasAchievementUnlocked(achievement))
        {
            map.put(achievement, Integer.valueOf(this.readStat(achievement)));
            this.field_150888_e.remove(achievement);
        }
    }

    player.playerNetServerHandler.sendPacket(new S37PacketStatistics(map));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:16,代码来源:StatisticsFile.java


示例7: handleStatistics

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
/**
 * Updates the players statistics or achievements
 */
public void handleStatistics(S37PacketStatistics packetIn) {
	PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
	boolean flag = false;

	for (Entry<StatBase, Integer> entry : packetIn.func_148974_c().entrySet()) {
		StatBase statbase = (StatBase) entry.getKey();
		int i = ((Integer) entry.getValue()).intValue();

		if (statbase.isAchievement() && i > 0) {
			if (this.field_147308_k && this.gameController.thePlayer.getStatFileWriter().readStat(statbase) == 0) {
				Achievement achievement = (Achievement) statbase;
				this.gameController.guiAchievement.displayAchievement(achievement);
				this.gameController.getTwitchStream().func_152911_a(new MetadataAchievement(achievement), 0L);

				if (statbase == AchievementList.openInventory) {
					this.gameController.gameSettings.showInventoryAchievementHint = false;
					this.gameController.gameSettings.saveOptions();
				}
			}

			flag = true;
		}

		this.gameController.thePlayer.getStatFileWriter().unlockAchievement(this.gameController.thePlayer, statbase,
				i);
	}

	if (!this.field_147308_k && !flag && this.gameController.gameSettings.showInventoryAchievementHint) {
		this.gameController.guiAchievement.displayUnformattedAchievement(AchievementList.openInventory);
	}

	this.field_147308_k = true;

	if (this.gameController.currentScreen instanceof IProgressMeter) {
		((IProgressMeter) this.gameController.currentScreen).doneLoading();
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:41,代码来源:NetHandlerPlayClient.java


示例8: handleStatistics

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
/**
 * Updates the players statistics or achievements
 */
public void handleStatistics(S37PacketStatistics packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    boolean flag = false;

    for (Entry<StatBase, Integer> entry : packetIn.func_148974_c().entrySet())
    {
        StatBase statbase = (StatBase)entry.getKey();
        int i = ((Integer)entry.getValue()).intValue();

        if (statbase.isAchievement() && i > 0)
        {
            if (this.field_147308_k && this.gameController.thePlayer.getStatFileWriter().readStat(statbase) == 0)
            {
                Achievement achievement = (Achievement)statbase;
                this.gameController.guiAchievement.displayAchievement(achievement);
                this.gameController.getTwitchStream().func_152911_a(new MetadataAchievement(achievement), 0L);

                if (statbase == AchievementList.openInventory)
                {
                    this.gameController.gameSettings.showInventoryAchievementHint = false;
                    this.gameController.gameSettings.saveOptions();
                }
            }

            flag = true;
        }

        this.gameController.thePlayer.getStatFileWriter().unlockAchievement(this.gameController.thePlayer, statbase, i);
    }

    if (!this.field_147308_k && !flag && this.gameController.gameSettings.showInventoryAchievementHint)
    {
        this.gameController.guiAchievement.displayUnformattedAchievement(AchievementList.openInventory);
    }

    this.field_147308_k = true;

    if (this.gameController.currentScreen instanceof IProgressMeter)
    {
        ((IProgressMeter)this.gameController.currentScreen).doneLoading();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:47,代码来源:NetHandlerPlayClient.java


示例9: handleStatistics

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
/**
 * Updates the players statistics or achievements
 */
public void handleStatistics(S37PacketStatistics p_147293_1_)
{
    boolean var2 = false;
    StatBase var5;
    int var6;

    for (Iterator var3 = p_147293_1_.func_148974_c().entrySet().iterator(); var3.hasNext(); this.gameController.thePlayer.func_146107_m().func_150873_a(this.gameController.thePlayer, var5, var6))
    {
        Entry var4 = (Entry)var3.next();
        var5 = (StatBase)var4.getKey();
        var6 = ((Integer)var4.getValue()).intValue();

        if (var5.isAchievement() && var6 > 0)
        {
            if (this.field_147308_k && this.gameController.thePlayer.func_146107_m().writeStat(var5) == 0)
            {
                this.gameController.guiAchievement.func_146256_a((Achievement)var5);

                if (var5 == AchievementList.openInventory)
                {
                    this.gameController.gameSettings.showInventoryAchievementHint = false;
                    this.gameController.gameSettings.saveOptions();
                }
            }

            var2 = true;
        }
    }

    if (!this.field_147308_k && !var2 && this.gameController.gameSettings.showInventoryAchievementHint)
    {
        this.gameController.guiAchievement.func_146255_b(AchievementList.openInventory);
    }

    this.field_147308_k = true;

    if (this.gameController.currentScreen instanceof IProgressMeter)
    {
        ((IProgressMeter)this.gameController.currentScreen).func_146509_g();
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:45,代码来源:NetHandlerPlayClient.java


示例10: handleStatistics

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
public void handleStatistics(S37PacketStatistics p_147293_1_)
{
    boolean flag = false;
    StatBase statbase;
    int i;

    for (Iterator iterator = p_147293_1_.func_148974_c().entrySet().iterator(); iterator.hasNext(); this.gameController.thePlayer.getStatFileWriter().func_150873_a(this.gameController.thePlayer, statbase, i))
    {
        Entry entry = (Entry)iterator.next();
        statbase = (StatBase)entry.getKey();
        i = ((Integer)entry.getValue()).intValue();

        if (statbase.isAchievement() && i > 0)
        {
            if (this.field_147308_k && this.gameController.thePlayer.getStatFileWriter().writeStat(statbase) == 0)
            {
                Achievement achievement = (Achievement)statbase;
                this.gameController.guiAchievement.func_146256_a(achievement);
                this.gameController.func_152346_Z().func_152911_a(new MetadataAchievement(achievement), 0L);

                if (statbase == AchievementList.openInventory)
                {
                    this.gameController.gameSettings.showInventoryAchievementHint = false;
                    this.gameController.gameSettings.saveOptions();
                }
            }

            flag = true;
        }
    }

    if (!this.field_147308_k && !flag && this.gameController.gameSettings.showInventoryAchievementHint)
    {
        this.gameController.guiAchievement.func_146255_b(AchievementList.openInventory);
    }

    this.field_147308_k = true;

    if (this.gameController.currentScreen instanceof IProgressMeter)
    {
        ((IProgressMeter)this.gameController.currentScreen).func_146509_g();
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:44,代码来源:NetHandlerPlayClient.java


示例11: handleStatistics

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
/**
 * Updates the players statistics or achievements
 */
void handleStatistics(S37PacketStatistics packetIn);
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:INetHandlerPlayClient.java


示例12: handleStatistics

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
/**
 * Updates the players statistics or achievements
 */
void handleStatistics(S37PacketStatistics var1);
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:5,代码来源:INetHandlerPlayClient.java


示例13: handleStatistics

import net.minecraft.network.play.server.S37PacketStatistics; //导入依赖的package包/类
void handleStatistics(S37PacketStatistics p_147293_1_); 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:2,代码来源:INetHandlerPlayClient.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DatePickerDialog类代码示例发布时间:2022-05-23
下一篇:
Java CustomXYToolTipGenerator类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap