Repository navigation
Conversation
Icing placers run once a chunk is final (all 8 neighbors decorated), so every tree is already in place. They can only edit their own chunk, so no extra neighbors are needed and chunk latency is unchanged. Bamboo is the first icing placer. A stalk is cut short to fit under the canopy, and skipped if there is not enough room, instead of growing through leaves.
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.
Stacked on #61.
What
Adds
IcingPlacer: a last pass of decoration that runs once a chunk is final, which is when all 8 neighbors have finished being decorated. At that point every tree is in place (including ones that grew in from a neighbor), so an icing placer can see exactly what is above it, and nothing runs after it that could overwrite it.Icing placers only edit their own chunk, so no extra neighbors are needed. The base terrain stays 7x7 and the first chunk still needs a 3x3 decorated region.
Bamboo is the only icing placer for now.
Design
IcingPlaceris a separate trait fromChunkPlaceron purpose. AChunkPlacerruns before any tree exists, so it can't take trees into account. Registering a placer in the wrong pass should not compile.g.place_icing(...).Generator::ice(ctx, chunk, pos)is called right before theDecorated -> NeighborDecoratedflip, and fromRegion::generate.generate, with a salt so icing does not share seeds with chunk placers.Bamboo
The bug: bamboo placed before a tree makes the leaves skip its cells, so stalks poke through canopies. Now bamboo runs last, and a stalk is cut short to fit under the canopy. A stalk with less than 6 blocks of room is skipped.
placer::Bambooandplacer::BambooClumpare replaced byicing_placer::Bambooandicing_placer::BambooClump. Clumps use the replay helpers from #61, so they are continuous across chunk borders.Not done / needs a look
generate_neighbor_decorated). Needs a benchmark against the current 3x3 baseline.MIN_HEIGHT = 6is a guess.