diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.java.patch index 86db73a415..215b78b19d 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.java.patch @@ -18,17 +18,17 @@ } } @@ -122,12 +_,14 @@ - public void addAdditionalSaveData(CompoundTag tag) { - super.addAdditionalSaveData(tag); - tag.putInt("Age", this.age); -+ tag.putBoolean("AgeLocked", this.ageLocked); // Paper + public void addAdditionalSaveData(CompoundTag compound) { + super.addAdditionalSaveData(compound); + compound.putInt("Age", this.age); ++ compound.putBoolean("AgeLocked", this.ageLocked); // Paper } @Override - public void readAdditionalSaveData(CompoundTag tag) { - super.readAdditionalSaveData(tag); - this.setAge(tag.getInt("Age")); -+ this.ageLocked = tag.getBoolean("AgeLocked"); // Paper + public void readAdditionalSaveData(CompoundTag compound) { + super.readAdditionalSaveData(compound); + this.setAge(compound.getInt("Age")); ++ this.ageLocked = compound.getBoolean("AgeLocked"); // Paper } @Nullable diff --git a/paper-server/patches/unapplied/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java.patch similarity index 77% rename from paper-server/patches/unapplied/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java.patch rename to paper-server/patches/sources/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java.patch index f97db2bfbc..baa99f7a0b 100644 --- a/paper-server/patches/unapplied/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java.patch @@ -1,10 +1,21 @@ --- a/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java +++ b/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java -@@ -126,9 +126,35 @@ +@@ -32,6 +_,10 @@ + ); + } + }; ++ // Paper start - Configurable LootPool luck formula ++ private Float lastLuck; ++ private int lastWeight; ++ // Paper end - Configurable LootPool luck formula + + protected LootPoolSingletonContainer(int weight, int quality, List conditions, List functions) { + super(conditions); +@@ -126,7 +_,31 @@ protected abstract class EntryBase implements LootPoolEntry { @Override public int getWeight(float luck) { -- return Math.max(Mth.floor((float)LootPoolSingletonContainer.this.weight + (float)LootPoolSingletonContainer.this.quality * luck), 0); +- return Math.max(Mth.floor(LootPoolSingletonContainer.this.weight + LootPoolSingletonContainer.this.quality * luck), 0); + // Paper start - Configurable LootPool luck formula + // SEE: https://luckformula.emc.gs for details and data + if (LootPoolSingletonContainer.this.lastLuck != null && LootPoolSingletonContainer.this.lastLuck == luck) { @@ -29,11 +40,7 @@ + LootPoolSingletonContainer.this.lastLuck = luck; + LootPoolSingletonContainer.this.lastWeight = (int) Math.max(Math.floor(baseWeight), 0); + return lastWeight; ++ // Paper end - Configurable LootPool luck formula } } -+ private Float lastLuck = null; -+ private int lastWeight = 0; -+ // Paper end - Configurable LootPool luck formula - @FunctionalInterface - protected interface EntryConstructor {