Fire item_used_on_block for a compass used on a lodestone

Vanilla fires ITEM_USED_ON_BLOCK when a compass locks onto a lodestone (ServerPlayerGameMode via useOn).
This commit is contained in:
Kacpherek committed 2026-10-27 22:08:13 +01:00
1 parent 7aaa4b433b
commit c3e19973cf
1 file changed
+1
+1
View File
@@ -739,6 +739,7 @@ impl Game<'_> {
return false;
}
let at = [x, y, z].map(|v| f64::from(v) + 0.5);
self.trigger_block("minecraft:item_used_on_block", hit.pos, stack);
self.audio
.play("minecraft:item.lodestone_compass.lock", Some(at), 1.0, 1.0);
let target = Tag::compound([(