net.minecraft.profiler.Profiler.endStartSection()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中net.minecraft.profiler.Profiler.endStartSection()方法的一些代码示例,展示了Profiler.endStartSection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Profiler.endStartSection()方法的具体详情如下:
包路径:net.minecraft.profiler.Profiler
类名称:Profiler
方法名:endStartSection

Profiler.endStartSection介绍

暂无

代码示例

代码示例来源:origin: SleepyTrousers/EnderIO

public static void next(@Nullable Profiler profiler, @Nonnull String section) {
 if (profiler != null) {
  profiler.endStartSection(section);
 }
}

代码示例来源:origin: SleepyTrousers/EnderIO

public static void next(@Nullable Profiler profiler, @Nonnull String section, @Nullable Object param) {
 if (profiler != null) {
  profiler.endStartSection(makeSection(section, param));
 }
}

代码示例来源:origin: Vazkii/Botania

public static void dispatch() {
  Tessellator tessellator = Tessellator.getInstance();
  Profiler profiler = Minecraft.getMinecraft().profiler;
  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("sparkle");
  FXSparkle.dispatchQueuedRenders(tessellator);
  profiler.endStartSection("wisp");
  FXWisp.dispatchQueuedRenders(tessellator);
  profiler.endSection();
  GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
  GlStateManager.disableBlend();
  GlStateManager.depthMask(true);
  GL11.glPopAttrib();
}

代码示例来源:origin: DimensionalDevelopment/VanillaFix

/** @reason Part 2 of GUI logic fix. */
@Redirect(method = "runTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/texture/TextureManager;tick()V", ordinal = 0))
private void tickTextureManagerWithCorrectProfiler(TextureManager textureManager) {
  profiler.endStartSection("textures");
  textureManager.tick();
  profiler.endStartSection("gui");
}

代码示例来源:origin: DimensionalDevelopment/VanillaFix

/** @reason Fix GUI logic being included as part of "root.tick.textures" (https://bugs.mojang.com/browse/MC-129556) */
@Redirect(method = "runTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V", ordinal = 0))
private void endStartGUISection(Profiler profiler, String name) {
  profiler.endStartSection("gui");
}

代码示例来源:origin: Vazkii/Botania

profiler.startSection("redString");
RedStringRenderer.renderAll();
profiler.endStartSection("lightning");

代码示例来源:origin: P3pp3rF1y/AncientWarfare2

@Override
protected void updateWorksite() {
  world.profiler.startSection("Count Resources");
  if (shouldCountResources) {
    countResources();
    this.shouldCountResources = false;
  }
  world.profiler.endStartSection("Animal Rescan");
  if (workerRescanDelay-- <= 0) {
    rescan();
    workerRescanDelay = 200;
  }
  world.profiler.endStartSection("ItemPickup");
  if (world.getWorldTime() % 128 == 0) {
    pickupDrops();
  }
  world.profiler.endSection();
}

代码示例来源:origin: P3pp3rF1y/AncientWarfare2

private void updateBlockWorksite() {
  world.profiler.startSection("Items Pickup");
  if (world.getWorldTime() % 20 == 0) {
    pickupItems();
  }
  world.profiler.endStartSection("Count Resources");
  if (shouldCountResources) {
    countResources();
    shouldCountResources = false;
  }
  world.profiler.endSection();
}

代码示例来源:origin: Lunatrius/Schematica

