本文整理汇总了Java中net.minecraft.profiler.PlayerUsageSnooper.addClientStat方法的典型用法代码示例。如果您正苦于以下问题:Java PlayerUsageSnooper.addClientStat方法的具体用法?Java PlayerUsageSnooper.addClientStat怎么用?Java PlayerUsageSnooper.addClientStat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.profiler.PlayerUsageSnooper
的用法示例。
在下文中一共展示了PlayerUsageSnooper.addClientStat方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addServerStatsToSnooper
import net.minecraft.profiler.PlayerUsageSnooper; //导入方法依赖的package包/类
public void addServerStatsToSnooper(PlayerUsageSnooper playerSnooper)
{
playerSnooper.addClientStat("fps", Integer.valueOf(debugFPS));
playerSnooper.addClientStat("vsync_enabled", Boolean.valueOf(this.gameSettings.enableVsync));
playerSnooper.addClientStat("display_frequency", Integer.valueOf(Display.getDisplayMode().getFrequency()));
playerSnooper.addClientStat("display_type", this.fullscreen ? "fullscreen" : "windowed");
playerSnooper.addClientStat("run_time", Long.valueOf((MinecraftServer.getCurrentTimeMillis() - playerSnooper.getMinecraftStartTimeMillis()) / 60L * 1000L));
playerSnooper.addClientStat("current_action", this.func_181538_aA());
String s = ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN ? "little" : "big";
playerSnooper.addClientStat("endianness", s);
playerSnooper.addClientStat("resource_packs", Integer.valueOf(this.mcResourcePackRepository.getRepositoryEntries().size()));
int i = 0;
for (ResourcePackRepository.Entry resourcepackrepository$entry : this.mcResourcePackRepository.getRepositoryEntries())
{
playerSnooper.addClientStat("resource_pack[" + i++ + "]", resourcepackrepository$entry.getResourcePackName());
}
if (this.theIntegratedServer != null && this.theIntegratedServer.getPlayerUsageSnooper() != null)
{
playerSnooper.addClientStat("snooper_partner", this.theIntegratedServer.getPlayerUsageSnooper().getUniqueID());
}
}
示例2: addServerStatsToSnooper
import net.minecraft.profiler.PlayerUsageSnooper; //导入方法依赖的package包/类
public void addServerStatsToSnooper(PlayerUsageSnooper playerSnooper) {
playerSnooper.addClientStat("fps", Integer.valueOf(debugFPS));
playerSnooper.addClientStat("vsync_enabled", Boolean.valueOf(this.gameSettings.enableVsync));
playerSnooper.addClientStat("display_frequency", Integer.valueOf(Display.getDisplayMode().getFrequency()));
playerSnooper.addClientStat("display_type", this.fullscreen ? "fullscreen" : "windowed");
playerSnooper.addClientStat("run_time", Long.valueOf(
(MinecraftServer.getCurrentTimeMillis() - playerSnooper.getMinecraftStartTimeMillis()) / 60L * 1000L));
playerSnooper.addClientStat("current_action", this.func_181538_aA());
String s = ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN ? "little" : "big";
playerSnooper.addClientStat("endianness", s);
playerSnooper.addClientStat("resource_packs",
Integer.valueOf(this.mcResourcePackRepository.getRepositoryEntries().size()));
int i = 0;
for (ResourcePackRepository.Entry resourcepackrepository$entry : this.mcResourcePackRepository
.getRepositoryEntries()) {
playerSnooper.addClientStat("resource_pack[" + i++ + "]",
resourcepackrepository$entry.getResourcePackName());
}
if (this.theIntegratedServer != null && this.theIntegratedServer.getPlayerUsageSnooper() != null) {
playerSnooper.addClientStat("snooper_partner",
this.theIntegratedServer.getPlayerUsageSnooper().getUniqueID());
}
}
示例3: addServerStatsToSnooper
import net.minecraft.profiler.PlayerUsageSnooper; //导入方法依赖的package包/类
/**
* @author jamierocks - 26th April 2016
* @reason Overwrite to use Canary's {@link Configuration} rather than the original server.properties
*/
@Overwrite
public void addServerStatsToSnooper(PlayerUsageSnooper playerSnooper) {
playerSnooper.addClientStat("whitelist_enabled", Configuration.getServerConfig().isWhitelistEnabled());
playerSnooper.addClientStat("whitelist_count", Canary.whitelist().getSize());
super.addServerStatsToSnooper(playerSnooper);
}
示例4: addServerStatsToSnooper
import net.minecraft.profiler.PlayerUsageSnooper; //导入方法依赖的package包/类
public void addServerStatsToSnooper(PlayerUsageSnooper playerSnooper)
{
playerSnooper.addClientStat("whitelist_enabled", Boolean.valueOf(false));
playerSnooper.addClientStat("whitelist_count", Integer.valueOf(0));
if (this.serverConfigManager != null)
{
playerSnooper.addClientStat("players_current", Integer.valueOf(this.getCurrentPlayerCount()));
playerSnooper.addClientStat("players_max", Integer.valueOf(this.getMaxPlayers()));
playerSnooper.addClientStat("players_seen", Integer.valueOf(this.serverConfigManager.getAvailablePlayerDat().length));
}
playerSnooper.addClientStat("uses_auth", Boolean.valueOf(this.onlineMode));
playerSnooper.addClientStat("gui_state", this.getGuiEnabled() ? "enabled" : "disabled");
playerSnooper.addClientStat("run_time", Long.valueOf((getCurrentTimeMillis() - playerSnooper.getMinecraftStartTimeMillis()) / 60L * 1000L));
playerSnooper.addClientStat("avg_tick_ms", Integer.valueOf((int)(MathHelper.average(this.tickTimeArray) * 1.0E-6D)));
int i = 0;
if (this.worldServers != null)
{
for (int j = 0; j < this.worldServers.length; ++j)
{
if (this.worldServers[j] != null)
{
WorldServer worldserver = this.worldServers[j];
WorldInfo worldinfo = worldserver.getWorldInfo();
playerSnooper.addClientStat("world[" + i + "][dimension]", Integer.valueOf(worldserver.provider.getDimensionId()));
playerSnooper.addClientStat("world[" + i + "][mode]", worldinfo.getGameType());
playerSnooper.addClientStat("world[" + i + "][difficulty]", worldserver.getDifficulty());
playerSnooper.addClientStat("world[" + i + "][hardcore]", Boolean.valueOf(worldinfo.isHardcoreModeEnabled()));
playerSnooper.addClientStat("world[" + i + "][generator_name]", worldinfo.getTerrainType().getWorldTypeName());
playerSnooper.addClientStat("world[" + i + "][generator_version]", Integer.valueOf(worldinfo.getTerrainType().getGeneratorVersion()));
playerSnooper.addClientStat("world[" + i + "][height]", Integer.valueOf(this.buildLimit));
playerSnooper.addClientStat("world[" + i + "][chunks_loaded]", Integer.valueOf(worldserver.getChunkProvider().getLoadedChunkCount()));
++i;
}
}
}
playerSnooper.addClientStat("worlds", Integer.valueOf(i));
}
示例5: addServerStatsToSnooper
import net.minecraft.profiler.PlayerUsageSnooper; //导入方法依赖的package包/类
public void addServerStatsToSnooper(PlayerUsageSnooper playerSnooper)
{
playerSnooper.addClientStat("whitelist_enabled", Boolean.valueOf(this.getConfigurationManager().isWhiteListEnabled()));
playerSnooper.addClientStat("whitelist_count", Integer.valueOf(this.getConfigurationManager().getWhitelistedPlayerNames().length));
super.addServerStatsToSnooper(playerSnooper);
}
示例6: addServerStatsToSnooper
import net.minecraft.profiler.PlayerUsageSnooper; //导入方法依赖的package包/类
public void addServerStatsToSnooper(PlayerUsageSnooper playerSnooper)
{
super.addServerStatsToSnooper(playerSnooper);
playerSnooper.addClientStat("snooper_partner", this.mc.getPlayerUsageSnooper().getUniqueID());
}