Package net.minecraft.profiler

Examples of net.minecraft.profiler.Profiler.startSection()


    if (--collisionSkipCounter >= 0) {
      return;
    }

    theProfiler.startSection("ai");

    if (this.isMovementBlocked()) {
      this.isJumping = false;
      this.moveStrafing = 0.0F;
      this.moveForward = 0.0F;
View Full Code Here


      this.moveStrafing = 0.0F;
      this.moveForward = 0.0F;
      this.randomYawVelocity = 0.0F;
    } else if (this.isClientWorld()) {
      if (this.isAIEnabled()) {
        theProfiler.startSection("newAi");
        this.updateAITasks();
        theProfiler.endSection();
      } else {
        theProfiler.startSection("oldAi");
        this.updateEntityActionState();
View Full Code Here

      if (this.isAIEnabled()) {
        theProfiler.startSection("newAi");
        this.updateAITasks();
        theProfiler.endSection();
      } else {
        theProfiler.startSection("oldAi");
        this.updateEntityActionState();
        theProfiler.endSection();
        this.rotationYawHead = this.rotationYaw;
      }
    }
View Full Code Here

        this.rotationYawHead = this.rotationYaw;
      }
    }

    theProfiler.endSection();
    theProfiler.startSection("jump");

    if (this.isJumping) {
      if (!this.isInWater() && !this.handleLavaMovement()) {
        if (this.onGround && this.jumpTicks == 0) {
          this.jump();
View Full Code Here

    } else {
      this.jumpTicks = 0;
    }

    theProfiler.endSection();
    theProfiler.startSection("travel");
    this.moveStrafing *= 0.98F;
    this.moveForward *= 0.98F;
    this.randomYawVelocity *= 0.9F;
    this.moveEntityWithHeading(this.moveStrafing, this.moveForward);
    theProfiler.endSection();
View Full Code Here

    this.moveStrafing *= 0.98F;
    this.moveForward *= 0.98F;
    this.randomYawVelocity *= 0.9F;
    this.moveEntityWithHeading(this.moveStrafing, this.moveForward);
    theProfiler.endSection();
    theProfiler.startSection("push");

    if (!worldObj.isRemote) {
      this.collideWithNearbyEntities();
    }

View Full Code Here

  public static int spawnMobsQuickly(WorldServer worldServer, boolean peaceful, boolean hostile, boolean animal) {
    if (worldServer.tickCount % clumping != 0) {
      return 0;
    }
    final Profiler profiler = worldServer.theProfiler;
    profiler.startSection("creatureTypes");
    float loadFactor = 1 - (float) (MinecraftServer.getTickTime() / MinecraftServer.getTargetTickTime());
    if (loadFactor < 0.2f || loadFactor > 1f) {
      loadFactor = 0.2f;
    }
    float entityMultiplier = worldServer.playerEntities.size() * TickThreading.instance.mobSpawningMultiplier * loadFactor;
 
View Full Code Here

    if (requiredSpawns.isEmpty()) {
      return 0;
    }

    profiler.startSection("spawnableChunks");
    int attemptedSpawnedMobs = 0;
    LongSet closeChunks = new LongSet();
    Collection<EntityPlayer> entityPlayers = worldServer.playerEntities;
    LongList spawnableChunks = new LongList(entityPlayers.size() * maxChunksPerPlayer);
    for (EntityPlayer entityPlayer : entityPlayers) {
View Full Code Here

  @Override
  public void onLivingUpdate() {
    final World worldObj = this.worldObj;
    final Profiler theProfiler = worldObj.theProfiler;
    theProfiler.startSection("looting");

    if (!worldObj.isRemote && this.canPickUpLoot() && !this.dead && !this.isDead && this.getHealth() > 0 && worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing")) {
      List<EntityItem> entityItemList = worldObj.getEntitiesWithinAABB(EntityItem.class, this.boundingBox.expand(1.0D, 0.0D, 1.0D));

      for (EntityItem entityItem : entityItemList) {
View Full Code Here

      long var2 = worldInfo.getWorldTime();
      worldInfo.setWorldTime(var2 + 24000L - (var2 % 24000L));
      this.wakeAllPlayers();
    }

    profiler.startSection("mobSpawner");

    if (hasPlayers && (loadedEntityList.size() / TickThreading.instance.maxEntitiesPerPlayer) < playerEntities.size() && this.getGameRules().getGameRuleBooleanValue("doMobSpawning")) {
      if (TickThreading.instance.shouldFastSpawn(this)) {
        SpawnerAnimals.spawnMobsQuickly(this, spawnHostileMobs && (ticksPerMonsterSpawns != 0 && tickCount % ticksPerMonsterSpawns == 0L), spawnPeacefulMobs && (ticksPerAnimalSpawns != 0 && tickCount % ticksPerAnimalSpawns == 0L), worldInfo.getWorldTotalTime() % 400L == 0L);
      } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.