mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Fixup luck and random implementation in CB loot-tables (#11926)
This commit is contained in:
@@ -24,13 +24,14 @@
|
||||
}
|
||||
|
||||
public void fill(Container container, LootParams params, long seed) {
|
||||
- LootContext lootContext = new LootContext.Builder(params).withOptionalRandomSeed(seed).create(this.randomSequence);
|
||||
+ // CraftBukkit start
|
||||
+ this.fillInventory(container, params, seed, false);
|
||||
+ this.fill(container, params, seed == 0L ? null : RandomSource.create(seed), false);
|
||||
+ }
|
||||
+
|
||||
+ public void fillInventory(Container container, LootParams params, long seed, boolean plugin) {
|
||||
+ public void fill(Container container, LootParams params, RandomSource randomSource, boolean plugin) {
|
||||
+ // CraftBukkit end
|
||||
LootContext lootContext = new LootContext.Builder(params).withOptionalRandomSeed(seed).create(this.randomSequence);
|
||||
+ LootContext lootContext = new LootContext.Builder(params).withOptionalRandomSource(randomSource).create(this.randomSequence);
|
||||
ObjectArrayList<ItemStack> randomItems = this.getRandomItems(lootContext);
|
||||
RandomSource random = lootContext.getRandom();
|
||||
+ // CraftBukkit start
|
||||
|
Reference in New Issue
Block a user