diff --git a/gradle.properties b/gradle.properties index c657456f7..d95d5ee69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ mcversion=1.7.10 forgeversion=10.13.4.1614-1.7.10 version_major=4 version_minor=2 -version_patch=18 +version_patch=19 diff --git a/src/main/java/forestry/plugins/compat/PluginIC2.java b/src/main/java/forestry/plugins/compat/PluginIC2.java index a9f6f89da..9c566726d 100644 --- a/src/main/java/forestry/plugins/compat/PluginIC2.java +++ b/src/main/java/forestry/plugins/compat/PluginIC2.java @@ -400,7 +400,13 @@ public class PluginIC2 extends ForestryPlugin { public ArrayList 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)); }