mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Add missing BlockFadeEvents (#8171)
This commit is contained in:
parent
31c2f40b64
commit
164651e497
1 changed files with 22 additions and 0 deletions
22
patches/server/Add-missing-BlockFadeEvents.patch
Normal file
22
patches/server/Add-missing-BlockFadeEvents.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
Date: Thu, 21 Jul 2022 12:07:54 -0400
|
||||
Subject: [PATCH] Add missing BlockFadeEvents
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||
@@ -0,0 +0,0 @@ public class FrogspawnBlock extends Block {
|
||||
}
|
||||
|
||||
private void hatchFrogspawn(ServerLevel world, BlockPos pos, RandomSource random) {
|
||||
+ // Paper start - Call BlockFadeEvent
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.AIR.defaultBlockState()).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
this.destroyBlock(world, pos);
|
||||
world.playSound((Player)null, pos, SoundEvents.FROGSPAWN_HATCH, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
this.spawnTadpoles(world, pos, random);
|
Loading…
Reference in a new issue