public boolean loadTexture(ResourceLocation p_110579_1_, final ITextureObject p_110579_2_) {
    boolean flag = true;
    ITextureObject p_110579_2_2 = p_110579_2_;

    try {
      ((ITextureObject) p_110579_2_).loadTexture(this.theResourceManager);
    } catch (IOException ioexception) {
      logger.warn("Failed to load texture: " + p_110579_1_, ioexception);
      p_110579_2_2 = TextureUtil.missingTexture;
      this.mapTextureObjects.put(p_110579_1_, p_110579_2_2);
      flag = false;
    } catch (Throwable throwable) {
      CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Registering texture");
      CrashReportCategory crashreportcategory =
          crashreport.makeCategory("Resource location being registered");
      crashreportcategory.addCrashSection("Resource location", p_110579_1_);
      crashreportcategory.addCrashSectionCallable(
          "Texture object class",
          new Callable() {
            private static final String __OBFID = "CL_00001065";

            public String call() {
              return p_110579_2_.getClass().getName();
            }
          });
      throw new ReportedException(crashreport);
    }

    this.mapTextureObjects.put(p_110579_1_, p_110579_2_2);
    return flag;
  }
  /** checks given Chunk's Biomes against List of allowed ones */
  @Override
  public boolean areBiomesViable(int par1, int par2, int par3, List par4List) {
    IntCache.resetIntCache();
    int l = par1 - par3 >> 2;
    int i1 = par2 - par3 >> 2;
    int j1 = par1 + par3 >> 2;
    int k1 = par2 + par3 >> 2;
    int l1 = j1 - l + 1;
    int i2 = k1 - i1 + 1;
    int[] aint = this.mbGenBiomes.getInts(l, i1, l1, i2);

    try {
      for (int j2 = 0; j2 < l1 * i2; ++j2) {
        BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]);

        if (!par4List.contains(biomegenbase)) {
          return false;
        }
      }

      return true;
    } catch (Throwable throwable) {
      CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
      CrashReportCategory crashreportcategory = crashreport.makeCategory("Layer");
      crashreportcategory.addCrashSection("Layer", this.mbGenBiomes.toString());
      crashreportcategory.addCrashSection("x", Integer.valueOf(par1));
      crashreportcategory.addCrashSection("z", Integer.valueOf(par2));
      crashreportcategory.addCrashSection("radius", Integer.valueOf(par3));
      crashreportcategory.addCrashSection("allowed", par4List);
      throw new ReportedException(crashreport);
    }
  }
Ejemplo n.º 3
0
  public boolean loadTexture(ResourceLocation textureLocation, ITextureObject textureObj) {
    boolean flag = true;

    try {
      ((ITextureObject) textureObj).loadTexture(this.theResourceManager);
    } catch (IOException ioexception) {
      logger.warn((String) ("Failed to load texture: " + textureLocation), (Throwable) ioexception);
      textureObj = TextureUtil.missingTexture;
      this.mapTextureObjects.put(textureLocation, (ITextureObject) textureObj);
      flag = false;
    } catch (Throwable throwable) {
      final ITextureObject textureObjf = textureObj;
      CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Registering texture");
      CrashReportCategory crashreportcategory =
          crashreport.makeCategory("Resource location being registered");
      crashreportcategory.addCrashSection("Resource location", textureLocation);
      crashreportcategory.addCrashSectionCallable(
          "Texture object class",
          new Callable<String>() {
            public String call() throws Exception {
              return textureObjf.getClass().getName();
            }
          });
      throw new ReportedException(crashreport);
    }

    this.mapTextureObjects.put(textureLocation, (ITextureObject) textureObj);
    return flag;
  }
  /** Returns an array of biomes for the location input. */
  @Override
  public BiomeGenBase[] getBiomesForGeneration(
      BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) {
    IntCache.resetIntCache();

    if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5) {
      par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
    }

    int[] aint = this.mbGenBiomes.getInts(par2, par3, par4, par5);

    try {
      for (int i1 = 0; i1 < par4 * par5; ++i1) {
        par1ArrayOfBiomeGenBase[i1] = BiomeGenBase.getBiome(aint[i1]);
      }

      return par1ArrayOfBiomeGenBase;
    } catch (Throwable throwable) {
      CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
      CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock");
      crashreportcategory.addCrashSection(
          "biomes[] size", Integer.valueOf(par1ArrayOfBiomeGenBase.length));
      crashreportcategory.addCrashSection("x", Integer.valueOf(par2));
      crashreportcategory.addCrashSection("z", Integer.valueOf(par3));
      crashreportcategory.addCrashSection("w", Integer.valueOf(par4));
      crashreportcategory.addCrashSection("h", Integer.valueOf(par5));
      throw new ReportedException(crashreport);
    }
  }
  private void updateEffects() {
    for (int k = 0; k < fxes.length; ++k) {

      for (int j = 0; j < this.fxes[k].size(); ++j) {
        final EntityFX entityfx = this.fxes[k].get(j);

        try {
          if (entityfx != null) {
            entityfx.onUpdate();
          }
        } catch (Throwable throwable) {
          CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Ticking Particle");
          CrashReportCategory crashreportcategory =
              crashreport.makeCategory("Particle being ticked");
          crashreportcategory.addCrashSectionCallable(
              "Particle",
              new Callable() {
                private static final String __OBFID = "CL_00000916";

                public String call() {
                  return entityfx.toString();
                }
              });
          throw new ReportedException(crashreport);
        }

        if (entityfx == null || entityfx.isDead) {
          this.fxes[k].remove(j--);
        }
      }
    }
  }
