|
9 | 9 | Direction testDirection = Direction.getRandom(random); |
10 | 10 | BlockPos abovePos = pos.above(); |
11 | 11 | if (testDirection.getAxis().isHorizontal() && !state.getValue(getPropertyForFace(testDirection))) { |
12 | | -@@ -180,30 +_,31 @@ |
| 12 | +@@ -180,30 +_,33 @@ |
13 | 13 | boolean ccwHasConnectingFace = state.getValue(getPropertyForFace(ccwDirection)); |
14 | 14 | BlockPos cwTestPos = testPos.relative(cwDirection); |
15 | 15 | BlockPos ccwTestPos = testPos.relative(ccwDirection); |
|
25 | 25 | Direction opposite = testDirection.getOpposite(); |
26 | 26 | if (cwHasConnectingFace && level.isEmptyBlock(cwTestPos) && isAcceptableNeighbour(level, pos.relative(cwDirection), opposite)) { |
27 | 27 | - level.setBlock(cwTestPos, this.defaultBlockState().setValue(getPropertyForFace(opposite), true), Block.UPDATE_CLIENTS); |
28 | | -- } else if (ccwHasConnectingFace |
29 | | -- && level.isEmptyBlock(ccwTestPos) |
30 | | -- && isAcceptableNeighbour(level, pos.relative(ccwDirection), opposite)) { |
31 | | -- level.setBlock(ccwTestPos, this.defaultBlockState().setValue(getPropertyForFace(opposite), true), Block.UPDATE_CLIENTS); |
32 | 28 | + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, cwTestPos, this.defaultBlockState().setValue(getPropertyForFace(opposite), true), Block.UPDATE_CLIENTS); |
33 | | -+ } else if (ccwHasConnectingFace && level.isEmptyBlock(ccwTestPos) && isAcceptableNeighbour(level, pos.relative(ccwDirection), opposite)) { |
| 29 | + } else if (ccwHasConnectingFace |
| 30 | + && level.isEmptyBlock(ccwTestPos) |
| 31 | + && isAcceptableNeighbour(level, pos.relative(ccwDirection), opposite)) { |
| 32 | +- level.setBlock(ccwTestPos, this.defaultBlockState().setValue(getPropertyForFace(opposite), true), Block.UPDATE_CLIENTS); |
34 | 33 | + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, ccwTestPos, this.defaultBlockState().setValue(getPropertyForFace(opposite), true), Block.UPDATE_CLIENTS); |
35 | 34 | } else if (random.nextFloat() < 0.05 && isAcceptableNeighbour(level, testPos.above(), Direction.UP)) { |
36 | 35 | - level.setBlock(testPos, this.defaultBlockState().setValue(UP, true), Block.UPDATE_CLIENTS); |
|
0 commit comments