diff options
author | md_5 <git@md-5.net> | 2018-09-09 18:53:38 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-09-09 18:56:38 +1000 |
commit | 3123a069bf04af331ae9194d223a7fd376535949 (patch) | |
tree | 0627ca46cd5e0dfe1b695de25a301f0c808b07c1 /nms-patches | |
parent | 226db0eae7bbaac7d7a14c4ddc608f5868e3731a (diff) | |
download | craftbukkit-3123a069bf04af331ae9194d223a7fd376535949.tar craftbukkit-3123a069bf04af331ae9194d223a7fd376535949.tar.gz craftbukkit-3123a069bf04af331ae9194d223a7fd376535949.tar.lz craftbukkit-3123a069bf04af331ae9194d223a7fd376535949.tar.xz craftbukkit-3123a069bf04af331ae9194d223a7fd376535949.zip |
SPIGOT-4352: MoistureChangeEvent
Diffstat (limited to 'nms-patches')
-rw-r--r-- | nms-patches/BlockSoil.patch | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/nms-patches/BlockSoil.patch b/nms-patches/BlockSoil.patch index c10f0062..75bc8516 100644 --- a/nms-patches/BlockSoil.patch +++ b/nms-patches/BlockSoil.patch @@ -12,7 +12,21 @@ public class BlockSoil extends Block { public static final BlockStateInteger MOISTURE = BlockProperties.ai; -@@ -63,14 +68,37 @@ +@@ -51,26 +56,49 @@ + + if (!a((IWorldReader) world, blockposition) && !world.isRainingAt(blockposition.up())) { + if (i > 0) { +- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, Integer.valueOf(i - 1)), 2); ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, Integer.valueOf(i - 1)), 2); // CraftBukkit + } else if (!a((IBlockAccess) world, blockposition)) { + b(iblockdata, world, blockposition); + } + } else if (i < 7) { +- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, Integer.valueOf(7)), 2); ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, Integer.valueOf(7)), 2); // CraftBukkit + } + + } } public void fallOn(World world, BlockPosition blockposition, Entity entity, float f) { |