Skip to content

fix(client): stop copper grates and barriers from culling neighbor faces - #667

Merged
Purdze merged 2 commits into
PommeMC:masterfrom
lazy-importer:fix/copper-grate-face-culling
Oct 8, 2026
Merged

Purdze merged 2 commits into
PommeMC:masterfrom
lazy-importer:fix/copper-grate-face-culling

Conversation

@lazy-importer

Copy link
Copy Markdown
Contributor

What

Placing a copper grate culls the adjacent face of every solid block touching it, leaving a see-through hole instead of the neighbor block's face (visible in the issue screenshot).

Why

Copper grates bake as full cubes, so the mesher treated them as occluders and dropped the neighboring face via registry.occludes_neighbor. In vanilla the whole grate family is noOcclusion/cutout (like glass and ice), so it must never cull a neighbor.

Change

is_non_occluding (pomme-client/src/world/block/model.rs) now covers:

  • all eight grate states (copper_grate, exposed_/weathered_/oxidized_ and their waxed variants) via the _copper_grate suffix
  • barrier, the only other full-cube block that is cutout in vanilla and had the same bug

Existing entries (_leaves, _stained_glass, glass, tinted_glass, ice, frosted_ice) are unchanged; solid lookalikes such as packed_ice/blue_ice still occlude.

Added a regression test asserting the grate family, barrier, and the existing non-occluding set report true, and that stone/oak_planks/copper_block/packed_ice/blue_ice/panes still report false.

Verification

  • cargo test -p pomme-client --bin pomme-client world::block::model — 21 passed
  • cargo clippy -p pomme-client --release --all-targets --all-features -- -D warnings — clean
  • In-game on 26.3 singleplayer: a copper grate placed against stone now shows the stone face through the grate holes, matching glass. Before the fix the stone face was gone.

Fixes #660.

lazy-importer and others added 2 commits October 5, 2026 16:39
Copper grates (all oxidation and waxed states) and barriers bake as full
cubes but are cutout/noOcclusion in vanilla, so the mesher culled the adjacent
face of every solid block touching them and left a see-through hole, most
visible next to a placed copper grate.

Adds the grate family and barrier to is_non_occluding, and a regression test
covering the eight grate states, barrier, the existing glass/ice/leaves sets,
and the solid lookalikes that must keep culling.

Fixes PommeMC#660.
@Purdze
Purdze merged commit ed4d554 into PommeMC:master Oct 8, 2026
10 checks passed
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.

Copper Grates transparency bug

2 participants