Give a partial item pickup the random pitch of a full pickup

This commit is contained in:
Kacpherek
2026-10-26 15:14:43 +01:00
parent 8027cb4176
commit 5b9a66089e
+7 -1
View File
@@ -2390,8 +2390,14 @@ impl Game<'_> {
pickups::Taken::Item(Box::new(item.clone())),
pickups::Collector::Player,
);
// handleTakeItemEntity: the random pitch of a full pickup.
let pitch = ((self.world.random.next_float()
- self.world.random.next_float())
* 0.7
+ 1.0)
* 2.0;
self.audio
.play("minecraft:entity.item.pickup", Some(feet), 0.2, 1.0);
.play("minecraft:entity.item.pickup", Some(feet), 0.2, pitch);
}
item.stack = rest;
}