Update to Minecraft 1.20

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-06-08 01:30:00 +10:00
parent bac55e67d6
commit 9d740b84b0
269 changed files with 2605 additions and 2568 deletions

View File

@@ -32,15 +32,15 @@
public MerchantRecipe(NBTTagCompound nbttagcompound) {
this.rewardExp = true;
@@ -78,6 +96,7 @@
@@ -81,6 +99,7 @@
return ItemStack.EMPTY;
} else {
int i = this.baseCostA.getCount();
+ if (i <= 0) return ItemStack.EMPTY; // CraftBukkit - SPIGOT-5476
int j = Math.max(0, MathHelper.floor((float) (i * this.demand) * this.priceMultiplier));
public ItemStack getCostA() {
int i = this.baseCostA.getCount();
+ if (i <= 0) return ItemStack.EMPTY; // CraftBukkit - SPIGOT-5476
ItemStack itemstack = this.baseCostA.copy();
int j = Math.max(0, MathHelper.floor((float) (i * this.demand) * this.priceMultiplier));
@@ -199,7 +218,11 @@
return this.baseCostA.copyWithCount(MathHelper.clamp(i + j + this.specialPriceDiff, 1, this.baseCostA.getItem().getMaxStackSize()));
@@ -201,7 +220,11 @@
if (!this.satisfiedBy(itemstack, itemstack1)) {
return false;
} else {