-
-
Notifications
You must be signed in to change notification settings - Fork 629
Add support for Shelf item logging #833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Remove project branch definition from properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| // log center | ||
| InventoryChangeListener.inventoryTransaction(player.getName(), center.getLocation(), null); | ||
|
|
||
| if (center instanceof Shelf && ((Shelf)center.getBlockData()).getSideChain() != ChainPart.CENTER){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Type mismatch causes instanceof check to always fail
The check center instanceof Shelf will always evaluate to false because center is a Block while Shelf is a BlockData interface. These are incompatible types in Bukkit's API. The condition likely intended to check center.getBlockData() instanceof Shelf instead. This causes the code to always take the else branch, incorrectly logging left and right shelf blocks even when only a chain of 2 shelves exists.
|
@guss-alberto Please review the above, and test/confirm desired behavior once resolved. |
Note
Adds 1.21 shelf detection and chain-aware item transaction logging, exposing new shelf utilities in the Bukkit interface and adapter.
BukkitInterface): AddisShelf(Material)andshelfMaterials().BukkitAdapter): Provide stub implementations forisShelfandshelfMaterials.Bukkit_v1_21):SHELVESset fromTag.WOODEN_SHELVES, implementisShelfandshelfMaterials.shelfMaterials()toBlockGroup.CONTAINERSduring initialization.implements BukkitInterfaceexplicitly.PlayerInteractListener):InventoryChangeListener.inventoryTransactionfor the correct block(s).Written by Cursor Bugbot for commit c07221d. This will update automatically on new commits. Configure here.