Skip to content

Add configurable crop growth light levels#9641

Closed
JamieIsGeek wants to merge 2 commits into
PaperMC:masterfrom
JamieIsGeek:feature/configurable-crop-light-levels
Closed

Add configurable crop growth light levels#9641
JamieIsGeek wants to merge 2 commits into
PaperMC:masterfrom
JamieIsGeek:feature/configurable-crop-light-levels

Conversation

@JamieIsGeek
Copy link
Copy Markdown

@JamieIsGeek JamieIsGeek commented Aug 23, 2023

Closes #9631

@JamieIsGeek JamieIsGeek requested a review from a team as a code owner August 23, 2023 22:02
@Machine-Maker
Copy link
Copy Markdown
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.

@JamieIsGeek
Copy link
Copy Markdown
Author

Yeah I saw something lower down in the class about crop survival which I guess could also be turned into a config option?

@JamieIsGeek
Copy link
Copy Markdown
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);
}

@Machine-Maker
Copy link
Copy Markdown
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.

@Warriorrrr Warriorrrr moved this from Awaiting review to Waiting For Author in Paper PR Queue Mar 5, 2025
@kennytv kennytv added the pre-softspoon: never rebased Pre-hardfork pull requests that were not re-opened with the new main branch label Mar 23, 2025
@kennytv kennytv deleted the branch PaperMC:master March 23, 2025 19:15
@kennytv kennytv closed this Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pre-softspoon: never rebased Pre-hardfork pull requests that were not re-opened with the new main branch pre-softspoon

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Growth Required Light Level

5 participants