Skip to content

Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.

Merge pull request #6550 from MSedgeMC/fix/mm-crafted-only

Ludovic Marieae3f35dc32b8
diff --cc crates/horizon-client/src/game/native_hooks.rs
index 2e30776f6,3f085f6f1..e0ad64674
--- a/crates/horizon-client/src/game/native_hooks.rs
+++ b/crates/horizon-client/src/game/native_hooks.rs
@@@ -3542,8 -3501,19 +3542,19 @@@ impl Game<'_>
count: u32,
canceled: &mut bool,
) {
- let _ = (player, item, count, canceled);
+ mod_api::dispatch_item_picked_up(self, mod_api::mods(), player, item, count, canceled);
}
+ /// A player took a crafting grid's result (`ResultSlot.onTake`, NeoForge's
+ /// `PlayerEvent.ItemCraftedEvent`): `player` is the player's uuid, `recipe`
+ /// the recipe the grid matched (`minecraft:oak_planks`) and `stack` the
+ /// result it took, with its components. It only hears: the take has
+ /// already happened. It fires for the crafting grid of an inventory or a
+ /// crafting table, on the integrated server and a dedicated server, guests
+ /// included, and not for a stonecutter's, a smithing table's or a
+ /// furnace's result. Server-side. API @API:item_crafted@.
+ pub(super) fn native_item_crafted(&mut self, player: u128, recipe: &str, stack: &ItemStack) {
+ let _ = (player, recipe, stack);
+ }
/// Whether a mod hears `native_experience_orb_pickup`: set `listened`
/// (a HEAD injection), or the server skips swapping the player in for it,
/// and with this empty the pickup costs nothing more without mods.