mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-09-18 21:54:50 +00:00
SPIGOT-5476: Fix trading empty items
This commit is contained in:
parent
8073dbec7a
commit
7d677e7b13
1 changed files with 8 additions and 0 deletions
|
@ -27,3 +27,11 @@
|
||||||
|
|
||||||
public MerchantRecipe(NBTTagCompound nbttagcompound) {
|
public MerchantRecipe(NBTTagCompound nbttagcompound) {
|
||||||
this.rewardExp = true;
|
this.rewardExp = true;
|
||||||
|
@@ -73,6 +87,7 @@
|
||||||
|
|
||||||
|
public ItemStack getBuyItem1() {
|
||||||
|
int i = this.buyingItem1.getCount();
|
||||||
|
+ if (i <= 0) return ItemStack.a; // CraftBukkit - SPIGOT-5476
|
||||||
|
ItemStack itemstack = this.buyingItem1.cloneItemStack();
|
||||||
|
int j = Math.max(0, MathHelper.d((float) (i * this.demand) * this.priceMultiplier));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue