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


Java Profiler类代码示例

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


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

示例1: WorldClient

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
public WorldClient(NetHandlerPlayClient p_i45063_1_, WorldSettings p_i45063_2_, int p_i45063_3_, EnumDifficulty p_i45063_4_, Profiler p_i45063_5_)
{
    super(new SaveHandlerMP(), new WorldInfo(p_i45063_2_, "MpServer"), WorldProvider.getProviderForDimension(p_i45063_3_), p_i45063_5_, true);
    this.sendQueue = p_i45063_1_;
    this.getWorldInfo().setDifficulty(p_i45063_4_);
    this.provider.registerWorld(this);
    this.setSpawnPoint(new BlockPos(8, 64, 8));
    this.chunkProvider = this.createChunkProvider();
    this.mapStorage = new SaveDataMemoryStorage();
    this.calculateInitialSkylight();
    this.calculateInitialWeather();
    Reflector.postForgeBusEvent(Reflector.WorldEvent_Load_Constructor, new Object[] {this});

    if (this.mc.playerController != null && this.mc.playerController.getClass() == PlayerControllerMP.class)
    {
        this.mc.playerController = new PlayerControllerOF(this.mc, p_i45063_1_);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:19,代码来源:WorldClient.java

示例2: WorldClient

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
public WorldClient(NetHandlerPlayClient netHandler, WorldSettings settings, int dimension, EnumDifficulty difficulty, Profiler profilerIn)
{
    super(new SaveHandlerMP(), new WorldInfo(settings, "MpServer"), makeWorldProvider(dimension), profilerIn, true);
    this.ambienceTicks = this.rand.nextInt(12000);
    this.viewableChunks = Sets.<ChunkPos>newHashSet();
    this.connection = netHandler;
    this.getWorldInfo().setDifficulty(difficulty);
    this.provider.registerWorld(this);
    this.setSpawnPoint(new BlockPos(8, 64, 8));
    this.chunkProvider = this.createChunkProvider();
    this.mapStorage = new SaveDataMemoryStorage();
    this.calculateInitialSkylight();
    this.calculateInitialWeather();
    Reflector.call(this, Reflector.ForgeWorld_initCapabilities, new Object[0]);
    Reflector.postForgeBusEvent(Reflector.WorldEvent_Load_Constructor, new Object[] {this});

    if (this.mc.playerController != null && this.mc.playerController.getClass() == PlayerControllerMP.class)
    {
        this.mc.playerController = new PlayerControllerOF(this.mc, netHandler);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:WorldClient.java

示例3: WorldServer

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
public WorldServer(MinecraftServer server, ISaveHandler saveHandlerIn, WorldInfo info, int dimensionId, Profiler profilerIn)
{
    super(saveHandlerIn, info, net.minecraftforge.common.DimensionManager.createProviderFor(dimensionId), profilerIn, false);
    this.mcServer = server;
    this.theEntityTracker = new EntityTracker(this);
    this.thePlayerManager = new PlayerChunkMap(this);
    // Guarantee the dimension ID was not reset by the provider
    int providerDim = this.provider.getDimension();
    this.provider.registerWorld(this);
    this.provider.setDimension(providerDim);
    this.chunkProvider = this.createChunkProvider();
    perWorldStorage = new MapStorage(new net.minecraftforge.common.WorldSpecificSaveHandler((WorldServer)this, saveHandlerIn));
    this.worldTeleporter = new Teleporter(this);
    this.calculateInitialSkylight();
    this.calculateInitialWeather();
    this.getWorldBorder().setSize(server.getMaxWorldSize());
    net.minecraftforge.common.DimensionManager.setWorld(dimensionId, this, mcServer);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:19,代码来源:WorldServer.java

示例4: World

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
protected World(ISaveHandler saveHandlerIn, WorldInfo info, WorldProvider providerIn, Profiler profilerIn, boolean client)
{
    this.eventListeners = Lists.newArrayList(new IWorldEventListener[] {this.pathListener});
    this.theCalendar = Calendar.getInstance();
    this.worldScoreboard = new Scoreboard();
    this.spawnHostileMobs = true;
    this.spawnPeacefulMobs = true;
    this.lightUpdateBlockList = new int[32768];
    this.saveHandler = saveHandlerIn;
    this.theProfiler = profilerIn;
    this.worldInfo = info;
    this.provider = providerIn;
    this.isRemote = client;
    this.worldBorder = providerIn.createWorldBorder();
    perWorldStorage = new MapStorage((ISaveHandler)null);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:17,代码来源:World.java

示例5: WorldClient

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
public WorldClient(NetHandlerPlayClient netHandler, WorldSettings settings, int dimension, EnumDifficulty difficulty, Profiler profilerIn)
{
    super(new SaveHandlerMP(), new WorldInfo(settings, "MpServer"), net.minecraftforge.common.DimensionManager.createProviderFor(dimension), profilerIn, true);
    this.ambienceTicks = this.rand.nextInt(12000);
    this.viewableChunks = Sets.<ChunkPos>newHashSet();
    this.connection = netHandler;
    this.getWorldInfo().setDifficulty(difficulty);
    this.provider.registerWorld(this);
    this.setSpawnPoint(new BlockPos(8, 64, 8)); //Forge: Moved below registerWorld to prevent NPE in our redirect.
    this.chunkProvider = this.createChunkProvider();
    this.mapStorage = new SaveDataMemoryStorage();
    this.calculateInitialSkylight();
    this.calculateInitialWeather();
    this.initCapabilities();
    net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(this));
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:17,代码来源:WorldClient.java

示例6: dispatch

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
public static void dispatch() {
    Tessellator tessellator = Tessellator.getInstance();

    Profiler profiler = Minecraft.getMinecraft().mcProfiler;

    //GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
    //GlStateManager.depthMask(false);
    //GlStateManager.enableBlend();
    //GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
    //GlStateManager.alphaFunc(GL11.GL_GREATER, 0.003921569F);
    //GlStateManager.enableLighting();

    //profiler.startSection("leaf");
    //FXLeafParticle.dispatchQueuedRenders(tessellator);
    //profiler.endSection();

    //GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
    //GlStateManager.disableBlend();
    //GlStateManager.depthMask(true);
    //GL11.glPopAttrib();
}
 
开发者ID:DaedalusGame,项目名称:BetterWithAddons,代码行数:22,代码来源:ParticleRenderDispatcher.java

示例7: dispatch

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
public static void dispatch()
    {
        Tessellator tessellator = Tessellator.getInstance();

        Profiler profiler = Minecraft.getMinecraft().mcProfiler;

        GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
        GlStateManager.depthMask(false);
        GlStateManager.enableBlend();
//        GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
        GlStateManager.alphaFunc(GL11.GL_GREATER, 0.003921569F);
//        GlStateManager.disableLighting();

        profiler.startSection("path");
        PathFX.dispatchQueuedRenders(tessellator);
        profiler.endSection();

        GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1f);
        GlStateManager.disableBlend();
        GlStateManager.depthMask(true);
        GL11.glPopAttrib();
    }
 
开发者ID:M4thG33k,项目名称:TombManyGraves,代码行数:23,代码来源:ParticleRenderDispatcher.java

示例8: World

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public World(ISaveHandler p_i45368_1_, String p_i45368_2_, WorldProvider p_i45368_3_, WorldSettings p_i45368_4_, Profiler p_i45368_5_)
{
    this.ambientTickCountdown = this.rand.nextInt(12000);
    this.spawnHostileMobs = true;
    this.spawnPeacefulMobs = true;
    this.collidingBoundingBoxes = new ArrayList();
    this.lightUpdateBlockList = new int[32768];
    this.saveHandler = p_i45368_1_;
    this.theProfiler = p_i45368_5_;
    this.worldInfo = new WorldInfo(p_i45368_4_, p_i45368_2_);
    this.provider = p_i45368_3_;
    perWorldStorage = new MapStorage((ISaveHandler)null);
    // Cauldron start
    this.world = null;
    this.timings = null;
    this.spigotConfig = null;
    this.activeChunkSet_CB = null;
    this.chunkTickRadius = 0;
    // Cauldron end
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:22,代码来源:World.java

示例9: World

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public World(ISaveHandler p_i1953_1_, String p_i1953_2_, WorldProvider p_i1953_3_, WorldSettings p_i1953_4_, Profiler p_i1953_5_, ILogAgent p_i1953_6_) {
   this.field_72990_M = this.field_73012_v.nextInt(12000);
   this.field_72994_J = new int['\u8000'];
   this.field_73019_z = p_i1953_1_;
   this.field_72984_F = p_i1953_5_;
   this.field_72986_A = new WorldInfo(p_i1953_4_, p_i1953_2_);
   this.field_73011_w = p_i1953_3_;
   this.field_72988_C = new MapStorage(p_i1953_1_);
   this.field_98181_L = p_i1953_6_;
   VillageCollection var7 = (VillageCollection)this.field_72988_C.func_75742_a(VillageCollection.class, "villages");
   if(var7 == null) {
      this.field_72982_D = new VillageCollection(this);
      this.field_72988_C.func_75745_a("villages", this.field_72982_D);
   } else {
      this.field_72982_D = var7;
      this.field_72982_D.func_82566_a(this);
   }

   p_i1953_3_.func_76558_a(this);
   this.field_73020_y = this.func_72970_h();
   this.func_72966_v();
   this.func_72947_a();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:World.java

示例10: doNetworkTick

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
@Override
public void doNetworkTick(@Nonnull Profiler theProfiler) {
  for (INetworkedInventory ni : inventories) {
    if (requiresSort) {
      theProfiler.startSection("updateInsertOrder");
      ni.updateInsertOrder();
      theProfiler.endSection();
    }
    theProfiler.startSection("NetworkedInventoryTick");
    ni.onTick();
    theProfiler.endSection();
  }
  if (requiresSort) {
    requiresSort = false;
    changeCount++;
  }
  // if(database != null) {
  // theProfiler.startSection("DatabaseTick");
  // database.tick();
  // theProfiler.endSection();
  // }
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:23,代码来源:ItemConduitNetwork.java

示例11: tickEnd

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
public void tickEnd(TickEvent.ServerTickEvent event) {
  final Profiler theProfiler = FMLCommonHandler.instance().getMinecraftServerInstance().profiler;
  theProfiler.startSection("root"); // this event is fired outside the profilers normal coverage...
  theProfiler.startSection("EnderIO_All_Conduit_Networks_Tick");
  for (TickListener h : listeners) {
    theProfiler.startSection(h.getClass().getName().replaceFirst(".*\\.", ""));
    h.tickEnd(event, theProfiler);
    theProfiler.endSection();
  }
  for(AbstractConduitNetwork<?,?> cn : networks.keySet()) {
    theProfiler.startSection(cn.getClass().getName().replaceFirst(".*\\.", ""));
    cn.doNetworkTick(theProfiler);
    theProfiler.endSection();
  }
  theProfiler.endSection();
  theProfiler.endSection();
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:18,代码来源:ConduitNetworkTickHandler.java

示例12: onServerTick

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
@SubscribeEvent
public static void onServerTick(@Nonnull TickEvent.ServerTickEvent event) {
  final Profiler profiler = FMLCommonHandler.instance().getMinecraftServerInstance().profiler;
  profiler.startSection("root"); // this event is fired outside the profiler's normal coverage...
  profiler.startSection("ServerTickEvent");
  for (Entry<ITickListener, String> entry : listeners.entrySet()) {
    profiler.startSection(NullHelper.first(entry.getValue(), "(unnamed)"));
    if (event.phase == Phase.START) {
      entry.getKey().tickStart(event, profiler);
    } else {
      entry.getKey().tickEnd(event, profiler);
    }
    profiler.endSection();
  }
  profiler.endSection(); // ServerTickEvent
  profiler.endSection(); // root
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:18,代码来源:ServerTickHandler.java

示例13: WorldServer

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
public WorldServer(MinecraftServer server, ISaveHandler saveHandlerIn, WorldInfo info, int dimensionId, Profiler profilerIn)
{
    super(saveHandlerIn, info, WorldProvider.getProviderForDimension(dimensionId), profilerIn, false);
    this.mcServer = server;
    this.theEntityTracker = new EntityTracker(this);
    this.thePlayerManager = new PlayerManager(this);
    this.provider.registerWorld(this);
    this.chunkProvider = this.createChunkProvider();
    this.worldTeleporter = new Teleporter(this);
    this.calculateInitialSkylight();
    this.calculateInitialWeather();
    this.getWorldBorder().setSize(server.getMaxWorldSize());
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:14,代码来源:WorldServer.java

示例14: World

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
protected World(ISaveHandler saveHandlerIn, WorldInfo info, WorldProvider providerIn, Profiler profilerIn, boolean client)
{
    this.ambientTickCountdown = this.rand.nextInt(12000);
    this.spawnHostileMobs = true;
    this.spawnPeacefulMobs = true;
    this.lightUpdateBlockList = new int[32768];
    this.saveHandler = saveHandlerIn;
    this.theProfiler = profilerIn;
    this.worldInfo = info;
    this.provider = providerIn;
    this.isRemote = client;
    this.worldBorder = providerIn.getWorldBorder();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:14,代码来源:World.java

示例15: func_147202_a

import net.minecraft.profiler.Profiler; //导入依赖的package包/类
private void func_147202_a(int p_147202_1_, String p_147202_2_, StringBuilder p_147202_3_)
{
    List<Profiler.Result> list = MinecraftServer.getServer().theProfiler.getProfilingData(p_147202_2_);

    if (list != null && list.size() >= 3)
    {
        for (int i = 1; i < list.size(); ++i)
        {
            Profiler.Result profiler$result = (Profiler.Result)list.get(i);
            p_147202_3_.append(String.format("[%02d] ", new Object[] {Integer.valueOf(p_147202_1_)}));

            for (int j = 0; j < p_147202_1_; ++j)
            {
                p_147202_3_.append(" ");
            }

            p_147202_3_.append(profiler$result.field_76331_c).append(" - ").append(String.format("%.2f", new Object[] {Double.valueOf(profiler$result.field_76332_a)})).append("%/").append(String.format("%.2f", new Object[] {Double.valueOf(profiler$result.field_76330_b)})).append("%\n");

            if (!profiler$result.field_76331_c.equals("unspecified"))
            {
                try
                {
                    this.func_147202_a(p_147202_1_ + 1, p_147202_2_ + "." + profiler$result.field_76331_c, p_147202_3_);
                }
                catch (Exception exception)
                {
                    p_147202_3_.append("[[ EXCEPTION ").append((Object)exception).append(" ]]");
                }
            }
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:33,代码来源:CommandDebug.java


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