Skip to content

draw the block outline and empty the inventory on a shift-clicked creative trash slot - #864

Merged
Purdze merged 3 commits into
masterfrom
issue-776-quick-wins
Nov 1, 2026
Merged

Purdze merged 3 commits into
masterfrom
issue-776-quick-wins

Conversation

@Purdze

@Purdze Purdze commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / code cleanup
  • Performance improvement
  • Chore / tooling
  • Documentation

Summary

two items from #776:

  • block highlight missing: the targeted block now gets its outline. the outline shape's edges come from a port of VoxelShape.forAllEdges (collinear edges merged, so stairs and fences have no seams) and draw as screen-space quads like rendertype_lines, max(2.5, width/1920*2.5) px wide, black at 40% alpha. hidden with f1; in spectator only on blocks with a menu or portals; hidden in adventure for now. spectators also get the crosshair on those blocks (Hud.canRenderCrosshairForSpectator)
  • shift click delete item doesnt delete all items: shift-clicking the creative trash slot empties all 46 inventory slots and keeps the carried stack

the harness gains modifiers = { shift = true } and hover = { tab = ... } / hover = { trash = true } for the trash script.

todo left: adventure-mode can_break/can_place_on outlines, drawing the outline after translucent terrain for translucent blocks, the high-contrast outline option, the outline under a shader pack, and picking from a spectated entity (nothing is targeted while spectating one).

Reference

LevelExtractor.extractBlockOutline, LevelRenderer.submitBlockOutline, GameRenderer.shouldRenderBlockOutline, Hud.canRenderCrosshairForSpectator, ShapeOutlineFeatureRenderer, VoxelShape/DiscreteVoxelShape.forAllEdges, RenderPipelines.LINES_TRANSLUCENT, rendertype_lines.vsh, Window.getAppropriateLineWidth, BlockBehaviour.showAsInteractableInSpectatorMode, CreativeModeInventoryScreen.slotClicked

Testing

  • new blocks/block_outline and items/creative_trash; the outline shots line up with vanilla's in the parity harness (stone, slab, stairs, fence, f1, spectator)
  • full just ingame-test passes
  • unit tests for the edge merging and the trash click

@github-actions github-actions Bot added the bug Something isn't working label Nov 1, 2026
@Purdze
Purdze merged commit f35eeb9 into master Nov 1, 2026
13 checks passed
@Purdze
Purdze deleted the issue-776-quick-wins branch November 1, 2026 21:17
@Purdze Purdze mentioned this pull request Nov 1, 2026
marie-bnl pushed a commit to marie-bnl/PommeMC-Client that referenced this pull request Nov 2, 2026
…ative trash slot (PommeMC#864)

* draw the block outline and empty the inventory on a shift-clicked creative trash slot

* draw the outline after entities, hide it while spectating a mob and show the spectator crosshair on interactable blocks

* take the outline and spectator crosshair target from the camera and note the pack outline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant