0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-22 10:06:16 +00:00
craftbukkit/nms-patches/net/minecraft/world/level/block/BlockNylium.patch
2024-04-24 01:15:00 +10:00

15 lines
734 B
Diff

--- a/net/minecraft/world/level/block/BlockNylium.java
+++ b/net/minecraft/world/level/block/BlockNylium.java
@@ -41,6 +41,11 @@
@Override
protected void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
if (!canBeNylium(iblockdata, worldserver, blockposition)) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.NETHERRACK.defaultBlockState()).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
worldserver.setBlockAndUpdate(blockposition, Blocks.NETHERRACK.defaultBlockState());
}