Ejemplo n.º 6
0
  /** checks given Chunk's Biomes against List of allowed ones */
  public boolean areBiomesViable(int p_76940_1_, int p_76940_2_, int p_76940_3_, List p_76940_4_) {
    IntCache.resetIntCache();
    int var5 = p_76940_1_ - p_76940_3_ >> 2;
    int var6 = p_76940_2_ - p_76940_3_ >> 2;
    int var7 = p_76940_1_ + p_76940_3_ >> 2;
    int var8 = p_76940_2_ + p_76940_3_ >> 2;
    int var9 = var7 - var5 + 1;
    int var10 = var8 - var6 + 1;
    int[] var11 = this.genBiomes.getInts(var5, var6, var9, var10);

    try {
      for (int var12 = 0; var12 < var9 * var10; ++var12) {
        BiomeGenBase var16 = BiomeGenBase.getBiome(var11[var12]);

        if (!p_76940_4_.contains(var16)) {
          return false;
        }
      }

      return true;
    } catch (Throwable var15) {
      CrashReport var13 = CrashReport.makeCrashReport(var15, "Invalid Biome id");
      CrashReportCategory var14 = var13.makeCategory("Layer");
      var14.addCrashSection("Layer", this.genBiomes.toString());
      var14.addCrashSection("x", Integer.valueOf(p_76940_1_));
      var14.addCrashSection("z", Integer.valueOf(p_76940_2_));
      var14.addCrashSection("radius", Integer.valueOf(p_76940_3_));
      var14.addCrashSection("allowed", p_76940_4_);
      throw new ReportedException(var13);
    }
  }
Ejemplo n.º 7
0
  /** Returns an array of biomes for the location input. */
  public BiomeGenBase[] getBiomesForGeneration(
      BiomeGenBase[] p_76937_1_, int p_76937_2_, int p_76937_3_, int p_76937_4_, int p_76937_5_) {
    IntCache.resetIntCache();

    if (p_76937_1_ == null || p_76937_1_.length < p_76937_4_ * p_76937_5_) {
      p_76937_1_ = new BiomeGenBase[p_76937_4_ * p_76937_5_];
    }

    int[] var6 = this.genBiomes.getInts(p_76937_2_, p_76937_3_, p_76937_4_, p_76937_5_);

    try {
      for (int var7 = 0; var7 < p_76937_4_ * p_76937_5_; ++var7) {
        p_76937_1_[var7] =
            BiomeGenBase.getBiomeFromBiomeList(var6[var7], BiomeGenBase.field_180279_ad);
      }

      return p_76937_1_;
    } catch (Throwable var10) {
      CrashReport var8 = CrashReport.makeCrashReport(var10, "Invalid Biome id");
      CrashReportCategory var9 = var8.makeCategory("RawBiomeBlock");
      var9.addCrashSection("biomes[] size", Integer.valueOf(p_76937_1_.length));
      var9.addCrashSection("x", Integer.valueOf(p_76937_2_));
      var9.addCrashSection("z", Integer.valueOf(p_76937_3_));
      var9.addCrashSection("w", Integer.valueOf(p_76937_4_));
      var9.addCrashSection("h", Integer.valueOf(p_76937_5_));
      throw new ReportedException(var8);
    }
  }
