private void fightInstability(World world, int x, int y, int z) {
   if (ReikaMystcraftHelper.loadedCorrectly) {
     if (ReikaMystcraftHelper.getBonusInstabilityForAge(world) > 0) {
       ReikaMystcraftHelper.addBonusInstabilityForAge(world, -1);
       // ReikaJavaLibrary.pConsole("bon: "+ReikaMystcraftHelper.getBonusInstabilityForAge(world));
     } else if (ReikaMystcraftHelper.getBaseInstabilityForAge(world) > 0) {
       ReikaMystcraftHelper.addBaseInstabilityForAge(world, (short) -1);
       // ReikaJavaLibrary.pConsole("base: "+ReikaMystcraftHelper.getBaseInstabilityForAge(world));
     } else {
       ReikaMystcraftHelper.addStabilityForAge(world, 1);
       // ReikaJavaLibrary.pConsole("sta: "+ReikaMystcraftHelper.getStabilityForAge(world));
     }
   }
 }
  @Override
  protected void onRandomUpdate(World world, int x, int y, int z, Random r) {
    /*
    if (r.nextInt(20) == 0)
    	this.dropDye(world, x, y, z, 0);

    if (!world.isRemote && r.nextInt(400) == 0 && DyeOptions.RAINBOWSPREAD.getState()) {
    	int rx = ReikaRandomHelper.getRandomPlusMinus(x, 32);
    	int rz = ReikaRandomHelper.getRandomPlusMinus(z, 32);
    	ReikaWorldHelper.setBiomeForXZ(world, rx, rz, DyeTrees.forest);
    	ReikaJavaLibrary.pConsole(rx+", "+rz);
    	for (int i = 0; i < 256; i++) {
    		ReikaWorldHelper.temperatureEnvironment(world, rx, i, rz, ReikaWorldHelper.getBiomeTemp(DyeTrees.forest));
    		world.markBlockForRenderUpdate(rx, i, rz);
    		world.markBlockForUpdate(rx, i, rz);
    	}
    }*/

    if (!world.isRemote) {
      if (ModList.THAUMCRAFT.isLoaded()) {
        if (rand.nextInt(25) == 0) this.fightTaint(world, x, y, z);
        if (rand.nextInt(20) == 0) this.fightEerie(world, x, y, z);
        if (rand.nextInt(10) == 0) this.convertPureNodeMagic(world, x, y, z);
      }
      if (ModList.MYSTCRAFT.isLoaded() && ReikaMystcraftHelper.isMystAge(world)) {
        if (rand.nextInt(20) == 0) this.fightInstability(world, x, y, z);
        if (rand.nextInt(10) == 0) this.fightDecay(world, x, y, z);
      }
      if (DyeOptions.RAINBOWSPREAD.getState() && rand.nextInt(50) == 0)
        this.convertToRainbowForest(world, x, y, z);
    }
  }