Skip to content

fix: attach glow lichen, vines and other multiface plants to a block - #556

Merged
tastybento merged 1 commit into
developfrom
fix/glow-lichen-attachment
Aug 15, 2026
Merged

fix: attach glow lichen, vines and other multiface plants to a block#556
tastybento merged 1 commit into
developfrom
fix/glow-lichen-attachment

Conversation

@tastybento

Copy link
Copy Markdown
Member

The bug

Glow lichen in the Lush Caves phase cannot be obtained or used: it is deleted the moment anything updates next to it, and bone meal will not spread it.

spawnBlock places it with block.setType(Material.GLOW_LICHEN, false), which gives the block its default block data — and glow lichen's default state has every face false:

minecraft:glow_lichen {down=false, east=false, north=false, south=false, up=false, west=false, waterlogged=false}

That one fact explains all of the symptoms:

  • It looks like a lichen cube. The vanilla model has an explicit "all faces false" fallback part for each of the six directions, so the client draws lichen on all six sides. It is not attached to anything — it only looks that way.
  • It vanishes on the first block update. MultifaceBlock.canSurvive returns false when no face is set, so placing a block next to it deletes it.
  • Bone meal does nothing. The spreader spreads from an attached face, and there is none.

VINE in the Mangrove Swamp phase (weight 80) has the identical default state and the identical bug.

Corroboration: scanning every region file of every local AOneBlock test world turned up zero persisted glow lichen blocks.

Verified on a real Paper 26.2 server (console only, fresh world):

RESULT1 ATTACHED-LICHEN-SURVIVED   glow_lichen[down=true] on moss, survives a neighbour update
RESULT2 FACELESS-LICHEN-GONE       default glow_lichen, deleted by the first update
RESULT3 ATTACHED-VINE-SURVIVED     vine[south=true] on moss, survives

The fix

spawnMultifaceBlock handles GLOW_LICHEN, VINE, SCULK_VEIN and RESIN_CLUMP:

  1. Attach to what is already there. Every neighbour whose facing side is a full solid face (BlockData.isFaceSturdy(face, BlockSupport.FULL)) gets a face set on the plant. In normal play the magic block sits in the player's platform, so this is the usual case — the lichen is then a valid block that survives updates, drops to shears and spreads with bone meal.
  2. If it is floating in mid-air, grow it a block to live on. There would be nothing for bone meal to spread onto either, so the magic block becomes the support block (MOSS_BLOCK for lichen and vines, SCULK for sculk veins) and the plant grows on the first free side of it — lichen lies on the top face, vines go on a side since they cannot hang off an underside.

If the material is not MultipleFacing on the running server version, it is placed as before.

Testing

  • Three new cases in BlockListenerTest2: attach-to-neighbours, lichen with no support, vine with no support.
  • Full suite green — 563 tests.
  • Tested in-game on the 26.2 test server.

Not changed

  • Glow lichen still only drops with shears/silk touch — vanilla behaviour. If it should always pay out, the better route is moving it from the blocks: pool into 12000_lush_caves_chests.yml.
  • CAVE_VINES_PLANT, MOSS_CARPET and SPORE_BLOSSOM also cannot survive an update while floating, but they render and drop normally when mined, so they are a much smaller problem.

🤖 Generated with Claude Code

https://claude.ai/code/session_016ijeqd5GdQNHbJQh6MwQyP

Multiface plants were placed with setType, which gives them their default
block data - a state with no face set at all. The client draws that state on
all six sides, so it looked like a lichen cube, but the server treats it as
unsupported: the first block update deletes it, and bone meal has no face to
spread from. Confirmed on Paper 26.2 - a faceless lichen is removed by the
next neighbour update while glow_lichen[down=true] on moss survives. Not one
glow lichen block has ever persisted in a OneBlock world.

Now the plant is attached to whichever neighbours of the magic block have a
full solid face, so it survives, shears drop it and bone meal spreads it. If
the magic block is floating with nothing to cling to - where bone meal would
have nowhere to spread anyway - it becomes the plant's support block and the
plant grows on the first free side of it: lichen lies on the top face, vines
go on a side since they cannot hang off an underside.

Covers GLOW_LICHEN (Lush Caves) and VINE (Mangrove Swamp), plus SCULK_VEIN
and RESIN_CLUMP for custom phases.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ijeqd5GdQNHbJQh6MwQyP
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit 0b008e2 into develop Aug 15, 2026
3 checks passed
@tastybento
tastybento deleted the fix/glow-lichen-attachment branch August 15, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant