Feature request: Crop death option 2
SlimeDog opened this issue ยท 0 comments
EHM 3.13.beta
Please consider the option -- discussed in #143 -- to check crops for potential death at every growth change. Looking at the code (I am not equipped to make Java PRs), this can be implemented by setting
final int additionalGrowStages = Math.max(0,CFG.getInt(RootNode.WEAK_FOOD_CROPS_ADDITIONAL_GROWTH_STAGES, world.getName()));
...
int fullGrowthValue = 7;
switch (block.getType())
{
case BEETROOTS:
fullGrowthValue = 3;
break;
case WHEAT:
case CARROTS:
case POTATOES:
break;
default:
return false;
}
fullGrowthValue -= additionalGrowStages;
assuming that WEAK_FOOD_CROPS_ADDITIONAL_GROWTH_STAGES is adequately defined somewhere, and that the configuration is augmented to look something like:
Farming:
Weak Crops:
Enable: true
# By default, only the final growth stage resulting in fully-mature crops is subject to loss.
# To cause losses to immature crops as well, increase the number of additional growth stages.
# The number of growth stages for most crops is 7; beetroot is 3.
# Values greater than the number of growth stages are silently ignored.
Additional Growth Stages: 0
# 25% is a reasonable loss rate if only fully-mature crops are affected.
# If additional growth stages are affected, the loss rate should be proportionally decreased.
Loss Rate: 25
Infertile Deserts: true
Snow Breaks Crops: true