mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-17 19:05:31 +00:00
changed crop logic a bit
if crop havest is not possible at the optimal state, just harvest, ffs. Signed-off-by: bartimaeusnek <[email protected]>
This commit is contained in:
1 parent
abcb180689
commit
855d359b02
2 files changed
+8
-2
No files matched your search
@@ -400,7 +400,13 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
public ArrayList<ItemStack> getCropDrops(TileEntity tileEntity) {
|
||||
if (isIC2Crop(tileEntity)) {
|
||||
ICropTile crop = (ICropTile)tileEntity;
|
||||
ItemStack[] cropDrops = crop.harvest_automated(true);
|
||||
if (crop == null || crop.getCrop() == null)
|
||||
return null;
|
||||
ItemStack[] cropDrops;
|
||||
if ((crop.getCrop().canGrow(crop) && crop.getSize() < crop.getCrop().getOptimalHavestSize(crop)) || crop.getSize() == crop.getCrop().getOptimalHavestSize(crop))
|
||||
cropDrops = crop.harvest_automated(true);
|
||||
else
|
||||
cropDrops = crop.harvest_automated(false);
|
||||
if (cropDrops != null) {
|
||||
return new ArrayList<>(Arrays.asList(cropDrops));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user