Skip to content

feat(hooks): add CraftEngineHook.getItemId(item) lookup#2973

Merged
tastybento merged 1 commit intodevelopfrom
feat/craftengine-item-helpers
May 9, 2026
Merged

feat(hooks): add CraftEngineHook.getItemId(item) lookup#2973
tastybento merged 1 commit intodevelopfrom
feat/craftengine-item-helpers

Conversation

@tastybento
Copy link
Copy Markdown
Member

Summary

  • Adds CraftEngineHook.getItemId(ItemStack) returning the namespaced ID of a held CraftEngine custom item, or null when the item is not a CraftEngine custom item.
  • Mirrors the existing getItemStack(id) helper (added in 9d3715a) so addons can map both directions without depending on CraftEngine directly.

Why

Needed for the Level addon fix to issue BentoBoxWorld/Level#428. The addon's /is value hand command and value-panel icon lookup both need to recognize a held CraftEngine item; without this helper they fall back to the vanilla material (PAPER) and report "no value".

Test plan

  • ./gradlew compileJava passes
  • CI test suite green

Mirrors the recently-added getItemStack(id) helper. Lets addon command
handlers (e.g. /is value hand in Level addon) recognize a held
CraftEngine custom item without depending on CraftEngine directly.

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

sonarqubecloud Bot commented May 9, 2026

@tastybento tastybento merged commit 9a2045c into develop May 9, 2026
3 checks passed
@tastybento tastybento deleted the feat/craftengine-item-helpers branch May 9, 2026 22:04
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