even even even more work

This commit is contained in:
MiniDigger | Martin
2020-06-25 16:09:55 +02:00
parent 4aa7955818
commit e943ece469
125 changed files with 857 additions and 3512 deletions

View File

@@ -60,12 +60,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public abstract class LootSelectorEntry extends LootEntryAbstract {
- protected final int c;
- protected final int e;
- protected final int f;
+ protected final int e; public int getWeight() { return e; } // Paper - OBFHELPER
+ protected final int f; public int getQuality() { return f; } // Paper - OBFHELPER
protected final LootItemFunction[] g;
private final BiFunction<ItemStack, LootTableInfo, ItemStack> c;
+ protected final int c; public int getWeight() { return c; } // Paper - OBFHELPER
+ protected final int e; public int getQuality() { return e; } // Paper - OBFHELPER
protected final LootItemFunction[] f;
private final BiFunction<ItemStack, LootTableInfo, ItemStack> g;
private final LootEntry h = new LootSelectorEntry.c() {
@@ -0,0 +0,0 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
@@ -77,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Override
public int a(float f) {
- return Math.max(MathHelper.d((float) LootSelectorEntry.this.e + (float) LootSelectorEntry.this.f * f), 0);
- return Math.max(MathHelper.d((float) LootSelectorEntry.this.c + (float) LootSelectorEntry.this.e * f), 0);
+ // Paper start - Offer an alternative loot formula to refactor how luck bonus applies
+ // SEE: https://luckformula.emc.gs for details and data
+ if (lastLuck != null && lastLuck == f) {
@@ -104,7 +104,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return lastWeight;
}
}
+ private Float lastLuck = null;
+ private int lastWeight = 0;
+ // Paper end
+ private Float lastLuck = null;
+ private int lastWeight = 0;
+ // Paper end
}