You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mod replace-hooks Interface.Drop, which vanilla routes through every inventory-drop path: Fast Drop, context-menu Drop, releasing a drag off a grid, closing the inventory while dragging, and overflow paths. That includes the right-click / hotkey delete (discard) action, which is now broken — items that should be destroyed instead get returned to inventory or silently lost.
The mod’s actual intent was narrower: only intercept the two intentional “place in world” actions — looking at something and pressing G, or right-clicking an item in an inventory/container slot and choosing Place. Everything else, including delete, should stay vanilla.
Important clarification: Place (G) and Drop are separate code paths, not the same starter function. Place lives in the Placer system and is already handled by the placer-collided hook. Removing or narrowing the Drop hook will not remove the ability to press G or Place an item. So the trade-off is not “keep Drop hook or lose Place.”
The README already lists the affected paths, but the delete behavior is an unintended side effect, not a documented feature.
For a public learning repo this is the kind of over-broad hook that teaches the wrong lesson: hook the smallest surface that matches your intent, not the shared function everything funnels through.
Suggested approaches
Remove the Drop hook entirely (preferred). Keep only the Placer.Collided hook for the “don’t drop on collision” behavior, and rely on vanilla for all inventory-initiated drops — including delete, which then works again. Place (G) continues to work via the Collided path.
If a narrower hook exists for a specific inventory Drop caller, target that instead of the shared Drop method.
At minimum, detect the delete/discard caller and pass it through to vanilla instead of reimplementing put-back.
Summary
The mod replace-hooks
Interface.Drop, which vanilla routes through every inventory-drop path: Fast Drop, context-menu Drop, releasing a drag off a grid, closing the inventory while dragging, and overflow paths. That includes the right-click / hotkey delete (discard) action, which is now broken — items that should be destroyed instead get returned to inventory or silently lost.The mod’s actual intent was narrower: only intercept the two intentional “place in world” actions — looking at something and pressing G, or right-clicking an item in an inventory/container slot and choosing Place. Everything else, including delete, should stay vanilla.
Important clarification: Place (G) and Drop are separate code paths, not the same starter function. Place lives in the
Placersystem and is already handled by theplacer-collidedhook. Removing or narrowing theDrophook will not remove the ability to press G or Place an item. So the trade-off is not “keep Drop hook or lose Place.”Why this matters
_on_drop: failed Spawn silently drops the item #1, into silent item loss. That is worse than the original bug.Suggested approaches
Drophook entirely (preferred). Keep only thePlacer.Collidedhook for the “don’t drop on collision” behavior, and rely on vanilla for all inventory-initiated drops — including delete, which then works again. Place (G) continues to work via the Collided path.Dropmethod.Related
_on_drop: failed Spawn silently drops the item #1 — item-loss path in_on_drop(the failure mode this over-broad hook makes dangerous)— GrokLuddite on behalf of TechLuddite