Ejemplo n.º 8
0
  /**
   * Renders the specified entity with the passed in position, yaw, and partialTickTime. Args:
   * entity, x, y, z, yaw, partialTickTime
   */
  public void renderEntityWithPosYaw(
      Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
    Render render = null;

    try {
      render = this.getEntityRenderObject(par1Entity);

      if (render != null && this.renderEngine != null) {
        if (field_85095_o && !par1Entity.isInvisible()) {
          try {
            this.func_85094_b(par1Entity, par2, par4, par6, par8, par9);
          } catch (Throwable throwable) {
            throw new ReportedException(
                CrashReport.makeCrashReport(throwable, "Rendering entity hitbox in world"));
          }
        }

        try {
          render.doRender(par1Entity, par2, par4, par6, par8, par9);
        } catch (Throwable throwable1) {
          throw new ReportedException(
              CrashReport.makeCrashReport(throwable1, "Rendering entity in world"));
        }

        try {
          render.doRenderShadowAndFire(par1Entity, par2, par4, par6, par8, par9);
        } catch (Throwable throwable2) {
          throw new ReportedException(
              CrashReport.makeCrashReport(throwable2, "Post-rendering entity in world"));
        }
      }
    } catch (Throwable throwable3) {
      CrashReport crashreport =
          CrashReport.makeCrashReport(throwable3, "Rendering entity in world");
      CrashReportCategory crashreportcategory = crashreport.makeCategory("Entity being rendered");
      par1Entity.func_85029_a(crashreportcategory);
      CrashReportCategory crashreportcategory1 = crashreport.makeCategory("Renderer details");
      crashreportcategory1.addCrashSection("Assigned renderer", render);
      crashreportcategory1.addCrashSection(
          "Location", CrashReportCategory.func_85074_a(par2, par4, par6));
      crashreportcategory1.addCrashSection("Rotation", Float.valueOf(par8));
      crashreportcategory1.addCrashSection("Delta", Float.valueOf(par9));
      throw new ReportedException(crashreport);
    }
  }
Ejemplo n.º 9
0
 public void run() {
   try {
     while (true) {
       this.func_178474_a(this.field_178477_b.func_178511_d());
     }
   } catch (InterruptedException var3) {
     LOGGER.debug("Stopping due to interrupt");
   } catch (Throwable var4) {
     CrashReport var2 = CrashReport.makeCrashReport(var4, "Batching chunks");
     Minecraft.getMinecraft()
         .crashed(Minecraft.getMinecraft().addGraphicsAndWorldToCrashReport(var2));
   }
 }
  public void renderParticles(Entity entity, float f) {
    float f1 = ActiveRenderInfo.rotationX;
    float f2 = ActiveRenderInfo.rotationZ;
    float f3 = ActiveRenderInfo.rotationYZ;
    float f4 = ActiveRenderInfo.rotationXY;
    float f5 = ActiveRenderInfo.rotationXZ;
    EntityFX.interpPosX = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double) f;
    EntityFX.interpPosY = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double) f;
    EntityFX.interpPosZ = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double) f;

    for (int k = 0; k < fxes.length; ++k) {
      if (!this.fxes[k].isEmpty()) {
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glDepthMask(false);
        GL11.glEnable(GL11.GL_BLEND);
        switch (k) {
          case 0:
            GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
            renderer.bindTexture(additiveTextureSheet);
            break;
        }

        GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569F);
        Tessellator tessellator = Tessellator.instance;
        tessellator.startDrawingQuads();

        for (int j = 0; j < this.fxes[k].size(); ++j) {
          final EntityFX entityfx = this.fxes[k].get(j);
          if (entityfx == null) continue;
          tessellator.setBrightness(entityfx.getBrightnessForRender(f));

          try {
            entityfx.renderParticle(tessellator, f, f1, f5, f2, f3, f4);
          } catch (Throwable throwable) {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Rendering Particle");
            CrashReportCategory crashreportcategory =
                crashreport.makeCategory("Particle being rendered");
            crashreportcategory.addCrashSectionCallable("Particle", entityfx::toString);
            throw new ReportedException(crashreport);
          }
        }

        tessellator.draw();
        GL11.glDisable(GL11.GL_BLEND);
        GL11.glDepthMask(true);
        GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
      }
    }
  }
