Class TradeOffer

java.lang.Object
net.minecraft.village.TradeOffer

public class TradeOffer
extends Object
  • Field Details

    • firstBuyItem

      private final ItemStack firstBuyItem
    • secondBuyItem

      private final ItemStack secondBuyItem
    • sellItem

      private final ItemStack 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

      public TradeOffer​(CompoundTag compoundTag)
    • TradeOffer

      public TradeOffer​(ItemStack buyItem, ItemStack sellItem, int maxUses, int rewardedExp, float priceMultiplier)
    • TradeOffer

      public TradeOffer​(ItemStack firstBuyItem, ItemStack secondBuyItem, ItemStack sellItem, int maxUses, int rewardedExp, float priceMultiplier)
    • TradeOffer

      public TradeOffer​(ItemStack firstBuyItem, ItemStack secondBuyItem, ItemStack sellItem, int uses, int maxUses, int rewardedExp, float priceMultiplier)
    • TradeOffer

      public TradeOffer​(ItemStack itemStack, ItemStack itemStack2, ItemStack itemStack3, int int2, int int3, int int4, float float2, int int5)
  • Method Details

    • getOriginalFirstBuyItem

      public ItemStack getOriginalFirstBuyItem()
    • getAdjustedFirstBuyItem

      public ItemStack getAdjustedFirstBuyItem()
    • getSecondBuyItem

      public ItemStack getSecondBuyItem()
    • getMutableSellItem

      public ItemStack getMutableSellItem()
    • updatePriceOnDemand

      public void updatePriceOnDemand()
    • getSellItem

      public ItemStack 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

      public CompoundTag toTag()
    • matchesBuyItems

      public boolean matchesBuyItems​(ItemStack first, ItemStack second)
    • acceptsBuy

      private boolean acceptsBuy​(ItemStack given, ItemStack sample)
    • depleteBuyItems

      public boolean depleteBuyItems​(ItemStack itemStack, ItemStack itemStack2)