Skip to content

Added Mushroom spread configuration to world config#9592

Closed
GrayR0ot wants to merge 22 commits into
PaperMC:masterfrom
GrayR0ot:feat/mushroom-spread-config
Closed

Added Mushroom spread configuration to world config#9592
GrayR0ot wants to merge 22 commits into
PaperMC:masterfrom
GrayR0ot:feat/mushroom-spread-config

Conversation

@GrayR0ot
Copy link
Copy Markdown

@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.
Comment thread patches/server/0005-Paper-config-files.patch Outdated
Comment thread patches/server/1000-Increase-vanilla-mushroom-spread-limit.patch Outdated
@Machine-Maker
Copy link
Copy Markdown
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.

Warriorrrr and others added 3 commits August 12, 2023 23:33
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
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
Copy Markdown
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
Copy Markdown
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