Ejemplo n.º 11
0
  /** is threadsafe, unless it throws an exception, then */
  private WatchableObject getWatchedObject(int par1) {
    this.lock.readLock().lock();
    WatchableObject watchableobject;

    try {
      watchableobject = (WatchableObject) this.watchedObjects.get(Integer.valueOf(par1));
    } catch (Throwable throwable) {
      CrashReport crashreport =
          CrashReport.makeCrashReport(throwable, "Getting synched entity data");
      CrashReportCategory crashreportcategory = crashreport.makeCategory("Synched entity data");
      crashreportcategory.addCrashSection("Data ID", Integer.valueOf(par1));
      throw new ReportedException(crashreport);
    }

    this.lock.readLock().unlock();
    return watchableobject;
  }
Ejemplo n.º 12
0
  private <T> EntityDataManager.DataEntry<T> getEntry(DataParameter<T> key) {
    this.lock.readLock().lock();
    EntityDataManager.DataEntry<T> dataentry;

    try {
      dataentry = (EntityDataManager.DataEntry) this.entries.get(Integer.valueOf(key.getId()));
    } catch (Throwable throwable) {
      CrashReport crashreport =
          CrashReport.makeCrashReport(throwable, "Getting synched entity data");
      CrashReportCategory crashreportcategory = crashreport.makeCategory("Synched entity data");
      crashreportcategory.addCrashSection("Data ID", key);
      throw new ReportedException(crashreport);
    }

    this.lock.readLock().unlock();
    return dataentry;
  }
Ejemplo n.º 13
0
  protected static boolean func_151616_a(final int p_151616_0_, final int p_151616_1_) {
    if (p_151616_0_ == p_151616_1_) {
      return true;
    } else if (p_151616_0_ != BiomeGenBase.field_150607_aa.biomeID
        && p_151616_0_ != BiomeGenBase.field_150608_ab.biomeID) {
      try {
        return BiomeGenBase.func_150568_d(p_151616_0_) != null
                && BiomeGenBase.func_150568_d(p_151616_1_) != null
            ? BiomeGenBase.func_150568_d(p_151616_0_)
                .func_150569_a(BiomeGenBase.func_150568_d(p_151616_1_))
            : false;
      } catch (Throwable var5) {
        CrashReport var3 = CrashReport.makeCrashReport(var5, "Comparing biomes");
        CrashReportCategory var4 = var3.makeCategory("Biomes being compared");
        var4.addCrashSection("Biome A ID", Integer.valueOf(p_151616_0_));
        var4.addCrashSection("Biome B ID", Integer.valueOf(p_151616_1_));
        var4.addCrashSectionCallable(
            "Biome A",
            new Callable() {
              private static final String __OBFID = "CL_00000560";

              public String call() {
                return String.valueOf(BiomeGenBase.func_150568_d(p_151616_0_));
              }
            });
        var4.addCrashSectionCallable(
            "Biome B",
            new Callable() {
              private static final String __OBFID = "CL_00000561";

              public String call() {
                return String.valueOf(BiomeGenBase.func_150568_d(p_151616_1_));
              }
            });
        throw new ReportedException(var3);
      }
    } else {
      return p_151616_1_ == BiomeGenBase.field_150607_aa.biomeID
          || p_151616_1_ == BiomeGenBase.field_150608_ab.biomeID;
    }
  }
Ejemplo n.º 14
0
  /**
   * Returns a list of rainfall values for the specified blocks. Args: listToReuse, x, z, width,
   * length.
   */
  public float[] getRainfall(
      float[] p_76936_1_, int p_76936_2_, int p_76936_3_, int p_76936_4_, int p_76936_5_) {
    IntCache.resetIntCache();

    if (p_76936_1_ == null || p_76936_1_.length < p_76936_4_ * p_76936_5_) {
      p_76936_1_ = new float[p_76936_4_ * p_76936_5_];
    }

    int[] var6 = this.biomeIndexLayer.getInts(p_76936_2_, p_76936_3_, p_76936_4_, p_76936_5_);

    for (int var7 = 0; var7 < p_76936_4_ * p_76936_5_; ++var7) {
      try {
        float var8 =
            (float)
                    BiomeGenBase.getBiomeFromBiomeList(var6[var7], BiomeGenBase.field_180279_ad)
                        .getIntRainfall()
                / 65536.0F;

        if (var8 > 1.0F) {
          var8 = 1.0F;
        }

        p_76936_1_[var7] = var8;
      } catch (Throwable var11) {
        CrashReport var9 = CrashReport.makeCrashReport(var11, "Invalid Biome id");
        CrashReportCategory var10 = var9.makeCategory("DownfallBlock");
        var10.addCrashSection("biome id", Integer.valueOf(var7));
        var10.addCrashSection("downfalls[] size", Integer.valueOf(p_76936_1_.length));
        var10.addCrashSection("x", Integer.valueOf(p_76936_2_));
        var10.addCrashSection("z", Integer.valueOf(p_76936_3_));
        var10.addCrashSection("w", Integer.valueOf(p_76936_4_));
        var10.addCrashSection("h", Integer.valueOf(p_76936_5_));
        throw new ReportedException(var9);
      }
    }

    return p_76936_1_;
  }
