Skip to content

Add NexoHook for Nexo custom blocks and items#3028

Merged
tastybento merged 2 commits into
developfrom
copilot/add-nexohook-for-nexo-custom-blocks
Jul 11, 2026
Merged

Add NexoHook for Nexo custom blocks and items#3028
tastybento merged 2 commits into
developfrom
copilot/add-nexohook-for-nexo-custom-blocks

Conversation

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

BentoBox ships soft-dependency hooks for custom-item plugins (ItemsAdderHook, OraxenHook, CraftEngineHook) but had none for Nexo, the actively maintained Oraxen successor. This adds NexoHook, unblocking addon-agnostic custom-block generation (e.g. MagicCobblestoneGenerator).

Hook implementation

  • New NexoHook mirroring CraftEngineHook's shape and soft-dependency pattern (hook() checks for the Nexo plugin, no hard compile-time requirement for addons).
  • Static helpers delegate directly to Nexo's NexoBlocks / NexoItems API:
NexoHook.exists("mynamespace:my_block");           // NexoBlocks.isCustomBlock(id)
NexoHook.placeBlock(location, "mynamespace:my_block"); // NexoBlocks.place(blockId, location)
NexoHook.getBlockId(block);                        // NexoBlocks.customBlockMechanic(block).getItemID()
NexoHook.getItemStack("mynamespace:my_item");       // NexoItems.itemFromId(id).build()

Registration

  • BentoBoxHookRegistrar.registerLateHooks() now registers NexoHook alongside the other late-loading custom-item-plugin hooks.

Build

  • Added com.nexomc:nexo compileOnly dependency and the https://repo.nexomc.com/releases Maven repository to build.gradle.kts, following the existing Oraxen/CraftEngine dependency conventions.

Copilot AI changed the title [WIP] Add NexoHook for Nexo custom blocks Add NexoHook for Nexo custom blocks and items Jul 11, 2026
Copilot AI requested a review from tastybento July 11, 2026 18:21
@tastybento tastybento marked this pull request as ready for review July 11, 2026 18:21
@tastybento tastybento merged commit f973209 into develop Jul 11, 2026
1 check failed
@tastybento tastybento deleted the copilot/add-nexohook-for-nexo-custom-blocks branch July 11, 2026 18:23
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.

Add NexoHook for Nexo custom blocks and items

2 participants