Program: 34696
Project: 34696
Buggy source:
@Override public void onUpdate(ItemStack is,World world,Entity entity,int slot,boolean isHeld){
  if (world.isRemote) {
    if (is.hasTagCompound() && entity instanceof EntityPlayer) {
      NBTTagCompound nbt=ItemUtil.getNBT(is,false);
      currentBiome=nbt.getByte("String_Node_Str");
      if (lastSavedX == Integer.MAX_VALUE && lastSavedZ == Integer.MAX_VALUE) {
        for (int x=entity.chunkCoordX - 96, z; x <= entity.chunkCoordX + 96; x++) {
          for (z=entity.chunkCoordZ - 96; z <= entity.chunkCoordZ + 96; z++) {
            byte biome=IslandSpawnChecker.getIslandBiomeAt(x,z,nbt.getLong("String_Node_Str"),nbt.getInteger("String_Node_Str"));
            if (biome != -1)             locations.get(biome).add(new BlockPosM(x * 16 + (IslandSpawnChecker.featureSize >> 1),0,z * 16 + (IslandSpawnChecker.featureSize >> 1)));
          }
        }
        lastSavedX=entity.chunkCoordX;
        lastSavedZ=entity.chunkCoordZ;
      }
 else       if (MathUtil.square(entity.chunkCoordX - lastSavedX) + MathUtil.square(entity.chunkCoordZ - lastSavedZ) > 250F) {
        lastSavedX=lastSavedZ=Integer.MAX_VALUE;
      }
    }
  }
 else {
    NBTTagCompound nbt=ItemUtil.getNBT(is,true);
    if (entity instanceof EntityPlayerMP) {
      EntityPlayerMP player=(EntityPlayerMP)entity;
      if (!player.func_147099_x().hasAchievementUnlocked(AchievementManager.BIOME_COMPASS))       player.addStat(AchievementManager.BIOME_COMPASS,1);
    }
    if (is.stackTagCompound == null)     is.stackTagCompound=new NBTTagCompound();
    if (!nbt.hasKey("String_Node_Str")) {
      nbt.setLong("String_Node_Str",world.getSeed());
      nbt.setShort("String_Node_Str",(short)(1 + WorldDataHandler.<DragonSavefile>get(DragonSavefile.class).getDragonDeathAmount()));
    }
 else     if (isHeld && entity.dimension == 1 && entity.ticksExisted % 100 == 0) {
      int seed2=1 + WorldDataHandler.<DragonSavefile>get(DragonSavefile.class).getDragonDeathAmount();
      if (seed2 != nbt.getShort("String_Node_Str"))       nbt.setShort("String_Node_Str",(short)seed2);
    }
  }
}

Fixed version (ground truth):
@Override public void onUpdate(ItemStack is,World world,Entity entity,int slot,boolean isHeld){
  if (world.isRemote) {
    if (is.hasTagCompound() && entity instanceof EntityPlayer) {
      NBTTagCompound nbt=ItemUtil.getNBT(is,false);
      currentBiome=nbt.getByte("String_Node_Str");
      if (lastSavedX == Integer.MAX_VALUE && lastSavedZ == Integer.MAX_VALUE) {
        for (int x=entity.chunkCoordX - 96, z; x <= entity.chunkCoordX + 96; x++) {
          for (z=entity.chunkCoordZ - 96; z <= entity.chunkCoordZ + 96; z++) {
            byte biome=IslandSpawnChecker.getIslandBiomeAt(x,z,nbt.getLong("String_Node_Str"),nbt.getInteger("String_Node_Str"));
            if (biome != -1)             locations.get(biome).add(new BlockPosM(x * 16 + (IslandSpawnChecker.featureSize >> 1),0,z * 16 + (IslandSpawnChecker.featureSize >> 1)));
          }
        }
        lastSavedX=entity.chunkCoordX;
        lastSavedZ=entity.chunkCoordZ;
      }
 else       if (MathUtil.square(entity.chunkCoordX - lastSavedX) + MathUtil.square(entity.chunkCoordZ - lastSavedZ) > 250F) {
        lastSavedX=lastSavedZ=Integer.MAX_VALUE;
      }
    }
  }
 else {
    NBTTagCompound nbt=ItemUtil.getNBT(is,true);
    if (entity instanceof EntityPlayerMP) {
      EntityPlayerMP player=(EntityPlayerMP)entity;
      if (!player.getStatFile().hasAchievementUnlocked(AchievementManager.BIOME_COMPASS))       player.addStat(AchievementManager.BIOME_COMPASS,1);
    }
    if (!nbt.hasKey("String_Node_Str")) {
      nbt.setLong("String_Node_Str",world.getSeed());
      nbt.setShort("String_Node_Str",(short)(1 + WorldDataHandler.<DragonSavefile>get(DragonSavefile.class).getDragonDeathAmount()));
    }
 else     if (isHeld && entity.dimension == 1 && entity.ticksExisted % 100 == 0) {
      int seed2=1 + WorldDataHandler.<DragonSavefile>get(DragonSavefile.class).getDragonDeathAmount();
      if (seed2 != nbt.getShort("String_Node_Str"))       nbt.setShort("String_Node_Str",(short)seed2);
    }
  }
}