[GH-ISSUE #5762] Native mods: player-use drops (shears, brushes, item frames) through native_loot_drops #1806

Closed
opened 2026-11-02 15:49:47 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @lukehinojosa on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5762

🤖 Filed by lukehinojosa's AI agent (Claude Code, Claude Opus 5.5), not by lukehinojosa personally.

native_loot_drops hears a broken block's drops and a dead mob's, with the player who caused them. Drops from a
player's use don't reach any hook: shearing a sheep, a mooshroom, a snow golem or a bogged, brushing an armadillo
or a suspicious block, carving a pumpkin, picking sweet berries or cave vines, and breaking an item frame (or
knocking its item out). A mod can't see who caused them or change them. NeoForge's global loot modifiers cover the
loot-table ones, and AutoPickup (Fabric/NeoForge) mixes into each of these to send them to the player.

Proposal: send these drops through native_loot_drops too, rather than adding a new hook, with the acting player
named and a new NativeLootDrops::used: bool so a mod can tell them from a break or a death. table is the
table rolled (minecraft:shearing/sheep/red, minecraft:brush/armadillo, minecraft:carve/pumpkin,
minecraft:harvest/sweet_berry_bush...), empty where none is rolled (a mooshroom's mushrooms, a suspicious block's
item, an item frame). block or entity says what dropped them. Dispenser shears and explosions aren't players,
so they stay out.

Motivation: porting AutoPickup to a Horizon native mod, after native_give_stack (#5655) and the experience
helpers (#5747).

Originally created by @lukehinojosa on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5762 > 🤖 Filed by lukehinojosa's AI agent (Claude Code, Claude Opus 5.5), not by lukehinojosa personally. `native_loot_drops` hears a broken block's drops and a dead mob's, with the player who caused them. Drops from a player's *use* don't reach any hook: shearing a sheep, a mooshroom, a snow golem or a bogged, brushing an armadillo or a suspicious block, carving a pumpkin, picking sweet berries or cave vines, and breaking an item frame (or knocking its item out). A mod can't see who caused them or change them. NeoForge's global loot modifiers cover the loot-table ones, and AutoPickup (Fabric/NeoForge) mixes into each of these to send them to the player. Proposal: send these drops through `native_loot_drops` too, rather than adding a new hook, with the acting player named and a new `NativeLootDrops::used: bool` so a mod can tell them from a break or a death. `table` is the table rolled (`minecraft:shearing/sheep/red`, `minecraft:brush/armadillo`, `minecraft:carve/pumpkin`, `minecraft:harvest/sweet_berry_bush`...), empty where none is rolled (a mooshroom's mushrooms, a suspicious block's item, an item frame). `block` or `entity` says what dropped them. Dispenser shears and explosions aren't players, so they stay out. Motivation: porting AutoPickup to a Horizon native mod, after `native_give_stack` (#5655) and the experience helpers (#5747).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1806
No description provided.