summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockSoil.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/BlockSoil.patch')
-rw-r--r--nms-patches/BlockSoil.patch23
1 files changed, 11 insertions, 12 deletions
diff --git a/nms-patches/BlockSoil.patch b/nms-patches/BlockSoil.patch
index a7d37719..7c6475a0 100644
--- a/nms-patches/BlockSoil.patch
+++ b/nms-patches/BlockSoil.patch
@@ -1,7 +1,7 @@
--- a/net/minecraft/server/BlockSoil.java
+++ b/net/minecraft/server/BlockSoil.java
-@@ -4,6 +4,11 @@
- import java.util.List;
+@@ -3,6 +3,11 @@
+ import java.util.Iterator;
import java.util.Random;
+// CraftBukkit start
@@ -11,8 +11,8 @@
+
public class BlockSoil extends Block {
- public static final BlockStateInteger MOISTURE = BlockStateInteger.of("moisture", 0, 7);
-@@ -45,14 +50,38 @@
+ public static final BlockStateInteger MOISTURE = BlockProperties.ah;
+@@ -63,14 +68,37 @@
}
public void fallOn(World world, BlockPosition blockposition, Entity entity, float f) {
@@ -31,24 +31,23 @@
+ return;
+ }
+
-+ if (CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.DIRT, 0).isCancelled()) {
++ if (CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.DIRT.getBlockData()).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
- b(world, blockposition);
+ b(world.getType(blockposition), world, blockposition);
}
- super.fallOn(world, blockposition, entity, f);
+ // super.fallOn(world, blockposition, entity, f); // CraftBukkit - moved up
}
- protected static void b(World world, BlockPosition blockposition) {
+ protected static void b(IBlockData iblockdata, World world, BlockPosition blockposition) {
+ // CraftBukkit start
-+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+ if (CraftEventFactory.callBlockFadeEvent(block, Blocks.DIRT).isCancelled()) {
++ if (CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.DIRT.getBlockData()).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
- world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData());
- AxisAlignedBB axisalignedbb = BlockSoil.c.a(blockposition);
- List list = world.getEntities((Entity) null, axisalignedbb);
+ world.setTypeUpdate(blockposition, a(iblockdata, Blocks.DIRT.getBlockData(), (GeneratorAccess) world, blockposition));
+ }
+