Package net.minecraft.village
Class TradeOffer
java.lang.Object
net.minecraft.village.TradeOffer
public class TradeOffer extends Object
-
Field Summary
Fields Modifier and Type Field Description private int
demandBonus
private ItemStack
firstBuyItem
private int
maxUses
private int
merchantExperience
private float
priceMultiplier
private boolean
rewardingPlayerExperience
private ItemStack
secondBuyItem
private ItemStack
sellItem
private int
specialPrice
private int
uses
-
Constructor Summary
Constructors Constructor Description TradeOffer(ItemStack buyItem, ItemStack sellItem, int maxUses, int rewardedExp, float priceMultiplier)
TradeOffer(ItemStack firstBuyItem, ItemStack secondBuyItem, ItemStack sellItem, int maxUses, int rewardedExp, float priceMultiplier)
TradeOffer(ItemStack firstBuyItem, ItemStack secondBuyItem, ItemStack sellItem, int uses, int maxUses, int rewardedExp, float priceMultiplier)
TradeOffer(ItemStack itemStack, ItemStack itemStack2, ItemStack itemStack3, int int2, int int3, int int4, float float2, int int5)
TradeOffer(CompoundTag compoundTag)
-
Method Summary
Modifier and Type Method Description private boolean
acceptsBuy(ItemStack given, ItemStack sample)
void
clearSpecialPrice()
void
clearUses()
boolean
depleteBuyItems(ItemStack itemStack, ItemStack itemStack2)
ItemStack
getAdjustedFirstBuyItem()
int
getDemandBonus()
int
getMaxUses()
int
getMerchantExperience()
ItemStack
getMutableSellItem()
ItemStack
getOriginalFirstBuyItem()
float
getPriceMultiplier()
ItemStack
getSecondBuyItem()
ItemStack
getSellItem()
int
getSpecialPrice()
int
getUses()
void
increaseSpecialPrice(int int2)
boolean
isDisabled()
boolean
matchesBuyItems(ItemStack first, ItemStack second)
boolean
method_21834()
void
resetUses()
void
setSpecialPrice(int int2)
boolean
shouldRewardPlayerExperience()
CompoundTag
toTag()
void
updatePriceOnDemand()
void
use()
-
Field Details
-
firstBuyItem
-
secondBuyItem
-
sellItem
-
uses
private int uses -
maxUses
private final int maxUses -
rewardingPlayerExperience
private boolean rewardingPlayerExperience -
specialPrice
private int specialPrice -
demandBonus
private int demandBonus -
priceMultiplier
private float priceMultiplier -
merchantExperience
private int merchantExperience
-
-
Constructor Details
-
TradeOffer
-
TradeOffer
-
TradeOffer
-
TradeOffer
-
TradeOffer
-
-
Method Details
-
getOriginalFirstBuyItem
-
getAdjustedFirstBuyItem
-
getSecondBuyItem
-
getMutableSellItem
-
updatePriceOnDemand
public void updatePriceOnDemand() -
getSellItem
-
getUses
public int getUses() -
resetUses
public void resetUses() -
getMaxUses
public int getMaxUses() -
use
public void use() -
getDemandBonus
public int getDemandBonus() -
increaseSpecialPrice
public void increaseSpecialPrice(int int2) -
clearSpecialPrice
public void clearSpecialPrice() -
getSpecialPrice
public int getSpecialPrice() -
setSpecialPrice
public void setSpecialPrice(int int2) -
getPriceMultiplier
public float getPriceMultiplier() -
getMerchantExperience
public int getMerchantExperience() -
isDisabled
public boolean isDisabled() -
clearUses
public void clearUses() -
method_21834
public boolean method_21834() -
shouldRewardPlayerExperience
public boolean shouldRewardPlayerExperience() -
toTag
-
matchesBuyItems
-
acceptsBuy
-
depleteBuyItems
-