mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 17:21:49 -10:00
Data packs: a broken block and a sequence-less shear roll the world's loot tables
Game::block_loot_at rolled the game's own tables when the block's table has a random_sequence, so a world data pack replacing blocks/stone was ignored. Game::sequence_loot did the same for a table without a sequence (dispenser and player shearing, brushing). Both now roll world_items!, as vanilla's reloadableRegistries().getLootTable does. Fixes #6777 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
e12185820a
commit
cc99f96033
2 files changed
+2
-6
No files matched your search
@@ -3794,8 +3794,7 @@ impl Game<'_> {
|
||||
match world_items!(self).block_loot_sequence(registry, state) {
|
||||
Some(sequence) => {
|
||||
let random = self.rand_sequences.get(&sequence, self.level.seed);
|
||||
self.res
|
||||
.items()
|
||||
world_items!(self)
|
||||
.block_drops_by_player(registry, state, held, &dynamic, random)
|
||||
}
|
||||
None => world_items!(self).block_drops_by_player(
|
||||
|
||||
@@ -1746,10 +1746,7 @@ impl Game<'_> {
|
||||
let random = self.rand_sequences.get(&sequence, self.level.seed);
|
||||
world_items!(self).loot_table_from(table, false, held, random)
|
||||
}
|
||||
None => self
|
||||
.res
|
||||
.items()
|
||||
.loot_table(table, false, held, &mut self.world.random),
|
||||
None => world_items!(self).loot_table(table, false, held, &mut self.world.random),
|
||||
}
|
||||
}
|
||||
/// `Entity.spawnAtLocation(level, stack, offset)`: an item at the entity's
|
||||
|
||||
Reference in new issue
Block a user