Class MerchantOffer

java.lang.Object
net.minecraft.world.item.trading.MerchantOffer

public class MerchantOffer extends Object
  • Field Details

    • baseCostA

      private final ItemStack baseCostA
    • costB

      private final ItemStack costB
    • result

      private final ItemStack result
    • uses

      private int uses
    • maxUses

      private final int maxUses
    • rewardExp

      private boolean rewardExp
    • specialPriceDiff

      private int specialPriceDiff
    • demand

      private int demand
    • priceMultiplier

      private float priceMultiplier
    • xp

      private int xp
  • Constructor Details

    • MerchantOffer

      public MerchantOffer(CompoundTag p_45351_)
    • MerchantOffer

      public MerchantOffer(ItemStack p_45321_, ItemStack p_45322_, int p_45323_, int p_45324_, float p_45325_)
    • MerchantOffer

      public MerchantOffer(ItemStack p_45327_, ItemStack p_45328_, ItemStack p_45329_, int p_45330_, int p_45331_, float p_45332_)
    • MerchantOffer

      public MerchantOffer(ItemStack p_45334_, ItemStack p_45335_, ItemStack p_45336_, int p_45337_, int p_45338_, int p_45339_, float p_45340_)
    • MerchantOffer

      public MerchantOffer(ItemStack p_45342_, ItemStack p_45343_, ItemStack p_45344_, int p_45345_, int p_45346_, int p_45347_, float p_45348_, int p_45349_)
  • Method Details

    • getBaseCostA

      public ItemStack getBaseCostA()
    • getCostA

      public ItemStack getCostA()
    • getCostB

      public ItemStack getCostB()
    • getResult

      public ItemStack getResult()
    • updateDemand

      public void updateDemand()
    • assemble

      public ItemStack assemble()
    • getUses

      public int getUses()
    • resetUses

      public void resetUses()
    • getMaxUses

      public int getMaxUses()
    • increaseUses

      public void increaseUses()
    • getDemand

      public int getDemand()
    • addToSpecialPriceDiff

      public void addToSpecialPriceDiff(int p_45354_)
    • resetSpecialPriceDiff

      public void resetSpecialPriceDiff()
    • getSpecialPriceDiff

      public int getSpecialPriceDiff()
    • setSpecialPriceDiff

      public void setSpecialPriceDiff(int p_45360_)
    • getPriceMultiplier

      public float getPriceMultiplier()
    • getXp

      public int getXp()
    • isOutOfStock

      public boolean isOutOfStock()
    • setToOutOfStock

      public void setToOutOfStock()
    • needsRestock

      public boolean needsRestock()
    • shouldRewardExp

      public boolean shouldRewardExp()
    • createTag

      public CompoundTag createTag()
    • satisfiedBy

      public boolean satisfiedBy(ItemStack p_45356_, ItemStack p_45357_)
    • isRequiredItem

      private boolean isRequiredItem(ItemStack p_45366_, ItemStack p_45367_)
    • take

      public boolean take(ItemStack p_45362_, ItemStack p_45363_)