PaperMC/patches/server/0878-Add-missing-BlockFadeEvents.patch
Nassim Jahnke dcc290167f
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
dea9ce0a SPIGOT-7198: Add Sittable interface to Camel

CraftBukkit Changes:
eecb4c0dc SPIGOT-7196: Exception loading alternate worlds
0ff61e8fa SPIGOT-7198: Add Sittable interface to Camel
676441aac PR-1121: Handle additional missing SpawnEggs in MetaSpawnEgg
e85280e02 Handle missing SpawnEggs in MetaSpawnEgg

Spigot Changes:
d90018e0 SPIGOT-7199: NPE loading or creating world with custom chunk generator
2022-12-08 11:53:14 +01:00

22 lines
1.2 KiB
Diff

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 b63835fe3eda974746163e7a9e26080da7538c4d..2974f64d5a931a08e450aacbfd1281c4d3f15303 100644
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
@@ -84,6 +84,11 @@ 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);