--- a/net/minecraft/world/level/block/ChangeOverTimeBlock.java
+++ b/net/minecraft/world/level/block/ChangeOverTimeBlock.java
@@ -1,5 +1,6 @@
 package net.minecraft.world.level.block;
 
+import java.util.Iterator;
 import java.util.Optional;
 import net.minecraft.core.BlockPos;
 import net.minecraft.server.level.ServerLevel;
@@ -7,6 +8,7 @@
 import net.minecraft.world.level.block.state.BlockState;
 
 public interface ChangeOverTimeBlock<T extends Enum<T>> {
+
     int SCAN_DISTANCE = 4;
 
     Optional<BlockState> getNext(BlockState state);
@@ -15,6 +17,7 @@
 
     default void onRandomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
         float f = 0.05688889F;
+
         if (random.nextFloat() < 0.05688889F) {
             this.applyChangeOverTime(state, world, pos, random);
         }
@@ -27,25 +30,31 @@
         int i = this.getAge().ordinal();
         int j = 0;
         int k = 0;
+        Iterator iterator = BlockPos.withinManhattan(pos, 4, 4, 4).iterator();
+
+        while (iterator.hasNext()) {
+            BlockPos blockposition1 = (BlockPos) iterator.next();
+            int l = blockposition1.distManhattan(pos);
 
-        for(BlockPos blockPos : BlockPos.withinManhattan(pos, 4, 4, 4)) {
-            int l = blockPos.distManhattan(pos);
             if (l > 4) {
                 break;
             }
 
-            if (!blockPos.equals(pos)) {
-                BlockState blockState = world.getBlockState(blockPos);
-                Block block = blockState.getBlock();
+            if (!blockposition1.equals(pos)) {
+                BlockState iblockdata1 = world.getBlockState(blockposition1);
+                Block block = iblockdata1.getBlock();
+
                 if (block instanceof ChangeOverTimeBlock) {
-                    Enum<?> enum_ = ((ChangeOverTimeBlock)block).getAge();
-                    if (this.getAge().getClass() == enum_.getClass()) {
-                        int m = enum_.ordinal();
-                        if (m < i) {
+                    Enum<?> oenum = ((ChangeOverTimeBlock) block).getAge();
+
+                    if (this.getAge().getClass() == oenum.getClass()) {
+                        int i1 = oenum.ordinal();
+
+                        if (i1 < i) {
                             return;
                         }
 
-                        if (m > i) {
+                        if (i1 > i) {
                             ++k;
                         } else {
                             ++j;
@@ -55,11 +64,12 @@
             }
         }
 
-        float f = (float)(k + 1) / (float)(k + j + 1);
-        float g = f * f * this.getChanceModifier();
-        if (random.nextFloat() < g) {
-            this.getNext(state).ifPresent((statex) -> {
-                world.setBlockAndUpdate(pos, statex);
+        float f = (float) (k + 1) / (float) (k + j + 1);
+        float f1 = f * f * this.getChanceModifier();
+
+        if (random.nextFloat() < f1) {
+            this.getNext(state).ifPresent((iblockdata2) -> {
+                org.bukkit.craftbukkit.v1_20_R2.event.CraftEventFactory.handleBlockFormEvent(world, pos, iblockdata2); // CraftBukkit
             });
         }
 
