类 MerchantOffer

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

public class MerchantOffer extends Object
  • 字段详细资料

    • 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
  • 构造器详细资料

    • MerchantOffer

      public MerchantOffer(CompoundTag pCompoundTag)
    • MerchantOffer

      public MerchantOffer(ItemStack pBaseCostA, ItemStack pResult, int pMaxUses, int pXp, float pPriceMultiplier)
    • MerchantOffer

      public MerchantOffer(ItemStack pBaseCostA, ItemStack pCostB, ItemStack pResult, int pMaxUses, int pXp, float pPriceMultiplier)
    • MerchantOffer

      public MerchantOffer(ItemStack pBaseCostA, ItemStack pCostB, ItemStack pResult, int pUses, int pMaxUses, int pXp, float pPriceMultiplier)
    • MerchantOffer

      public MerchantOffer(ItemStack pBaseCostA, ItemStack pCostB, ItemStack pResult, int pUses, int pMaxUses, int pXp, float pPriceMultiplier, int pDemand)
  • 方法详细资料

    • 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 pAdd)
    • resetSpecialPriceDiff

      public void resetSpecialPriceDiff()
    • getSpecialPriceDiff

      public int getSpecialPriceDiff()
    • setSpecialPriceDiff

      public void setSpecialPriceDiff(int pPrice)
    • 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 pPlayerOfferA, ItemStack pPlayerOfferB)
    • isRequiredItem

      private boolean isRequiredItem(ItemStack pOffer, ItemStack pCost)
    • take

      public boolean take(ItemStack pPlayerOfferA, ItemStack pPlayerOfferB)