Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Crop death option 2 #144

Open
SlimeDog opened this issue Nov 10, 2018 · 0 comments
Open

Feature request: Crop death option 2 #144

SlimeDog opened this issue Nov 10, 2018 · 0 comments

Comments

@SlimeDog
Copy link

SlimeDog commented Nov 10, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants