Skip to content

Fix custom-block icon and display name in value panel (#426)#427

Merged
tastybento merged 1 commit intodevelopfrom
fix/426-custom-block-icon-and-name
May 8, 2026
Merged

Fix custom-block icon and display name in value panel (#426)#427
tastybento merged 1 commit intodevelopfrom
fix/426-custom-block-icon-and-name

Conversation

@tastybento
Copy link
Copy Markdown
Member

Summary

  • Fixes Paper instead of a block #426: the /is value panel rendered Oraxen / Nexo / ItemsAdder blocks as Material.PAPER with the prettified config key as the name
  • ValuePanel now looks up the real custom-block ItemStack from the plugin's registry and uses it as the icon (so the texture / model data is preserved) and uses the item's ItemMeta display name when present
  • Extracted the getCustomBlockItemStack lookup (already in DetailsPanel) plus a new getCustomBlockDisplayName helper into Utils so both panels share the same logic

CraftEngine custom blocks still fall back to Material.PAPER because CraftEngineHook in BentoBox core does not yet expose an item-by-id lookup — that's a separate change in BentoBox.

Test plan

  • mvn test — 216 tests pass
  • In-game: /is value panel shows correct icon and display name for Oraxen blocks
  • In-game: /is value panel shows correct icon and display name for Nexo blocks
  • In-game: /is value panel shows correct icon and display name for ItemsAdder blocks
  • Vanilla blocks still render unchanged

🤖 Generated with Claude Code

The /is value panel rendered Oraxen/Nexo/ItemsAdder blocks as paper with
the prettified config key as the name. Look up the real ItemStack from
the plugin's registry and use it as the icon, plus the item meta display
name when present. Lookup helper is extracted to Utils so DetailsPanel
and ValuePanel share it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@tastybento tastybento merged commit beb7134 into develop May 8, 2026
3 checks passed
@tastybento tastybento deleted the fix/426-custom-block-icon-and-name branch May 8, 2026 22:37
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.

Paper instead of a block

1 participant