Package net.minecraft.village
Class TradeOffer
java.lang.Object
net.minecraft.village.TradeOffer
public class TradeOffer extends Object
- Mappings:
Namespace Name official btlintermediary net/minecraft/class_1914named net/minecraft/village/TradeOffer
-
Field Summary
Fields Modifier and Type Field Description private intdemandBonusprivate ItemStackfirstBuyItemprivate intmaxUsesprivate intmerchantExperienceprivate floatpriceMultiplierprivate booleanrewardingPlayerExperienceprivate ItemStacksecondBuyItemprivate ItemStacksellItemprivate intspecialPriceprivate intuses -
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 booleanacceptsBuy(ItemStack given, ItemStack sample)voidclearSpecialPrice()voidclearUses()booleandepleteBuyItems(ItemStack firstBuyStack, ItemStack secondBuyStack)ItemStackgetAdjustedFirstBuyItem()intgetDemandBonus()intgetMaxUses()intgetMerchantExperience()ItemStackgetMutableSellItem()ItemStackgetOriginalFirstBuyItem()floatgetPriceMultiplier()ItemStackgetSecondBuyItem()ItemStackgetSellItem()intgetSpecialPrice()intgetUses()booleanhasAvailableUses()voidincreaseSpecialPrice(int increment)booleanisDisabled()booleanmatchesBuyItems(ItemStack first, ItemStack second)voidresetUses()voidsetSpecialPrice(int specialPrice)booleanshouldRewardPlayerExperience()CompoundTagtoNbt()voidupdatePriceOnDemand()voiduse()
-
Field Details
-
firstBuyItem
- Mappings:
Namespace Name Mixin selector official aLbtl;a:Lboo;intermediary field_9146Lnet/minecraft/class_1914;field_9146:Lnet/minecraft/class_1799;named firstBuyItemLnet/minecraft/village/TradeOffer;firstBuyItem:Lnet/minecraft/item/ItemStack;
-
secondBuyItem
- Mappings:
Namespace Name Mixin selector official bLbtl;b:Lboo;intermediary field_9143Lnet/minecraft/class_1914;field_9143:Lnet/minecraft/class_1799;named secondBuyItemLnet/minecraft/village/TradeOffer;secondBuyItem:Lnet/minecraft/item/ItemStack;
-
sellItem
- Mappings:
Namespace Name Mixin selector official cLbtl;c:Lboo;intermediary field_9148Lnet/minecraft/class_1914;field_9148:Lnet/minecraft/class_1799;named sellItemLnet/minecraft/village/TradeOffer;sellItem:Lnet/minecraft/item/ItemStack;
-
uses
private int uses- Mappings:
Namespace Name Mixin selector official dLbtl;d:Iintermediary field_9147Lnet/minecraft/class_1914;field_9147:Inamed usesLnet/minecraft/village/TradeOffer;uses:I
-
maxUses
private final int maxUses- Mappings:
Namespace Name Mixin selector official eLbtl;e:Iintermediary field_9144Lnet/minecraft/class_1914;field_9144:Inamed maxUsesLnet/minecraft/village/TradeOffer;maxUses:I
-
rewardingPlayerExperience
private boolean rewardingPlayerExperience- Mappings:
Namespace Name Mixin selector official fLbtl;f:Zintermediary field_9145Lnet/minecraft/class_1914;field_9145:Znamed rewardingPlayerExperienceLnet/minecraft/village/TradeOffer;rewardingPlayerExperience:Z
-
specialPrice
private int specialPrice- Mappings:
Namespace Name Mixin selector official gLbtl;g:Iintermediary field_18676Lnet/minecraft/class_1914;field_18676:Inamed specialPriceLnet/minecraft/village/TradeOffer;specialPrice:I
-
demandBonus
private int demandBonus- Mappings:
Namespace Name Mixin selector official hLbtl;h:Iintermediary field_18677Lnet/minecraft/class_1914;field_18677:Inamed demandBonusLnet/minecraft/village/TradeOffer;demandBonus:I
-
priceMultiplier
private float priceMultiplier- Mappings:
Namespace Name Mixin selector official iLbtl;i:Fintermediary field_18678Lnet/minecraft/class_1914;field_18678:Fnamed priceMultiplierLnet/minecraft/village/TradeOffer;priceMultiplier:F
-
merchantExperience
private int merchantExperience- Mappings:
Namespace Name Mixin selector official jLbtl;j:Iintermediary field_18679Lnet/minecraft/class_1914;field_18679:Inamed merchantExperienceLnet/minecraft/village/TradeOffer;merchantExperience:I
-
-
Constructor Details
-
TradeOffer
- Mappings:
Namespace Name Mixin selector official <init>Lbtl;<init>(Lmr;)Vintermediary <init>Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_2487;)Vnamed <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>Lbtl;<init>(Lboo;Lboo;IIF)Vintermediary <init>Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;IIF)Vnamed <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>Lbtl;<init>(Lboo;Lboo;Lboo;IIF)Vintermediary <init>Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;IIF)Vnamed <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>Lbtl;<init>(Lboo;Lboo;Lboo;IIIF)Vintermediary <init>Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;IIIF)Vnamed <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>Lbtl;<init>(Lboo;Lboo;Lboo;IIIFI)Vintermediary <init>Lnet/minecraft/class_1914;<init>(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;IIIFI)Vnamed <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 aLbtl;a()Lboo;intermediary method_8246Lnet/minecraft/class_1914;method_8246()Lnet/minecraft/class_1799;named getOriginalFirstBuyItemLnet/minecraft/village/TradeOffer;getOriginalFirstBuyItem()Lnet/minecraft/item/ItemStack;
-
getAdjustedFirstBuyItem
- Mappings:
Namespace Name Mixin selector official bLbtl;b()Lboo;intermediary method_19272Lnet/minecraft/class_1914;method_19272()Lnet/minecraft/class_1799;named getAdjustedFirstBuyItemLnet/minecraft/village/TradeOffer;getAdjustedFirstBuyItem()Lnet/minecraft/item/ItemStack;
-
getSecondBuyItem
- Mappings:
Namespace Name Mixin selector official cLbtl;c()Lboo;intermediary method_8247Lnet/minecraft/class_1914;method_8247()Lnet/minecraft/class_1799;named getSecondBuyItemLnet/minecraft/village/TradeOffer;getSecondBuyItem()Lnet/minecraft/item/ItemStack;
-
getMutableSellItem
- Mappings:
Namespace Name Mixin selector official dLbtl;d()Lboo;intermediary method_8250Lnet/minecraft/class_1914;method_8250()Lnet/minecraft/class_1799;named getMutableSellItemLnet/minecraft/village/TradeOffer;getMutableSellItem()Lnet/minecraft/item/ItemStack;
-
updatePriceOnDemand
public void updatePriceOnDemand()- Mappings:
Namespace Name Mixin selector official eLbtl;e()Vintermediary method_19274Lnet/minecraft/class_1914;method_19274()Vnamed updatePriceOnDemandLnet/minecraft/village/TradeOffer;updatePriceOnDemand()V
-
getSellItem
- Mappings:
Namespace Name Mixin selector official fLbtl;f()Lboo;intermediary method_18019Lnet/minecraft/class_1914;method_18019()Lnet/minecraft/class_1799;named getSellItemLnet/minecraft/village/TradeOffer;getSellItem()Lnet/minecraft/item/ItemStack;
-
getUses
public int getUses()- Mappings:
Namespace Name Mixin selector official gLbtl;g()Iintermediary method_8249Lnet/minecraft/class_1914;method_8249()Inamed getUsesLnet/minecraft/village/TradeOffer;getUses()I
-
resetUses
public void resetUses()- Mappings:
Namespace Name Mixin selector official hLbtl;h()Vintermediary method_19275Lnet/minecraft/class_1914;method_19275()Vnamed resetUsesLnet/minecraft/village/TradeOffer;resetUses()V
-
getMaxUses
public int getMaxUses()- Mappings:
Namespace Name Mixin selector official iLbtl;i()Iintermediary method_8248Lnet/minecraft/class_1914;method_8248()Inamed getMaxUsesLnet/minecraft/village/TradeOffer;getMaxUses()I
-
use
public void use()- Mappings:
Namespace Name Mixin selector official jLbtl;j()Vintermediary method_8244Lnet/minecraft/class_1914;method_8244()Vnamed useLnet/minecraft/village/TradeOffer;use()V
-
getDemandBonus
public int getDemandBonus()- Mappings:
Namespace Name Mixin selector official kLbtl;k()Iintermediary method_21725Lnet/minecraft/class_1914;method_21725()Inamed getDemandBonusLnet/minecraft/village/TradeOffer;getDemandBonus()I
-
increaseSpecialPrice
public void increaseSpecialPrice(int increment)- Mappings:
Namespace Name Mixin selector official aLbtl;a(I)Vintermediary method_8245Lnet/minecraft/class_1914;method_8245(I)Vnamed increaseSpecialPriceLnet/minecraft/village/TradeOffer;increaseSpecialPrice(I)V
-
clearSpecialPrice
public void clearSpecialPrice()- Mappings:
Namespace Name Mixin selector official lLbtl;l()Vintermediary method_19276Lnet/minecraft/class_1914;method_19276()Vnamed clearSpecialPriceLnet/minecraft/village/TradeOffer;clearSpecialPrice()V
-
getSpecialPrice
public int getSpecialPrice()- Mappings:
Namespace Name Mixin selector official mLbtl;m()Iintermediary method_19277Lnet/minecraft/class_1914;method_19277()Inamed getSpecialPriceLnet/minecraft/village/TradeOffer;getSpecialPrice()I
-
setSpecialPrice
public void setSpecialPrice(int specialPrice)- Mappings:
Namespace Name Mixin selector official bLbtl;b(I)Vintermediary method_19273Lnet/minecraft/class_1914;method_19273(I)Vnamed setSpecialPriceLnet/minecraft/village/TradeOffer;setSpecialPrice(I)V
-
getPriceMultiplier
public float getPriceMultiplier()- Mappings:
Namespace Name Mixin selector official nLbtl;n()Fintermediary method_19278Lnet/minecraft/class_1914;method_19278()Fnamed getPriceMultiplierLnet/minecraft/village/TradeOffer;getPriceMultiplier()F
-
getMerchantExperience
public int getMerchantExperience()- Mappings:
Namespace Name Mixin selector official oLbtl;o()Iintermediary method_19279Lnet/minecraft/class_1914;method_19279()Inamed getMerchantExperienceLnet/minecraft/village/TradeOffer;getMerchantExperience()I
-
isDisabled
public boolean isDisabled()- Mappings:
Namespace Name Mixin selector official pLbtl;p()Zintermediary method_8255Lnet/minecraft/class_1914;method_8255()Znamed isDisabledLnet/minecraft/village/TradeOffer;isDisabled()Z
-
clearUses
public void clearUses()- Mappings:
Namespace Name Mixin selector official qLbtl;q()Vintermediary method_8254Lnet/minecraft/class_1914;method_8254()Vnamed clearUsesLnet/minecraft/village/TradeOffer;clearUses()V
-
hasAvailableUses
public boolean hasAvailableUses()- Mappings:
Namespace Name Mixin selector official rLbtl;r()Zintermediary method_21834Lnet/minecraft/class_1914;method_21834()Znamed hasAvailableUsesLnet/minecraft/village/TradeOffer;hasAvailableUses()Z
-
shouldRewardPlayerExperience
public boolean shouldRewardPlayerExperience()- Mappings:
Namespace Name Mixin selector official sLbtl;s()Zintermediary method_8256Lnet/minecraft/class_1914;method_8256()Znamed shouldRewardPlayerExperienceLnet/minecraft/village/TradeOffer;shouldRewardPlayerExperience()Z
-
toNbt
- Mappings:
Namespace Name Mixin selector official tLbtl;t()Lmr;intermediary method_8251Lnet/minecraft/class_1914;method_8251()Lnet/minecraft/class_2487;named toNbtLnet/minecraft/village/TradeOffer;toNbt()Lnet/minecraft/nbt/CompoundTag;
-
matchesBuyItems
- Mappings:
Namespace Name Mixin selector official aLbtl;a(Lboo;Lboo;)Zintermediary method_16952Lnet/minecraft/class_1914;method_16952(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Znamed matchesBuyItemsLnet/minecraft/village/TradeOffer;matchesBuyItems(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-
acceptsBuy
- Mappings:
Namespace Name Mixin selector official cLbtl;c(Lboo;Lboo;)Zintermediary method_16954Lnet/minecraft/class_1914;method_16954(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Znamed acceptsBuyLnet/minecraft/village/TradeOffer;acceptsBuy(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-
depleteBuyItems
- Mappings:
Namespace Name Mixin selector official bLbtl;b(Lboo;Lboo;)Zintermediary method_16953Lnet/minecraft/class_1914;method_16953(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Znamed depleteBuyItemsLnet/minecraft/village/TradeOffer;depleteBuyItems(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-