Skip to content

[Bug]: Auto pickup protection not working with OrbisGuard-Mixins #13

@derrickmehaffy

Description

@derrickmehaffy

Plugin Version

0.6.0

Operating System

Linux (Debian/Ubuntu)

Bug Description

Auto pickup of floating items (walking over dropped items) is not being blocked in SafeZones even when the ITEM_PICKUP flag is set to OFF.

The PlayerItemEntityPickupSystemMixin from OrbisGuard-Mixins is not being triggered, despite:

  • HyperFactions correctly registering the pickup hook in orbisguard.hook.registry
  • Other OrbisGuard mixins (durability, death, harvest) working correctly
  • Hyxin loading OrbisGuard-Mixins properly

Evidence:

  • orbisguard.mixin.pickup.loaded = null (should be true if mixin loaded)
  • No logs from the pickup hook's check() method when picking up items
  • Other mixin properties ARE set (e.g., orbisguard.mixins.loaded = true)

Steps to Reproduce

  1. Create a SafeZone with /f admin zone create test safezone
  2. Set item pickup flag OFF: /f admin zone flag test item_pickup false
  3. Enable admin bypass and drop an item in the zone
  4. Disable admin bypass (/f admin bypass)
  5. Walk over the dropped item
  6. Item is picked up despite flag being OFF

Expected Behavior

Walking over dropped items in a SafeZone with ITEM_PICKUP: false should NOT pick up the item. The PlayerItemEntityPickupSystemMixin should intercept the pickup and call HyperFactions' registered hook to check permissions.

Logs

[HyperFactions] Registry state at startup:
  orbisguard.mixins.loaded = true
  orbisguard.mixin.pickup.loaded = null    <-- Should be "true"
  orbisguard.mixin.harvest.loaded = true
  orbisguard.mixin.durability.loaded = true

No pickup hook logs appear when walking over items (hook is never called).

Code Snippets

Hook registration in OrbisMixinsIntegration.java:

PickupHookWrapper hook = new PickupHookWrapper(callback);
registry.put(PICKUP_HOOK_KEY, hook);
Logger.info("Registered pickup hook with OrbisGuard-Mixins");

Mixin configuration in orbisguard-mixins.mixins.json:

{
  "mixins": [
    "PlayerItemEntityPickupSystemMixin",
    ...
  ]
}

Additional Information

What Works:

  • ✅ F-key pickup protection (via InteractivelyPickupItemEvent)
  • ✅ Block harvest drop protection (via BlockHarvestUtilsMixin)
  • ✅ Crop/berry harvest protection (via BlockUseProtectionSystem)
  • ✅ Item drop protection (via ItemDropProtectionSystem)

What Doesn't Work:

  • ❌ Auto pickup of floating items

Dependencies:

  • OrbisGuard-Mixins v0.7.7
  • Hyxin v0.0.11

Possible Causes:

  1. Mixin injection point mismatch (method signature changed in server update?)
  2. Class loading order issue
  3. Hyxin not transforming this specific class

Workaround: None - auto pickup cannot be blocked without the mixin working. Requires coordination with OrbisGuard developers.

Confirmation Checklist

  • I have checked the existing issues for duplicates.
  • I agree to follow this project's Code of Conduct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions