Skip to content

feat: add CraftEngine custom block support for island level calculation#419

Open
tastybento wants to merge 1 commit intodevelopfrom
feat/craftengine-hook
Open

feat: add CraftEngine custom block support for island level calculation#419
tastybento wants to merge 1 commit intodevelopfrom
feat/craftengine-hook

Conversation

@tastybento
Copy link
Copy Markdown
Member

Summary

  • Adds CraftEngine block detection to processBlock() alongside ItemsAdder, Oraxen, and Nexo
  • Adds isCraftEngine() to Level.java following the same pattern as isItemsAdder() / isNexo()
  • Validates CraftEngine block IDs in BlockConfig.isOther() so admins can configure point values in blockconfig.yml
  • Bumps bentobox.version to 3.15.0-SNAPSHOT (requires feat: add CraftEngineHook for centralised custom block support BentoBox#2952)

How it works

CraftEngine blocks are identified by their native namespaced ID (e.g. mynamespace:my_block). In blockconfig.yml admins assign values using those IDs directly:

blocks:
  mynamespace:my_block: 50
  mynamespace:custom_ore: 3

CraftEngine can be excluded from level calculation by adding CraftEngine to disabled-plugin-hooks in the Level config.

Context

Requested in issue #418. BentoBoxWorld/BentoBox#2952 adds the CraftEngineHook that this PR uses — no direct CraftEngine compile dependency is needed in Level.

Depends on: BentoBoxWorld/BentoBox#2952

Test plan

  • Island with CraftEngine blocks → blocks counted with configured point values
  • disabled-plugin-hooks: [CraftEngine] in config → CE blocks ignored (counted as vanilla material)
  • Server without CraftEngine → no errors, CE check silently skipped
  • Custom CE block IDs accepted in blockconfig.yml; invalid IDs rejected with log warning
  • Existing ItemsAdder / Oraxen / Nexo detection unaffected

🤖 Generated with Claude Code

Adds CraftEngine block detection to processBlock() alongside ItemsAdder,
Oraxen, and Nexo. CraftEngine blocks are counted using their native
namespaced ID (e.g. mynamespace:my_block) and can be assigned point
values in blockconfig.yml. Adds isCraftEngine() to Level and validates
CE block IDs in BlockConfig.isOther(). Requires BentoBox 3.15.0-SNAPSHOT.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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