this.profiler.endStartSection("renderlistcamera");
this.renderContainer.initialize(posX, posY, posZ);
this.profiler.endStartSection("culling");
final BlockPos posEye = new BlockPos(posX, posY + viewEntity.getEyeHeight(), posZ);
final RenderChunk renderChunkCurrent = this.viewFrustum.getRenderChunk(posEye);
this.lastViewEntityYaw = viewEntity.rotationYaw;
this.profiler.endStartSection("update");
if (this.displayListEntitiesDirty) {
  this.displayListEntitiesDirty = false;
this.profiler.endStartSection("rebuild");
final Set<RenderChunk> set = this.chunksToUpdate;
final Set<RenderOverlay> set1 = this.overlaysToUpdate;

代码示例来源:origin: Vazkii/Botania

profiler.endStartSection("itemsRemaining");
ItemsRemainingRenderHandler.render(event.getResolution(), event.getPartialTicks());
profiler.endSection();

代码示例来源:origin: Lunatrius/Schematica

this.profiler.endStartSection("render_" + layer);
renderBlockLayer(layer);
this.profiler.endSection();

代码示例来源:origin: P3pp3rF1y/AncientWarfare2

world.profiler.endStartSection("Process Work");
IWorksiteAction action = nextAction.get();
if (processAction(action)) {

代码示例来源:origin: Lunatrius/Schematica

private void renderWorld(final float partialTicks, final long finishTimeNano) {
  GlStateManager.enableCull();
  this.profiler.endStartSection("culling");
  final Frustum frustum = new Frustum();
  final Entity entity = this.mc.getRenderViewEntity();
  this.profiler.endStartSection("prepareterrain");
  this.mc.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
  RenderHelper.disableStandardItemLighting();
  this.profiler.endStartSection("terrain_setup");
  setupTerrain(entity, partialTicks, frustum, this.frameCount++, isInsideWorld(x, y, z));
  this.profiler.endStartSection("updatechunks");
  updateChunks(finishTimeNano / 2);
  this.profiler.endStartSection("terrain");
  GlStateManager.matrixMode(GL11.GL_MODELVIEW);
  GlStateManager.pushMatrix();
  this.profiler.endStartSection("entities");
  RenderHelper.enableStandardItemLighting();
  GlStateManager.enableBlend();
  this.profiler.endStartSection("translucent");
  GlStateManager.enableBlend();
  GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);

代码示例来源:origin: Lunatrius/Schematica

@SubscribeEvent
public void onRenderWorldLast(final RenderWorldLastEvent event) {
  final EntityPlayerSP player = this.mc.player;
  if (player != null) {
    this.profiler.startSection("schematica");
    ClientProxy.setPlayerData(player, event.getPartialTicks());
    final SchematicWorld schematic = ClientProxy.schematic;
    final boolean isRenderingSchematic = schematic != null && schematic.isRendering;
    this.profiler.startSection("schematic");
    if (isRenderingSchematic) {
      GlStateManager.pushMatrix();
      renderSchematic(schematic, event.getPartialTicks());
      GlStateManager.popMatrix();
    }
    this.profiler.endStartSection("guide");
    if (ClientProxy.isRenderingGuide || isRenderingSchematic) {
      GlStateManager.pushMatrix();
      renderOverlay(schematic, isRenderingSchematic);
      GlStateManager.popMatrix();
    }
    this.profiler.endSection();
    this.profiler.endSection();
  }
}

代码示例来源:origin: Vazkii/Psi

@SubscribeEvent
public static void onRenderWorldLast(RenderWorldLastEvent event) {
  Tessellator tessellator = Tessellator.getInstance();
  Profiler profiler = Minecraft.getMinecraft().mcProfiler;
  GL11.glPushAttrib(GL11.GL_LIGHTING);
  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("psi-particles");
  profiler.startSection("sparkle");
  FXSparkle.dispatchQueuedRenders(tessellator);
  profiler.endStartSection("wisp");
  FXWisp.dispatchQueuedRenders(tessellator);
  profiler.endSection();
  profiler.endSection();
  GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
  GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  GlStateManager.disableBlend();
  GlStateManager.depthMask(true);
  GL11.glPopAttrib();
}

代码示例来源:origin: Lunatrius/Schematica

this.mc.entityRenderer.enableLightmap();
this.profiler.endStartSection("blockentities");
RenderHelper.enableStandardItemLighting();

相关文章