PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockNylium.patch

15 lines
719 B
Diff
Raw Normal View History

--- a/net/minecraft/world/level/block/BlockNylium.java
+++ b/net/minecraft/world/level/block/BlockNylium.java
@@ -30,6 +30,11 @@
@Override
public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
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());
}