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

Grow in handlers #4419

Merged
merged 1 commit into from Oct 28, 2019

Conversation

@madmaxoft
Copy link
Member

madmaxoft commented Oct 13, 2019

Moved block growing from cWorld / cChunk into the specific cBlockHandler descendants and cItemHandlerDye for bonemeal-related actions.

Note that this PR includes the changes from #4417, I will rebase this once that PR is merged. (rebased)

Also note that this PR removes the possibility to configure per-block bonemeal-ability. It is expected to return after 1.13 changes.

Fixes #4407.

@madmaxoft madmaxoft force-pushed the GrowInHandlers branch from 50b91cf to 2d6fa22 Oct 15, 2019
@madmaxoft madmaxoft marked this pull request as ready for review Oct 16, 2019
@madmaxoft madmaxoft force-pushed the GrowInHandlers branch from 9c6f5b1 to 719ae3f Oct 16, 2019
a_Chunk.UnboundedRelFastSetBlock(pos, E_BLOCK_CACTUS, 0);

// Check surroundings. Cacti may ONLY be surrounded by non-solid blocks; if they aren't, drop as pickup and bail out the growing
static const Vector3i neighborOffsets[] =

This comment has been minimized.

Copy link
@NiLSPACE

NiLSPACE Oct 17, 2019

Member

The cactus popping off seems perfect for a OnUpdate. Does the current code still work when I place a block next to the cactus?

This comment has been minimized.

Copy link
@madmaxoft

madmaxoft Oct 18, 2019

Author Member

Should still work, thanks to CanBeAt (can't try right now). But it's true that the checking code should be reused, rather than having a copy here. Will fix.

This comment has been minimized.

Copy link
@madmaxoft

madmaxoft Oct 18, 2019

Author Member

Can't fix easily, CanBeAt takes too different a set of parameters; changing CanBeAt to accept a single cChunk and Vector3i makes too many unrelated changes in other handlers, I'd prefer not to go that deep within this PR - especially when the block handlers will most likely be dropped entirely for the 1.13 change and then re-written from scratch.

@madmaxoft madmaxoft merged commit 61904af into master Oct 28, 2019
6 checks passed
6 checks passed
ci/circleci: check_basic_style Your tests passed on CircleCI!
Details
ci/circleci: checkout_cuberite Your tests passed on CircleCI!
Details
ci/circleci: clang-tidy Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@madmaxoft madmaxoft deleted the GrowInHandlers branch Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.