diff options
author | md_5 <git@md-5.net> | 2018-07-15 10:00:00 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-07-15 10:00:00 +1000 |
commit | 421c1728c81e2f729dff88da2ac96535d2b8e5e8 (patch) | |
tree | 6c51d93e811d1eb86b68461a42fc5cf03b168b0c /nms-patches/PathfinderGoalVillagerFarm.patch | |
parent | 57ab4cfc6f4ff526d44319d9b8c79f6848db2de7 (diff) | |
download | craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar.gz craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar.lz craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar.xz craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.zip |
Update to Minecraft 1.13-pre7
Diffstat (limited to 'nms-patches/PathfinderGoalVillagerFarm.patch')
-rw-r--r-- | nms-patches/PathfinderGoalVillagerFarm.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nms-patches/PathfinderGoalVillagerFarm.patch b/nms-patches/PathfinderGoalVillagerFarm.patch index 2600cea0..19116f1a 100644 --- a/nms-patches/PathfinderGoalVillagerFarm.patch +++ b/nms-patches/PathfinderGoalVillagerFarm.patch @@ -3,15 +3,15 @@ @@ -40,7 +40,11 @@ Block block = iblockdata.getBlock(); - if (this.f == 0 && block instanceof BlockCrops && ((BlockCrops) block).z(iblockdata)) { + if (this.i == 0 && block instanceof BlockCrops && ((BlockCrops) block).w(iblockdata)) { - world.setAir(blockposition, true); + // CraftBukkit start -+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.c, blockposition, Blocks.AIR, 0).isCancelled()) { ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.f, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { + world.setAir(blockposition, true); + } + // CraftBukkit end - } else if (this.f == 1 && iblockdata.getMaterial() == Material.AIR) { - InventorySubcontainer inventorysubcontainer = this.c.dq(); + } else if (this.i == 1 && iblockdata.isAir()) { + InventorySubcontainer inventorysubcontainer = this.f.dD(); @@ -49,19 +53,28 @@ boolean flag = false; @@ -32,12 +32,12 @@ + planted = Blocks.CARROTS; flag = true; } else if (itemstack.getItem() == Items.BEETROOT_SEEDS) { -- world.setTypeAndData(blockposition, Blocks.BEETROOT.getBlockData(), 3); -+ planted = Blocks.BEETROOT; +- world.setTypeAndData(blockposition, Blocks.BEETROOTS.getBlockData(), 3); ++ planted = Blocks.BEETROOTS; flag = true; } + -+ if (planted != null && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.c, blockposition, planted, 0).isCancelled()) { ++ if (planted != null && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.f, blockposition, planted.getBlockData()).isCancelled()) { + world.setTypeAndData(blockposition, planted.getBlockData(), 3); + } else { + flag = false; |