Ejemplo n.º 15
0
  public void updateTimeLightAndEntities() {
    this.theProfiler.startSection("jobs");
    Queue var1 = this.futureTaskQueue;

    synchronized (this.futureTaskQueue) {
      while (!this.futureTaskQueue.isEmpty()) {
        try {
          ((FutureTask) this.futureTaskQueue.poll()).run();
        } catch (Throwable var9) {
          logger.fatal(var9);
        }
      }
    }

    this.theProfiler.endStartSection("levels");
    int var11;

    for (var11 = 0; var11 < this.worldServers.length; ++var11) {
      long var2 = System.nanoTime();

      if (var11 == 0 || this.getAllowNether()) {
        WorldServer var4 = this.worldServers[var11];
        this.theProfiler.startSection(var4.getWorldInfo().getWorldName());

        if (this.tickCounter % 20 == 0) {
          this.theProfiler.startSection("timeSync");
          this.serverConfigManager.sendPacketToAllPlayersInDimension(
              new S03PacketTimeUpdate(
                  var4.getTotalWorldTime(),
                  var4.getWorldTime(),
                  var4.getGameRules().getGameRuleBooleanValue("doDaylightCycle")),
              var4.provider.getDimensionId());
          this.theProfiler.endSection();
        }

        this.theProfiler.startSection("tick");
        CrashReport var6;

        try {
          var4.tick();
        } catch (Throwable var8) {
          var6 = CrashReport.makeCrashReport(var8, "Exception ticking world");
          var4.addWorldInfoToCrashReport(var6);
          throw new ReportedException(var6);
        }

        try {
          var4.updateEntities();
        } catch (Throwable var7) {
          var6 = CrashReport.makeCrashReport(var7, "Exception ticking world entities");
          var4.addWorldInfoToCrashReport(var6);
          throw new ReportedException(var6);
        }

        this.theProfiler.endSection();
        this.theProfiler.startSection("tracker");
        var4.getEntityTracker().updateTrackedEntities();
        this.theProfiler.endSection();
        this.theProfiler.endSection();
      }

      this.timeOfLastDimensionTick[var11][this.tickCounter % 100] = System.nanoTime() - var2;
    }

    this.theProfiler.endStartSection("connection");
    this.getNetworkSystem().networkTick();
    this.theProfiler.endStartSection("players");
    this.serverConfigManager.onTick();
    this.theProfiler.endStartSection("tickables");

    for (var11 = 0; var11 < this.playersOnline.size(); ++var11) {
      ((IUpdatePlayerListBox) this.playersOnline.get(var11)).update();
    }

    this.theProfiler.endSection();
  }
  public void onUpdateEntity() {
    try {
      super.onUpdate();

      for (int i = 0; i < this.inventory.getSizeInventory(); ++i) {
        ItemStack itemstack = this.inventory.getStackInSlot(i);

        if (itemstack != null && itemstack.getItem().isMap()) {
          Packet packet =
              ((ItemMapBase) itemstack.getItem())
                  .createMapDataPacket(itemstack, this.worldObj, this);

          if (packet != null) {
            this.playerNetServerHandler.sendPacket(packet);
          }
        }
      }

      if (this.getHealth() != this.lastHealth
          || this.lastFoodLevel != this.foodStats.getFoodLevel()
          || this.foodStats.getSaturationLevel() == 0.0F != this.wasHungry) {
        this.playerNetServerHandler.sendPacket(
            new S06PacketUpdateHealth(
                this.getHealth(),
                this.foodStats.getFoodLevel(),
                this.foodStats.getSaturationLevel()));
        this.lastHealth = this.getHealth();
        this.lastFoodLevel = this.foodStats.getFoodLevel();
        this.wasHungry = this.foodStats.getSaturationLevel() == 0.0F;
      }

      if (this.getHealth() + this.getAbsorptionAmount() != this.field_130068_bO) {
        this.field_130068_bO = this.getHealth() + this.getAbsorptionAmount();
        Collection collection =
            this.getWorldScoreboard().func_96520_a(IScoreObjectiveCriteria.health);
        Iterator iterator = collection.iterator();

        while (iterator.hasNext()) {
          ScoreObjective scoreobjective = (ScoreObjective) iterator.next();
          this.getWorldScoreboard()
              .getValueFromObjective(this.getCommandSenderName(), scoreobjective)
              .func_96651_a(Arrays.asList(new EntityPlayer[] {this}));
        }
      }

      if (this.experienceTotal != this.lastExperience) {
        this.lastExperience = this.experienceTotal;
        this.playerNetServerHandler.sendPacket(
            new S1FPacketSetExperience(
                this.experience, this.experienceTotal, this.experienceLevel));
      }

      if (this.ticksExisted % 20 * 5 == 0
          && !this.getStatFile().hasAchievementUnlocked(AchievementList.exploreAllBiomes)) {
        this.func_147098_j();
      }
    } catch (Throwable throwable) {
      CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Ticking player");
      CrashReportCategory crashreportcategory = crashreport.makeCategory("Player being ticked");
      this.addEntityCrashInfo(crashreportcategory);
      throw new ReportedException(crashreport);
    }
  }
