Add configurable crop growth light levels#9641
Closed
JamieIsGeek wants to merge 2 commits into
Closed
Conversation
Member
|
So the problem with this, is that crops will break if they can't see the sky and have a light level lower than 8 (or smth close). There are multiple light level and conditions for crops to grow, so idk how well a single configuration value will handle those. |
Author
|
Yeah I saw something lower down in the class about crop survival which I guess could also be turned into a config option? |
Author
|
There is this which is the only othert light dependant part of the CropBlock class so I'd assuming making this configurable would fix your issue? @Override
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
return (world.getRawBrightness(pos, 0) >= 8 || world.canSeeSky(pos)) && super.canSurvive(state, world, pos);
} |
Member
|
Yeah, that would be one potential fix. I just wonder if an event allowing plugins to customize it more finely would be better. Idk how such an event would work tho. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #9631