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

Added Mushroom spread configuration to world config #9592

Closed
wants to merge 22 commits into from

Conversation

GrayR0ot
Copy link

@GrayR0ot GrayR0ot commented Aug 9, 2023

This update introduces a mushroom configuration to the Paper world, providing users with the ability to bypass the standard vanilla spread limit. This customization allows users to exert more control over mushroom spreading, potentially leading to increased mushroom growth within the designated area.

@GrayR0ot GrayR0ot requested a review from a team as a code owner August 9, 2023 19:33
GrayR0ot and others added 3 commits August 9, 2023 22:09
The lists are only supposed to contain ticks for the 1 radius
neighbours of the chunk.
@Machine-Maker
Copy link
Member

Machine-Maker commented Aug 11, 2023

Yeah, I think in this case an IntOr.DefaultOrDisabled would be nice. I, by far, prefer using words instead of random constants. You never know what might change in the future. Like plenty of -1 to disable some height thing broke when y went below 0. It's best to use disabled or default to convey precise meaning.

I can implement that type if you'd like. Otherwise, just look at how the other ones are implemented and adapt it

@GrayR0ot

This comment was marked as resolved.

GrayR0ot

This comment was marked as duplicate.

@GrayR0ot GrayR0ot requested a review from lynxplay August 12, 2023 17:34
Comment on lines +15 to +17
- int i = 5;
+ // Paper start - Increase vanilla mushroom spread
+ int mushroomSpreadLimit = world.paperConfig().environment.mushroom.spreadLimit.or(5);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving the original i = 5 and using the i as the default in the .or might look a bit cleaner, but generally looks pretty good.

@GrayR0ot GrayR0ot closed this Aug 13, 2023
@GrayR0ot GrayR0ot deleted the feat/mushroom-spread-config branch August 13, 2023 11:29
@GrayR0ot
Copy link
Author

I created a new PR with all new changes from Paper/master for better lisibility & workflow on my side.

#9599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

9 participants