Merge pull request #2238 from kacpherek/fix/partial-pickup-pitch
🤖 Agent: Read against the vanilla 26.3 sources (Give a partial item pickup the random pitch of a full pickup) and proven in contrib-gate-21's union of 72 kacpherek PRs: 95 parity harnesses on playhorizon and the Mac mini, clippy, 1534 tests, lan_e2e 23 checks in-frame and with --server-thread. Thanks @kacpherek!
This commit is contained in:
@@ -2618,8 +2618,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user