diff options
author | md_5 <git@md-5.net> | 2016-11-17 12:41:03 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-11-17 12:41:03 +1100 |
commit | c25ddf063a808e3adb749e22017661f403c5fb7e (patch) | |
tree | b2efcff512be12fd3e38cf8c36386148ce6ab4ae /nms-patches/PathfinderGoalVillagerFarm.patch | |
parent | 51263e97187a84338f89698eef187284055a682a (diff) | |
download | craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.gz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.lz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.xz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.zip |
Update to Minecraft 1.11
Diffstat (limited to 'nms-patches/PathfinderGoalVillagerFarm.patch')
-rw-r--r-- | nms-patches/PathfinderGoalVillagerFarm.patch | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nms-patches/PathfinderGoalVillagerFarm.patch b/nms-patches/PathfinderGoalVillagerFarm.patch index 449a3a77..b24ce69b 100644 --- a/nms-patches/PathfinderGoalVillagerFarm.patch +++ b/nms-patches/PathfinderGoalVillagerFarm.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/PathfinderGoalVillagerFarm.java +++ b/net/minecraft/server/PathfinderGoalVillagerFarm.java -@@ -48,7 +48,11 @@ +@@ -40,7 +40,11 @@ Block block = iblockdata.getBlock(); - if (this.f == 0 && block instanceof BlockCrops && ((BlockCrops) block).y(iblockdata)) { + if (this.f == 0 && block instanceof BlockCrops && ((BlockCrops) block).A(iblockdata)) { - world.setAir(blockposition, true); + // CraftBukkit start + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.c, blockposition, Blocks.AIR, 0).isCancelled()) { @@ -11,15 +11,14 @@ + } + // CraftBukkit end } else if (this.f == 1 && iblockdata.getMaterial() == Material.AIR) { - InventorySubcontainer inventorysubcontainer = this.c.dj(); + InventorySubcontainer inventorysubcontainer = this.c.dm(); -@@ -57,19 +61,29 @@ +@@ -49,19 +53,28 @@ boolean flag = false; - if (itemstack != null) { + if (!itemstack.isEmpty()) { + // CraftBukkit start + Block planted = null; -+ if (itemstack.getItem() == Items.WHEAT_SEEDS) { - world.setTypeAndData(blockposition, Blocks.WHEAT.getBlockData(), 3); + planted = Blocks.WHEAT; |