aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch
diff options
context:
space:
mode:
authorMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
committerMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
commitbee74680e607c2e29b038329f62181238911cd83 (patch)
tree708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/og/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch
parent0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff)
downloadPaper-softspoon.tar.gz
Paper-softspoon.zip
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/og/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch')
-rw-r--r--patch-remap/og/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch b/patch-remap/og/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch
new file mode 100644
index 0000000000..8bee36a94b
--- /dev/null
+++ b/patch-remap/og/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch
@@ -0,0 +1,23 @@
+--- a/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java
++++ b/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java
+@@ -44,6 +44,11 @@
+ @Override
+ public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
+ if (!canBeGrass(iblockdata, worldserver, blockposition)) {
++ // CraftBukkit start
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.DIRT.defaultBlockState()).isCancelled()) {
++ return;
++ }
++ // CraftBukkit end
+ worldserver.setBlockAndUpdate(blockposition, Blocks.DIRT.defaultBlockState());
+ } else {
+ if (worldserver.getMaxLocalRawBrightness(blockposition.above()) >= 9) {
+@@ -53,7 +58,7 @@
+ BlockPosition blockposition1 = blockposition.offset(randomsource.nextInt(3) - 1, randomsource.nextInt(5) - 3, randomsource.nextInt(3) - 1);
+
+ if (worldserver.getBlockState(blockposition1).is(Blocks.DIRT) && canPropagate(iblockdata1, worldserver, blockposition1)) {
+- worldserver.setBlockAndUpdate(blockposition1, (IBlockData) iblockdata1.setValue(BlockDirtSnowSpreadable.SNOWY, worldserver.getBlockState(blockposition1.above()).is(Blocks.SNOW)));
++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, (IBlockData) iblockdata1.setValue(BlockDirtSnowSpreadable.SNOWY, worldserver.getBlockState(blockposition1.above()).is(Blocks.SNOW))); // CraftBukkit
+ }
+ }
+ }