// Refactor how Loot bonus applies - | |
// V PCT = Vanilla Percent Chance, M PCT = Modified Percent Chance | |
/* base in these tables does not include vanilla quality modifer in this table, but does in code | |
BASE IMPACTED REDUCED V PCT M PCT PCT CHANGE | |
ITEM 1 400 12 388 26.67 27.75 1.087 | |
ITEM 2 100 0 100 6.67 7.15 0.486 | |
ITEM 3 1000 90 910 66.67 65.09 -1.574 | |
TOTAL 1500 1398 | |
LUCK (*10) 100 | |
BASE IMPACTED REDUCED V PCT M PCT PCT CHANGE | |
ITEM 1 4000 1560 3220 31.74 39.03 7.284 | |
ITEM 2 100 0 100 0.79 1.21 0.418 | |
ITEM 3 8500 7140 4930 67.46 59.76 -7.703 | |
TOTAL 12600 8250 | |
LUCK (*10) 50 | |
*/ | |
public int getEffectiveWeight(float luck) | |
{ | |
// This is vanilla | |
float qualityModifer = (float) this.getQuality() * luck; | |
// Random boost to avoid losing precision in the final int cast on return | |
final int weightBoost = 100; | |
// This is vanilla * our weight boost | |
double baseWeight = (this.getWeight() + qualityModifer) * weightBoost; | |
// If we have vanilla 1, bump that down to 0 so nothing is is impacted | |
// vanilla 3 = 300, 200 basis = impact 2% | |
// =($B2*(($B2-100)/100/100)) | |
double impacted = baseWeight * ((baseWeight - weightBoost) / weightBoost / 100); | |
// =($B$7/100) | |
float luckModifier = Math.min(100, luck * 10) / 100; | |
// =B2 - (C2 *($B$7/100)) | |
double reduced = Math.ceil(baseWeight - (impacted * luckModifier)); | |
return (int) Math.max(0, reduced); | |
} |
This comment has been minimized.
This comment has been minimized.
because mob loot pools have very little variance in weight, it does not impact them much unless mojang adds a higher weight item to pool: 300 witches no luck results from chests was greatly seen. 1 book out of 30 and 1 chest with 2 diamonds out of 30 with no luck |
This comment has been minimized.
This comment has been minimized.
luck 3 30 chests, 7 diamond chest, 1 book (book is rarer) Note there are other 'rare' items in the pool that are generating I havent even been counting |
This comment has been minimized.
Spreadsheet: https://docs.google.com/spreadsheets/d/1Mprek1gIlx9Hh3JyfrBq-Qoim8dHeMhBlOHOanPz4Y4/edit?usp=sharing








Fishing on Luck 10 (note: vanilla Luck 5 stops Junk)
Fishing on Luck 7 (note: vanilla Luck 5 stops Junk)
Fishing on Luck 4:
Fishing on Luck 3 (Luck of the Sea 3:
Fishing without Luck (Vanilla Pcts)