Beispiel #1
0
  private void func_6255_d(String s) {
    loadingScreen.printText(s);
    loadingScreen.displayLoadingString("Building terrain");
    char c = '\200';
    int i = 0;
    int j = (c * 2) / 16 + 1;
    j *= j;
    net.minecraft.src.IChunkProvider ichunkprovider = theWorld.getIChunkProvider();
    ChunkCoordinates chunkcoordinates = theWorld.getSpawnPoint();
    if (thePlayer != null) {
      chunkcoordinates.x = (int) thePlayer.posX;
      chunkcoordinates.z = (int) thePlayer.posZ;
    }
    if (ichunkprovider instanceof ChunkProviderLoadOrGenerate) {
      ChunkProviderLoadOrGenerate chunkproviderloadorgenerate =
          (ChunkProviderLoadOrGenerate) ichunkprovider;
      chunkproviderloadorgenerate.setCurrentChunkOver(
          chunkcoordinates.x >> 4, chunkcoordinates.z >> 4);
    }
    for (int k = -c; k <= c; k += 16) {
      for (int l = -c; l <= c; l += 16) {
        loadingScreen.setLoadingProgress((i++ * 100) / j);
        theWorld.getBlockId(chunkcoordinates.x + k, 64, chunkcoordinates.z + l);
        while (theWorld.updatingLighting()) ;
      }
    }

    loadingScreen.displayLoadingString("Simulating world for a bit");
    j = 2000;
    theWorld.func_656_j();
  }
 private void addMountedMovementStat(double d, double d1, double d2) {
   if (ridingEntity != null) {
     int i = Math.round(MathHelper.sqrt_double(d * d + d1 * d1 + d2 * d2) * 100F);
     if (i > 0) {
       if (ridingEntity instanceof EntityMinecart) {
         addStat(StatList.distanceByMinecartStat, i);
         if (startMinecartRidingCoordinate == null) {
           startMinecartRidingCoordinate =
               new ChunkCoordinates(
                   MathHelper.floor_double(posX),
                   MathHelper.floor_double(posY),
                   MathHelper.floor_double(posZ));
         } else if (startMinecartRidingCoordinate.getSqDistanceTo(
                 MathHelper.floor_double(posX),
                 MathHelper.floor_double(posY),
                 MathHelper.floor_double(posZ))
             >= 1000D) {
           addStat(AchievementList.onARail, 1);
         }
       } else if (ridingEntity instanceof EntityBoat) {
         addStat(StatList.distanceByBoatStat, i);
       } else if (ridingEntity instanceof EntityPig) {
         addStat(StatList.distanceByPigStat, i);
       }
     }
   }
 }