Class TradeOffer

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

public class TradeOffer extends Object
Mappings:
Namespace Name
official bzv
intermediary net/minecraft/class_1914
named net/minecraft/village/TradeOffer
  • Field Details

    • field_38546

      private final class_7317 field_38546
      Mappings:
      Namespace Name Mixin selector
      official a Lbzv;a:Lbzt;
      intermediary field_38546 Lnet/minecraft/class_1914;field_38546:Lnet/minecraft/class_7317;
      named field_38546 Lnet/minecraft/village/TradeOffer;field_38546:Lnet/minecraft/class_7317;
    • field_38547

      private final class_7317 field_38547
      Mappings:
      Namespace Name Mixin selector
      official b Lbzv;b:Lbzt;
      intermediary field_38547 Lnet/minecraft/class_1914;field_38547:Lnet/minecraft/class_7317;
      named field_38547 Lnet/minecraft/village/TradeOffer;field_38547:Lnet/minecraft/class_7317;
    • uses

      private int uses
      Mappings:
      Namespace Name Mixin selector
      official c Lbzv;c:I
      intermediary field_9147 Lnet/minecraft/class_1914;field_9147:I
      named uses Lnet/minecraft/village/TradeOffer;uses:I
    • maxUses

      private final int maxUses
      Mappings:
      Namespace Name Mixin selector
      official d Lbzv;d:I
      intermediary field_9144 Lnet/minecraft/class_1914;field_9144:I
      named maxUses Lnet/minecraft/village/TradeOffer;maxUses:I
    • rewardingPlayerExperience

      private boolean rewardingPlayerExperience
      Mappings:
      Namespace Name Mixin selector
      official e Lbzv;e:Z
      intermediary field_9145 Lnet/minecraft/class_1914;field_9145:Z
      named rewardingPlayerExperience Lnet/minecraft/village/TradeOffer;rewardingPlayerExperience:Z
    • demandBonus

      private int demandBonus
      Mappings:
      Namespace Name Mixin selector
      official f Lbzv;f:I
      intermediary field_18677 Lnet/minecraft/class_1914;field_18677:I
      named demandBonus Lnet/minecraft/village/TradeOffer;demandBonus:I
    • priceMultiplier

      private float priceMultiplier
      Mappings:
      Namespace Name Mixin selector
      official g Lbzv;g:F
      intermediary field_18678 Lnet/minecraft/class_1914;field_18678:F
      named priceMultiplier Lnet/minecraft/village/TradeOffer;priceMultiplier:F
    • merchantExperience

      private int merchantExperience
      Mappings:
      Namespace Name Mixin selector
      official h Lbzv;h:I
      intermediary field_18679 Lnet/minecraft/class_1914;field_18679:I
      named merchantExperience Lnet/minecraft/village/TradeOffer;merchantExperience:I
  • Constructor Details

    • TradeOffer

      public TradeOffer(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbzv;<init>(Lom;)V
      intermediary <init> Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_2487;)V
      named <init> Lnet/minecraft/village/TradeOffer;<init>(Lnet/minecraft/nbt/NbtCompound;)V
    • TradeOffer

      public TradeOffer(class_7317 class_7317, class_7317 class_73172, int int2, int int3, float float2)
    • TradeOffer

      public TradeOffer(class_7317 class_7317, class_7317 class_73172, int int2, int int3, int int4, float float2)
    • TradeOffer

      public TradeOffer(class_7317 class_7317, class_7317 class_73172, int int2, int int3, int int4, float float2, int int5)
  • Method Details

    • method_42852

      public class_7317 method_42852()
      Mappings:
      Namespace Name Mixin selector
      official a Lbzv;a()Lbzt;
      intermediary method_42852 Lnet/minecraft/class_1914;method_42852()Lnet/minecraft/class_7317;
      named method_42852 Lnet/minecraft/village/TradeOffer;method_42852()Lnet/minecraft/class_7317;
    • getSellItem

      public class_7317 getSellItem()
      Returns the sell item of this trade offer.
      Mappings:
      Namespace Name Mixin selector
      official b Lbzv;b()Lbzt;
      intermediary method_8250 Lnet/minecraft/class_1914;method_8250()Lnet/minecraft/class_7317;
      named getSellItem Lnet/minecraft/village/TradeOffer;getSellItem()Lnet/minecraft/class_7317;
    • updateDemandBonus

      public void updateDemandBonus()
      Updates the demand bonus of this trade offer depending on its previous demand bonus, the number of times it has been used and its remaining uses.
      Mappings:
      Namespace Name Mixin selector
      official c Lbzv;c()V
      intermediary method_19274 Lnet/minecraft/class_1914;method_19274()V
      named updateDemandBonus Lnet/minecraft/village/TradeOffer;updateDemandBonus()V
    • method_42856

      public ItemStack method_42856()
      Mappings:
      Namespace Name Mixin selector
      official d Lbzv;d()Lbux;
      intermediary method_42856 Lnet/minecraft/class_1914;method_42856()Lnet/minecraft/class_1799;
      named method_42856 Lnet/minecraft/village/TradeOffer;method_42856()Lnet/minecraft/item/ItemStack;
    • getUses

      public int getUses()
      Returns the number of times this trade offer has been used.
      Mappings:
      Namespace Name Mixin selector
      official e Lbzv;e()I
      intermediary method_8249 Lnet/minecraft/class_1914;method_8249()I
      named getUses Lnet/minecraft/village/TradeOffer;getUses()I
    • resetUses

      public void resetUses()
      Resets the number of times this trade offer has been used.
      Mappings:
      Namespace Name Mixin selector
      official f Lbzv;f()V
      intermediary method_19275 Lnet/minecraft/class_1914;method_19275()V
      named resetUses Lnet/minecraft/village/TradeOffer;resetUses()V
    • getMaxUses

      public int getMaxUses()
      Returns the maximum number of times this trade offer can be used.
      Mappings:
      Namespace Name Mixin selector
      official g Lbzv;g()I
      intermediary method_8248 Lnet/minecraft/class_1914;method_8248()I
      named getMaxUses Lnet/minecraft/village/TradeOffer;getMaxUses()I
    • use

      public void use()
      Increments the number of times this trade offer has been used.
      Mappings:
      Namespace Name Mixin selector
      official h Lbzv;h()V
      intermediary method_8244 Lnet/minecraft/class_1914;method_8244()V
      named use Lnet/minecraft/village/TradeOffer;use()V
    • getDemandBonus

      public int getDemandBonus()
      Returns the demand bonus of this trade offer. It is used to adjust the price of its first buy item.

      The more the demand bonus is, the more the price will be high.

      It is updated when a villager restocks.

      See Also:
      Mappings:
      Namespace Name Mixin selector
      official i Lbzv;i()I
      intermediary method_21725 Lnet/minecraft/class_1914;method_21725()I
      named getDemandBonus Lnet/minecraft/village/TradeOffer;getDemandBonus()I
    • getPriceMultiplier

      public float getPriceMultiplier()
      Returns the price multiplier of this trade offer. It is used to adjust the price of its first buy item.
      Mappings:
      Namespace Name Mixin selector
      official j Lbzv;j()F
      intermediary method_19278 Lnet/minecraft/class_1914;method_19278()F
      named getPriceMultiplier Lnet/minecraft/village/TradeOffer;getPriceMultiplier()F
    • getMerchantExperience

      public int getMerchantExperience()
      Returns the amount of experience that will be given to a merchant after this trade offer has been used.
      Mappings:
      Namespace Name Mixin selector
      official k Lbzv;k()I
      intermediary method_19279 Lnet/minecraft/class_1914;method_19279()I
      named getMerchantExperience Lnet/minecraft/village/TradeOffer;getMerchantExperience()I
    • isDisabled

      public boolean isDisabled()
      Returns whether this trade offer is disabled.

      Checks if the number of times this trade offer has been used is greater or equal to its maximum uses.

      Mappings:
      Namespace Name Mixin selector
      official l Lbzv;l()Z
      intermediary method_8255 Lnet/minecraft/class_1914;method_8255()Z
      named isDisabled Lnet/minecraft/village/TradeOffer;isDisabled()Z
    • disable

      public void disable()
      Sets the number of times this trade offer has been used to its maximum uses, making it disabled.
      Mappings:
      Namespace Name Mixin selector
      official m Lbzv;m()V
      intermediary method_8254 Lnet/minecraft/class_1914;method_8254()V
      named disable Lnet/minecraft/village/TradeOffer;disable()V
    • hasBeenUsed

      public boolean hasBeenUsed()
      Returns whether this trade offer has already been used.

      Checks if the number of times this trade offer has been used is greater than 0.

      Mappings:
      Namespace Name Mixin selector
      official n Lbzv;n()Z
      intermediary method_21834 Lnet/minecraft/class_1914;method_21834()Z
      named hasBeenUsed Lnet/minecraft/village/TradeOffer;hasBeenUsed()Z
    • shouldRewardPlayerExperience

      public boolean shouldRewardPlayerExperience()
      Returns whether experience should be given to a player when they use this trade offer.
      Mappings:
      Namespace Name Mixin selector
      official o Lbzv;o()Z
      intermediary method_8256 Lnet/minecraft/class_1914;method_8256()Z
      named shouldRewardPlayerExperience Lnet/minecraft/village/TradeOffer;shouldRewardPlayerExperience()Z
    • toNbt

      public NbtCompound toNbt()
      Mappings:
      Namespace Name Mixin selector
      official p Lbzv;p()Lom;
      intermediary method_8251 Lnet/minecraft/class_1914;method_8251()Lnet/minecraft/class_2487;
      named toNbt Lnet/minecraft/village/TradeOffer;toNbt()Lnet/minecraft/nbt/NbtCompound;
    • method_42853

      public boolean method_42853(class_7317 class_7317)
      Mappings:
      Namespace Name Mixin selector
      official a Lbzv;a(Lbzt;)Z
      intermediary method_42853 Lnet/minecraft/class_1914;method_42853(Lnet/minecraft/class_7317;)Z
      named method_42853 Lnet/minecraft/village/TradeOffer;method_42853(Lnet/minecraft/class_7317;)Z