Ejemplo n.º 17
0
  public void updateTimeLightAndEntities() {
    this.theProfiler.startSection("levels");
    int i;

    Integer[] ids = DimensionManager.getIDs(this.tickCounter % 200 == 0);
    for (int x = 0; x < ids.length; x++) {
      int id = ids[x];
      long j = System.nanoTime();

      if (id == 0 || this.getAllowNether()) {
        WorldServer worldserver = DimensionManager.getWorld(id);
        this.theProfiler.startSection(worldserver.getWorldInfo().getWorldName());
        this.theProfiler.startSection("pools");
        worldserver.getWorldVec3Pool().clear();
        this.theProfiler.endSection();

        if (this.tickCounter % 20 == 0) {
          this.theProfiler.startSection("timeSync");
          this.serverConfigManager.sendPacketToAllPlayersInDimension(
              new Packet4UpdateTime(worldserver.getTotalWorldTime(), worldserver.getWorldTime()),
              worldserver.provider.dimensionId);
          this.theProfiler.endSection();
        }

        this.theProfiler.startSection("tick");
        FMLCommonHandler.instance().onPreWorldTick(worldserver);
        CrashReport crashreport;

        try {
          worldserver.tick();
        } catch (Throwable throwable) {
          crashreport = CrashReport.makeCrashReport(throwable, "Exception ticking world");
          worldserver.addWorldInfoToCrashReport(crashreport);
          throw new ReportedException(crashreport);
        }

        try {
          worldserver.updateEntities();
        } catch (Throwable throwable1) {
          crashreport = CrashReport.makeCrashReport(throwable1, "Exception ticking world entities");
          worldserver.addWorldInfoToCrashReport(crashreport);
          throw new ReportedException(crashreport);
        }

        FMLCommonHandler.instance().onPostWorldTick(worldserver);
        this.theProfiler.endSection();
        this.theProfiler.startSection("tracker");
        worldserver.getEntityTracker().updateTrackedEntities();
        this.theProfiler.endSection();
        this.theProfiler.endSection();
      }

      worldTickTimes.get(id)[this.tickCounter % 100] = System.nanoTime() - j;
    }

    this.theProfiler.endStartSection("dim_unloading");
    DimensionManager.unloadWorlds(worldTickTimes);
    this.theProfiler.endStartSection("connection");
    this.getNetworkThread().networkTick();
    this.theProfiler.endStartSection("players");
    this.serverConfigManager.sendPlayerInfoToAllPlayers();
    this.theProfiler.endStartSection("tickables");

    for (i = 0; i < this.tickables.size(); ++i) {
      ((IUpdatePlayerListBox) this.tickables.get(i)).update();
    }

    this.theProfiler.endSection();
  }