add optional skylight requirement and allow 0 chance config #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings! Thank you for this small but genious mod.
There are a lot of automation mods that will trip up when a hefty crop spawns. This PR adds 2 simple changes, both are done in a way that keep the original behavior as the default.
1. Allow 0 weight config for spawns
Previously, the weight was limited to a value between 1 and 100. I've extended the range to include 0 and added a check for 0 in the
onCropGrow
event handler. The default of 25 is unchanged. This option is targeted towards modpacks which only want to use the hefty crops as decorative objects. It would be up to them to add options to obtain the hefty crops when disabling the spawning.2. Add sky light requirement
As requested in issue #2, I've added a configuration option that allows hefty crops to only spawn under direct sky light (sky light level == 15). This still allows crops to grow under glas since glas does not change the skylight level, but anything that reduces the skylight level for a given location, would prevent hefty crops to grow. The default value is set to
false
.