[ci skip] Add more identifying patch comments

This commit is contained in:
Nassim Jahnke
2024-01-18 15:56:25 +01:00
parent 3a0aff9ba9
commit 16f89b4fa7
29 changed files with 107 additions and 89 deletions

View File

@@ -21,7 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.AIR.defaultBlockState()).isCancelled()) {
+ return;
+ }
+ // Paper end
+ // Paper end - Call BlockFadeEvent
this.destroyBlock(world, pos);
world.playSound((Player)null, pos, SoundEvents.FROGSPAWN_HATCH, SoundSource.BLOCKS, 1.0F, 1.0F);
this.spawnTadpoles(world, pos, random);
@@ -46,13 +46,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return this.getHatchLevel(state) == 2;
}
+ // Paper start
+ // Paper start - Call BlockFadeEvent
+ private void rescheduleTick(ServerLevel world, BlockPos pos) {
+ int baseDelay = hatchBoost(world, pos) ? BOOSTED_HATCH_TIME_TICKS : REGULAR_HATCH_TIME_TICKS;
+ world.scheduleTick(pos, this, (baseDelay / 3) + world.random.nextInt(RANDOM_HATCH_OFFSET_TICKS));
+ // reschedule to avoid being stuck here and behave like the other calls (see #onPlace)
+ }
+ // Paper end
+ // Paper end - Call BlockFadeEvent
+
@Override
public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
@@ -65,7 +65,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ rescheduleTick(world, pos);
+ return;
+ }
+ // Paper end
+ // Paper end - Call BlockFadeEvent
world.playSound((Player)null, pos, SoundEvents.SNIFFER_EGG_HATCH, SoundSource.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
world.destroyBlock(pos, false);
Sniffer sniffer = EntityType.SNIFFER.create(world);