Add Nexo custom block and furniture support for island levelling#398
Merged
tastybento merged 1 commit intodevelopfrom Feb 20, 2026
Merged
Add Nexo custom block and furniture support for island levelling#398tastybento merged 1 commit intodevelopfrom
tastybento merged 1 commit intodevelopfrom
Conversation
…ion #389 Nexo is the successor to Oraxen and has its own API for custom blocks and furniture. This adds full support for both: Custom blocks (noteblock, stringblock, chorusblock mechanics): - NexoBlocks.customBlockMechanic(Location) detects any Nexo custom block at a location during the async chunk scan, counted as "nexo:<id>" - NexoItems.exists/idFromItem detects Nexo items inside containers Furniture mechanic: - After the block scan, NexoFurniture.furnitureMechanic(Entity) scans entities in each island chunk; entities with a non-null mechanic are the furniture base entities and are counted as "nexo:<id>" Configuration: - Values are set in blockconfig.yml using the item ID, e.g.: nexo:my_chair: 5 - isNexo() helper in Level respects the disabled-plugin-hooks config list - BlockConfig.isOther() validates nexo: keys via NexoItems.exists() - Utils.prettifyObject() strips the nexo: prefix for display names Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9486d83 to
6b224dc
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Closes #389
Nexo is the successor to Oraxen and ships its own API (
com.nexomc:nexo). This PR adds full support for all Nexo custom-block mechanics and furniture so they contribute to island level calculations.Custom blocks (noteblock / stringblock / chorusblock mechanics)
NexoBlocks.customBlockMechanic(Location)is called inprocessBlock()alongside the existing ItemsAdder and Oraxen checks. If a Nexo custom block is found at a location it is counted as"nexo:<itemId>"and the method returns early (no double-counting with the vanilla block beneath).NexoItems.idFromItem(ItemStack)is checked incountItemStack()so Nexo items inside containers are counted when chest-scanning is enabled.Furniture mechanic
ItemDisplayentities rather than blocks, so it is invisible to the chunk block scanner.handleNexoFurniture()step iterates entities in every island chunk.NexoFurniture.furnitureMechanic(entity)returning non-null identifies the furniture's base entity; each such entity within the island's protected bounds is counted as"nexo:<itemId>".Other changes
pom.xml– Nexo repository andprovided-scoped dependency added (withtriumph-guiexcluded to avoid a transitive resolution failure).Level.isNexo()– convenience helper that checks the plugin is enabled and not in the disabled-plugin-hooks list.BlockConfig.isOther()– validatesnexo:prefixed keys viaNexoItems.exists().Utils.prettifyObject()– strips thenexo:prefix before looking up display names, mirroring the existingoraxen:handling.Configuration
Values are set in
blockconfig.ymlusing the Nexo item ID, exactly like Oraxen:To disable Nexo integration entirely, add
Nexotodisabled-plugin-hooksinconfig.yml.Test plan
/is level— they should contribute to the level./is level— furniture should contribute to the level.include-chests: true.🤖 Generated with Claude Code