mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
Fix farms only planting brown mushrooms
This commit is contained in:
1 parent
723d07ab7c
commit
84b1fa8c07
4 files changed
+16
-10
No files matched your search
@@ -11,6 +11,7 @@
|
||||
package forestry.farming.logic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -29,7 +30,7 @@ public abstract class FarmLogicHomogeneous extends FarmLogic {
|
||||
|
||||
private final ItemStack resource;
|
||||
private final ItemStack soilBlock;
|
||||
protected final Iterable<IFarmable> germlings;
|
||||
protected final List<IFarmable> germlings;
|
||||
|
||||
ArrayList<ItemStack> produce = new ArrayList<>();
|
||||
|
||||
@@ -37,7 +38,10 @@ public abstract class FarmLogicHomogeneous extends FarmLogic {
|
||||
super(housing);
|
||||
this.resource = resource;
|
||||
this.soilBlock = soilBlock;
|
||||
this.germlings = germlings;
|
||||
this.germlings = new ArrayList<>();
|
||||
for (IFarmable germling : germlings) {
|
||||
this.germlings.add(germling);
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isAcceptedSoil(ItemStack itemStack) {
|
||||
@@ -75,11 +79,7 @@ public abstract class FarmLogicHomogeneous extends FarmLogic {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (maintainGermlings(x, y + 1, z, direction, extent)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return maintainGermlings(x, y + 1, z, direction, extent);
|
||||
}
|
||||
|
||||
private boolean maintainSoil(int x, int yGround, int z, FarmDirection direction, int extent) {
|
||||
|
||||
Reference in new issue
Block a user