|
345 | 345 | Biome biome = this.getBiome(heightmapPos).value();
|
346 | 346 | if (biome.shouldFreeze(this, blockPos1)) {
|
347 | 347 | - this.setBlockAndUpdate(blockPos1, Blocks.ICE.defaultBlockState());
|
348 |
| -+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockPos1, Blocks.ICE.defaultBlockState(), null); // CraftBukkit |
| 348 | ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockPos1, Blocks.ICE.defaultBlockState(), 3, null); // CraftBukkit |
349 | 349 | }
|
350 | 350 |
|
351 | 351 | if (this.isRaining()) {
|
|
354 | 354 | BlockState blockState1 = blockState.setValue(SnowLayerBlock.LAYERS, layersValue + 1);
|
355 | 355 | Block.pushEntitiesUp(blockState, blockState1, this, heightmapPos);
|
356 | 356 | - this.setBlockAndUpdate(heightmapPos, blockState1);
|
357 |
| -+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, heightmapPos, blockState1, null); // CraftBukkit |
| 357 | ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, heightmapPos, blockState1, 3, null); // CraftBukkit |
358 | 358 | }
|
359 | 359 | } else {
|
360 | 360 | - this.setBlockAndUpdate(heightmapPos, Blocks.SNOW.defaultBlockState());
|
361 |
| -+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, heightmapPos, Blocks.SNOW.defaultBlockState(), null); // CraftBukkit |
| 361 | ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, heightmapPos, Blocks.SNOW.defaultBlockState(), 3, null); // CraftBukkit |
362 | 362 | }
|
363 | 363 | }
|
364 | 364 |
|
|
1036 | 1036 | return this.entityManager.getEntityGetter();
|
1037 | 1037 | }
|
1038 | 1038 |
|
1039 |
| -@@ -1699,6 +_,27 @@ |
| 1039 | +@@ -1699,6 +_,28 @@ |
1040 | 1040 | return this.serverLevelData.getGameRules();
|
1041 | 1041 | }
|
1042 | 1042 |
|
|
1051 | 1051 | + }
|
1052 | 1052 | + // Paper end - respect global sound events gamerule
|
1053 | 1053 | + // Paper start - notify observers even if grow failed
|
| 1054 | ++ @Deprecated // todo check if needed |
1054 | 1055 | + public void checkCapturedTreeStateForObserverNotify(final BlockPos pos, final org.bukkit.craftbukkit.block.CraftBlockState craftBlockState) {
|
1055 | 1056 | + // notify observers if the block state is the same and the Y level equals the original y level (for mega trees)
|
1056 | 1057 | + // blocks at the same Y level with the same state can be assumed to be saplings which trigger observers regardless of if the
|
|
0 commit comments