Repository navigation
feat(trees): walk through tree crowns like through plants — leaves, needles and fronds, not the trunks (#2184) - #2197
Merged
Conversation
…eedles and fronds, not the trunks (#2184) Tree crowns (tree_leaves, pine_needles, palm_frond, giant_leaves, fifi_leaf) keep their cutout look but no longer emit a collider; trunks and the giant trees' branches stay solid. - Shared TreeFoliage names the crown keys once; the list was hand-copied into seven places that had drifted (flyers bounced off pine crowns). - ChunkMesher: crown cells drop TraitCollidable; a trunk's faces toward its leaves are still emitted, so it keeps a full collider. - PlayerController.IsSolidKey: a crown is no footing (IsCollidingKey, crouch headroom, sneak edge-stop and the lift-out path follow). - DoorProbe.IsJamb: a crown is no door jamb. - Flyers (server), creature ground probe and critter blocking (client) use the shared list. - Solid flag unchanged (crowns still block sight and light); ground NPCs and animals still treat crowns as solid. Tests: TreeFoliageTests, DoorwayTests, EditMode ChunkMesherTreeFoliageEditModeTests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e-foliage # Conflicts: # TODO.md
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.
Closes #2184
What
You now walk, jump and fall through tree crowns — leaves, needles, fronds and the Fifi plant's leaves — the way you already walk through grass and ferns. Trunks stay solid, and so do the giant trees' branches (they are
giant_log).How
Shared/Definitions/TreeFoliage— the five crown keys, named once. Until now the list was hand-copied into seven places that had drifted: the server's flyer rule and the client's creature/critter probes only knewtree_leaves+giant_leaves, so a bird bounced off a pine crown.ChunkMesher— crown cells loseTraitCollidable: same look, no collider. The trunk's faces toward its leaves are still emitted (foliage never seals a neighbour's face), so the trunk keeps its full collider.PlayerController.IsSolidKey— a crown is no footing;IsCollidingKeyinherits that. So the embedded/out-of-world guard, the crouch-to-stand headroom check, the sneak edge-stop and the "a block appeared in my cell, lift me out" path all agree with the missing collider.DoorProbe.IsJamb— a crown is no door jamb any more (its own rule: "the blocks the client meshes without a collider").Deliberately unchanged
Solidflag: crowns still block line of sight and light (you can still hide in a tree).IsCollidingBlockalso decides where falling sand stops, where drop packets land and where NPCs stand, and a crown hangs above their heads anyway.paul_leaf) — platforms, not a crown.tree_leaves, so it is walked through too. Giving it its own stem block would need a terrain-generation bump, so it is out of scope here.Tests
TreeFoliageTests(new): every crown key is a shipped flora block, so the entombed rescue never fires inside a crown. Each crown renders as cutout, and the generator's giant-leaves key is in the list. Trunks stay jambs and crowns don't. A player inside any crown is not entombed; inside a trunk they are.DoorwayTests.TheJambRule_CountsWallsNotFlora:tree_leavesis no jamb now;wood_logis.ChunkMesherTreeFoliageEditModeTests(new): every crown cell renders but emits no collider; a trunk wrapped in leaves keeps all six collider faces.Verification
dotnet build --no-incremental: 0 warnings, 0 errors;dotnet format --verify-no-changes: clean.scripts/build-client.ps1):Build Finished, Result: Success, 0error CS, freshBlocksBeyondTheStars.Client.dll; no generated files to commit.ChunkMesherTreeFoliageEditModeTestspass. The two failures already fail onmainand are not from this change:ChunkMesherGoldenEditModeTestshas stale pins, andInputAbstractionEditModeTestslacksFeedCreaturein the rebind groups. This PR also changes the golden's collider hash (crowns lose their collider), so whoever re-pins it next includes that on purpose.🤖 Generated with Claude Code