From ed2b91c283dccaa898ce7aa1eb42877303fa0a98 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Thu, 15 Jul 2021 20:29:38 +1000 Subject: [PATCH] SPIGOT-6649: Call BlockFadeEvent when Nylium fades to Netherrack --- .../minecraft/world/level/block/BlockNylium.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 nms-patches/net/minecraft/world/level/block/BlockNylium.patch diff --git a/nms-patches/net/minecraft/world/level/block/BlockNylium.patch b/nms-patches/net/minecraft/world/level/block/BlockNylium.patch new file mode 100644 index 000000000..2125554e7 --- /dev/null +++ b/nms-patches/net/minecraft/world/level/block/BlockNylium.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/world/level/block/BlockNylium.java ++++ b/net/minecraft/world/level/block/BlockNylium.java +@@ -31,6 +31,11 @@ + @Override + public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { + if (!b(iblockdata, (IWorldReader) worldserver, blockposition)) { ++ // CraftBukkit start ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.NETHERRACK.getBlockData()).isCancelled()) { ++ return; ++ } ++ // CraftBukkit end + worldserver.setTypeUpdate(blockposition, Blocks.NETHERRACK.getBlockData()); + } +