@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user