mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
Fix #922 Multifarm does not harvest large tree branches
This commit is contained in:
1 parent
d1328cff6c
commit
23271bab04
2 files changed
+6
-9
No files matched your search
@@ -187,8 +187,6 @@ public class FarmLogicArboreal extends FarmLogicHomogeneous {
|
||||
return crops;
|
||||
}
|
||||
|
||||
protected int yOffset = 0;
|
||||
|
||||
private ArrayList<Vect> processHarvestBlock(IFarmable germling, Stack<ICrop> crops, Set<Vect> seen, Vect start, Vect position) {
|
||||
|
||||
World world = getWorld();
|
||||
@@ -196,17 +194,17 @@ public class FarmLogicArboreal extends FarmLogicHomogeneous {
|
||||
ArrayList<Vect> candidates = new ArrayList<>();
|
||||
|
||||
// Get additional candidates to return
|
||||
for (int i = -1; i < 2; i++) {
|
||||
for (int j = yOffset; j < 2; j++) {
|
||||
for (int k = -1; k < 2; k++) {
|
||||
Vect candidate = position.add(i, j, k);
|
||||
for (int x = -1; x < 2; x++) {
|
||||
for (int y = -1; y < 2; y++) {
|
||||
for (int z = -1; z < 2; z++) {
|
||||
Vect candidate = position.add(x, y, z);
|
||||
if (candidate.equals(position)) {
|
||||
continue;
|
||||
}
|
||||
if (Math.abs(candidate.x - start.x) > 5) {
|
||||
if (Math.abs(candidate.x - start.x) > 10) {
|
||||
continue;
|
||||
}
|
||||
if (Math.abs(candidate.z - start.z) > 5) {
|
||||
if (Math.abs(candidate.z - start.z) > 10) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ public class FarmLogicShroom extends FarmLogicArboreal {
|
||||
|
||||
public FarmLogicShroom(IFarmHousing housing) {
|
||||
super(housing, new ItemStack(Blocks.mycelium), new ItemStack(Blocks.mycelium), Farmables.farmables.get("farmShroom"));
|
||||
yOffset = -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user