mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-30 20:03:51 -07:00
@@ -1,15 +1,6 @@
|
||||
--- a/net/minecraft/server/BehaviorFarm.java
|
||||
+++ b/net/minecraft/server/BehaviorFarm.java
|
||||
@@ -27,7 +27,7 @@
|
||||
} else if (entityvillager.getVillagerData().getProfession() != VillagerProfession.FARMER) {
|
||||
return false;
|
||||
} else {
|
||||
- Set<BlockPosition> set = (Set) ((List) entityvillager.getBehaviorController().getMemory(MemoryModuleType.SECONDARY_JOB_SITE).get()).stream().map(GlobalPos::getBlockPosition).collect(Collectors.toSet());
|
||||
+ Set<BlockPosition> set = (Set) (entityvillager.getBehaviorController().getMemory(MemoryModuleType.SECONDARY_JOB_SITE).get()).stream().map(GlobalPos::getBlockPosition).collect(Collectors.toSet()); // CraftBukkit - decompile error
|
||||
BlockPosition blockposition = new BlockPosition(entityvillager);
|
||||
Stream stream = ImmutableList.of(blockposition.down(), blockposition.south(), blockposition.north(), blockposition.east(), blockposition.west()).stream();
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
@@ -72,8 +72,8 @@
|
||||
|
||||
protected void a(WorldServer worldserver, EntityVillager entityvillager, long i) {
|
||||
if (i > this.d && this.a != null) {
|
||||
@@ -20,8 +11,8 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -76,7 +76,11 @@
|
||||
Block block = iblockdata.getBlock();
|
||||
@@ -92,7 +92,11 @@
|
||||
Block block1 = worldserver.getType(this.a.down()).getBlock();
|
||||
|
||||
if (block instanceof BlockCrops && ((BlockCrops) block).isRipe(iblockdata) && this.c) {
|
||||
- worldserver.b(this.a, true);
|
||||
@@ -30,10 +21,10 @@
|
||||
+ worldserver.b(this.a, true);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
} else if (iblockdata.isAir() && this.b) {
|
||||
InventorySubcontainer inventorysubcontainer = entityvillager.getInventory();
|
||||
}
|
||||
|
||||
@@ -85,19 +89,28 @@
|
||||
if (iblockdata.isAir() && block1 instanceof BlockSoil && this.b) {
|
||||
@@ -103,19 +107,28 @@
|
||||
boolean flag = false;
|
||||
|
||||
if (!itemstack.isEmpty()) {
|
||||
@@ -66,3 +57,14 @@
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
@@ -134,8 +147,8 @@
|
||||
this.a = this.a(worldserver);
|
||||
if (this.a != null) {
|
||||
this.d = i + 20L;
|
||||
- entityvillager.getBehaviorController().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new MemoryTarget(new BehaviorTarget(this.a), 0.5F, 1)));
|
||||
- entityvillager.getBehaviorController().setMemory(MemoryModuleType.LOOK_TARGET, (Object) (new BehaviorTarget(this.a)));
|
||||
+ entityvillager.getBehaviorController().setMemory(MemoryModuleType.WALK_TARGET, (new MemoryTarget(new BehaviorTarget(this.a), 0.5F, 1))); // CraftBukkit - decompile error
|
||||
+ entityvillager.getBehaviorController().setMemory(MemoryModuleType.LOOK_TARGET, (new BehaviorTarget(this.a))); // CraftBukkit - decompile error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user