Package net.minecraft.village
Class TradeOffer
java.lang.Object
net.minecraft.village.TradeOffer
public class TradeOffer extends Object
- Mappings:
Namespace Name official bss
intermediary net/minecraft/class_1914
named net/minecraft/village/TradeOffer
-
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 firstBuyItem, ItemStack secondBuyItem, ItemStack sellItem, int uses, int maxUses, int rewardedExp, float priceMultiplier, int demandBonus)
TradeOffer(CompoundTag tag)
-
Method Summary
Modifier and Type Method Description private boolean
acceptsBuy(ItemStack given, ItemStack sample)
void
clearSpecialPrice()
void
clearUses()
boolean
depleteBuyItems(ItemStack firstBuyStack, ItemStack secondBuyStack)
ItemStack
getAdjustedFirstBuyItem()
int
getDemandBonus()
int
getMaxUses()
int
getMerchantExperience()
ItemStack
getMutableSellItem()
ItemStack
getOriginalFirstBuyItem()
float
getPriceMultiplier()
ItemStack
getSecondBuyItem()
ItemStack
getSellItem()
int
getSpecialPrice()
int
getUses()
boolean
hasAvailableUses()
void
increaseSpecialPrice(int increment)
boolean
isDisabled()
boolean
matchesBuyItems(ItemStack first, ItemStack second)
void
resetUses()
void
setSpecialPrice(int specialPrice)
boolean
shouldRewardPlayerExperience()
CompoundTag
toTag()
void
updatePriceOnDemand()
void
use()
-
Field Details
-
firstBuyItem
- Mappings:
Namespace Name Mixin selector official a
Lbss;a:Lbnv;
intermediary field_9146
Lnet/minecraft/class_1914;field_9146:Lnet/minecraft/class_1799;
named firstBuyItem
Lnet/minecraft/village/TradeOffer;firstBuyItem:Lnet/minecraft/item/ItemStack;
-
secondBuyItem
- Mappings:
Namespace Name Mixin selector official b
Lbss;b:Lbnv;
intermediary field_9143
Lnet/minecraft/class_1914;field_9143:Lnet/minecraft/class_1799;
named secondBuyItem
Lnet/minecraft/village/TradeOffer;secondBuyItem:Lnet/minecraft/item/ItemStack;
-
sellItem
- Mappings:
Namespace Name Mixin selector official c
Lbss;c:Lbnv;
intermediary field_9148
Lnet/minecraft/class_1914;field_9148:Lnet/minecraft/class_1799;
named sellItem
Lnet/minecraft/village/TradeOffer;sellItem:Lnet/minecraft/item/ItemStack;
-
uses
private int uses- Mappings:
Namespace Name Mixin selector official d
Lbss;d: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 e
Lbss;e: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 f
Lbss;f:Z
intermediary field_9145
Lnet/minecraft/class_1914;field_9145:Z
named rewardingPlayerExperience
Lnet/minecraft/village/TradeOffer;rewardingPlayerExperience:Z
-
specialPrice
private int specialPrice- Mappings:
Namespace Name Mixin selector official g
Lbss;g:I
intermediary field_18676
Lnet/minecraft/class_1914;field_18676:I
named specialPrice
Lnet/minecraft/village/TradeOffer;specialPrice:I
-
demandBonus
private int demandBonus- Mappings:
Namespace Name Mixin selector official h
Lbss;h: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 i
Lbss;i: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 j
Lbss;j:I
intermediary field_18679
Lnet/minecraft/class_1914;field_18679:I
named merchantExperience
Lnet/minecraft/village/TradeOffer;merchantExperience:I
-
-
Constructor Details
-
TradeOffer
- Mappings:
Namespace Name Mixin selector official <init>
Lbss;<init>(Lmq;)V
intermediary <init>
Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_2487;)V
named <init>
Lnet/minecraft/village/TradeOffer;<init>(Lnet/minecraft/nbt/CompoundTag;)V
-
TradeOffer
public TradeOffer(ItemStack buyItem, ItemStack sellItem, int maxUses, int rewardedExp, float priceMultiplier)- Mappings:
Namespace Name Mixin selector official <init>
Lbss;<init>(Lbnv;Lbnv;IIF)V
intermediary <init>
Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;IIF)V
named <init>
Lnet/minecraft/village/TradeOffer;<init>(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;IIF)V
-
TradeOffer
public TradeOffer(ItemStack firstBuyItem, ItemStack secondBuyItem, ItemStack sellItem, int maxUses, int rewardedExp, float priceMultiplier)- Mappings:
Namespace Name Mixin selector official <init>
Lbss;<init>(Lbnv;Lbnv;Lbnv;IIF)V
intermediary <init>
Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;IIF)V
named <init>
Lnet/minecraft/village/TradeOffer;<init>(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;IIF)V
-
TradeOffer
public TradeOffer(ItemStack firstBuyItem, ItemStack secondBuyItem, ItemStack sellItem, int uses, int maxUses, int rewardedExp, float priceMultiplier)- Mappings:
Namespace Name Mixin selector official <init>
Lbss;<init>(Lbnv;Lbnv;Lbnv;IIIF)V
intermediary <init>
Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;IIIF)V
named <init>
Lnet/minecraft/village/TradeOffer;<init>(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;IIIF)V
-
TradeOffer
public TradeOffer(ItemStack firstBuyItem, ItemStack secondBuyItem, ItemStack sellItem, int uses, int maxUses, int rewardedExp, float priceMultiplier, int demandBonus)- Mappings:
Namespace Name Mixin selector official <init>
Lbss;<init>(Lbnv;Lbnv;Lbnv;IIIFI)V
intermediary <init>
Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;IIIFI)V
named <init>
Lnet/minecraft/village/TradeOffer;<init>(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;IIIFI)V
-
-
Method Details
-
getOriginalFirstBuyItem
- Mappings:
Namespace Name Mixin selector official a
Lbss;a()Lbnv;
intermediary method_8246
Lnet/minecraft/class_1914;method_8246()Lnet/minecraft/class_1799;
named getOriginalFirstBuyItem
Lnet/minecraft/village/TradeOffer;getOriginalFirstBuyItem()Lnet/minecraft/item/ItemStack;
-
getAdjustedFirstBuyItem
- Mappings:
Namespace Name Mixin selector official b
Lbss;b()Lbnv;
intermediary method_19272
Lnet/minecraft/class_1914;method_19272()Lnet/minecraft/class_1799;
named getAdjustedFirstBuyItem
Lnet/minecraft/village/TradeOffer;getAdjustedFirstBuyItem()Lnet/minecraft/item/ItemStack;
-
getSecondBuyItem
- Mappings:
Namespace Name Mixin selector official c
Lbss;c()Lbnv;
intermediary method_8247
Lnet/minecraft/class_1914;method_8247()Lnet/minecraft/class_1799;
named getSecondBuyItem
Lnet/minecraft/village/TradeOffer;getSecondBuyItem()Lnet/minecraft/item/ItemStack;
-
getMutableSellItem
- Mappings:
Namespace Name Mixin selector official d
Lbss;d()Lbnv;
intermediary method_8250
Lnet/minecraft/class_1914;method_8250()Lnet/minecraft/class_1799;
named getMutableSellItem
Lnet/minecraft/village/TradeOffer;getMutableSellItem()Lnet/minecraft/item/ItemStack;
-
updatePriceOnDemand
public void updatePriceOnDemand()- Mappings:
Namespace Name Mixin selector official e
Lbss;e()V
intermediary method_19274
Lnet/minecraft/class_1914;method_19274()V
named updatePriceOnDemand
Lnet/minecraft/village/TradeOffer;updatePriceOnDemand()V
-
getSellItem
- Mappings:
Namespace Name Mixin selector official f
Lbss;f()Lbnv;
intermediary method_18019
Lnet/minecraft/class_1914;method_18019()Lnet/minecraft/class_1799;
named getSellItem
Lnet/minecraft/village/TradeOffer;getSellItem()Lnet/minecraft/item/ItemStack;
-
getUses
public int getUses()- Mappings:
Namespace Name Mixin selector official g
Lbss;g()I
intermediary method_8249
Lnet/minecraft/class_1914;method_8249()I
named getUses
Lnet/minecraft/village/TradeOffer;getUses()I
-
resetUses
public void resetUses()- Mappings:
Namespace Name Mixin selector official h
Lbss;h()V
intermediary method_19275
Lnet/minecraft/class_1914;method_19275()V
named resetUses
Lnet/minecraft/village/TradeOffer;resetUses()V
-
getMaxUses
public int getMaxUses()- Mappings:
Namespace Name Mixin selector official i
Lbss;i()I
intermediary method_8248
Lnet/minecraft/class_1914;method_8248()I
named getMaxUses
Lnet/minecraft/village/TradeOffer;getMaxUses()I
-
use
public void use()- Mappings:
Namespace Name Mixin selector official j
Lbss;j()V
intermediary method_8244
Lnet/minecraft/class_1914;method_8244()V
named use
Lnet/minecraft/village/TradeOffer;use()V
-
getDemandBonus
public int getDemandBonus()- Mappings:
Namespace Name Mixin selector official k
Lbss;k()I
intermediary method_21725
Lnet/minecraft/class_1914;method_21725()I
named getDemandBonus
Lnet/minecraft/village/TradeOffer;getDemandBonus()I
-
increaseSpecialPrice
public void increaseSpecialPrice(int increment)- Mappings:
Namespace Name Mixin selector official a
Lbss;a(I)V
intermediary method_8245
Lnet/minecraft/class_1914;method_8245(I)V
named increaseSpecialPrice
Lnet/minecraft/village/TradeOffer;increaseSpecialPrice(I)V
-
clearSpecialPrice
public void clearSpecialPrice()- Mappings:
Namespace Name Mixin selector official l
Lbss;l()V
intermediary method_19276
Lnet/minecraft/class_1914;method_19276()V
named clearSpecialPrice
Lnet/minecraft/village/TradeOffer;clearSpecialPrice()V
-
getSpecialPrice
public int getSpecialPrice()- Mappings:
Namespace Name Mixin selector official m
Lbss;m()I
intermediary method_19277
Lnet/minecraft/class_1914;method_19277()I
named getSpecialPrice
Lnet/minecraft/village/TradeOffer;getSpecialPrice()I
-
setSpecialPrice
public void setSpecialPrice(int specialPrice)- Mappings:
Namespace Name Mixin selector official b
Lbss;b(I)V
intermediary method_19273
Lnet/minecraft/class_1914;method_19273(I)V
named setSpecialPrice
Lnet/minecraft/village/TradeOffer;setSpecialPrice(I)V
-
getPriceMultiplier
public float getPriceMultiplier()- Mappings:
Namespace Name Mixin selector official n
Lbss;n()F
intermediary method_19278
Lnet/minecraft/class_1914;method_19278()F
named getPriceMultiplier
Lnet/minecraft/village/TradeOffer;getPriceMultiplier()F
-
getMerchantExperience
public int getMerchantExperience()- Mappings:
Namespace Name Mixin selector official o
Lbss;o()I
intermediary method_19279
Lnet/minecraft/class_1914;method_19279()I
named getMerchantExperience
Lnet/minecraft/village/TradeOffer;getMerchantExperience()I
-
isDisabled
public boolean isDisabled()- Mappings:
Namespace Name Mixin selector official p
Lbss;p()Z
intermediary method_8255
Lnet/minecraft/class_1914;method_8255()Z
named isDisabled
Lnet/minecraft/village/TradeOffer;isDisabled()Z
-
clearUses
public void clearUses()- Mappings:
Namespace Name Mixin selector official q
Lbss;q()V
intermediary method_8254
Lnet/minecraft/class_1914;method_8254()V
named clearUses
Lnet/minecraft/village/TradeOffer;clearUses()V
-
hasAvailableUses
public boolean hasAvailableUses()- Mappings:
Namespace Name Mixin selector official r
Lbss;r()Z
intermediary method_21834
Lnet/minecraft/class_1914;method_21834()Z
named hasAvailableUses
Lnet/minecraft/village/TradeOffer;hasAvailableUses()Z
-
shouldRewardPlayerExperience
public boolean shouldRewardPlayerExperience()- Mappings:
Namespace Name Mixin selector official s
Lbss;s()Z
intermediary method_8256
Lnet/minecraft/class_1914;method_8256()Z
named shouldRewardPlayerExperience
Lnet/minecraft/village/TradeOffer;shouldRewardPlayerExperience()Z
-
toTag
- Mappings:
Namespace Name Mixin selector official t
Lbss;t()Lmq;
intermediary method_8251
Lnet/minecraft/class_1914;method_8251()Lnet/minecraft/class_2487;
named toTag
Lnet/minecraft/village/TradeOffer;toTag()Lnet/minecraft/nbt/CompoundTag;
-
matchesBuyItems
- Mappings:
Namespace Name Mixin selector official a
Lbss;a(Lbnv;Lbnv;)Z
intermediary method_16952
Lnet/minecraft/class_1914;method_16952(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
named matchesBuyItems
Lnet/minecraft/village/TradeOffer;matchesBuyItems(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-
acceptsBuy
- Mappings:
Namespace Name Mixin selector official c
Lbss;c(Lbnv;Lbnv;)Z
intermediary method_16954
Lnet/minecraft/class_1914;method_16954(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
named acceptsBuy
Lnet/minecraft/village/TradeOffer;acceptsBuy(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-
depleteBuyItems
- Mappings:
Namespace Name Mixin selector official b
Lbss;b(Lbnv;Lbnv;)Z
intermediary method_16953
Lnet/minecraft/class_1914;method_16953(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
named depleteBuyItems
Lnet/minecraft/village/TradeOffer;depleteBuyItems(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-