net.minecraft.world.item.trading

public class MerchantOffer

dgf
net.minecraft.world.item.trading.MerchantOffer
net.minecraft.class_1914
net.minecraft.village.TradeOffer
net.minecraft.world.item.trading.MerchantRecipe

Field summary

Modifier and TypeField
public static final com.mojang.serialization.Codec<MerchantOffer>
a
CODEC
field_48849
CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, MerchantOffer>
b
STREAM_CODEC
field_48371
PACKET_CODEC
private final ItemCost
c
baseCostA
field_9146
firstBuyItem
private final Optional<ItemCost>
d
costB
field_9143
secondBuyItem
private final ItemStack
e
result
field_9148
sellItem
private int
f
uses
field_9147
uses
private final int
g
maxUses
field_9144
maxUses
private final boolean
h
rewardExp
field_9145
rewardingPlayerExperience
private int
i
specialPriceDiff
field_18676
specialPrice
private int
j
demand
field_18677
demandBonus
private final float
k
priceMultiplier
field_18678
priceMultiplier
private final int
l
xp
field_18679
merchantExperience

Constructor summary

ModifierConstructor
private (ItemCost firstBuyItem, Optional<ItemCost> secondBuyItem, ItemStack sellItem, int uses, int maxUses, boolean rewardingPlayerExperience, int specialPrice, int demandBonus, float priceMultiplier, int merchantExperience)
public (ItemCost buyItem, ItemStack sellItem, int maxUses, int merchantExperience, float priceMultiplier)
public (ItemCost firstBuyItem, Optional<ItemCost> secondBuyItem, ItemStack sellItem, int maxUses, int merchantExperience, float priceMultiplier)
public (ItemCost firstBuyItem, Optional<ItemCost> secondBuyItem, ItemStack sellItem, int uses, int maxUses, int merchantExperience, float priceMultiplier)
public (ItemCost firstBuyItem, Optional<ItemCost> secondBuyItem, ItemStack sellItem, int uses, int maxUses, int merchantExperience, float priceMultiplier, int demandBonus)
private (MerchantOffer offer)

Method summary

Modifier and TypeMethod
public ItemStack
a()
getBaseCostA()
method_8246()
getOriginalFirstBuyItem()
public ItemStack
b()
getCostA()
method_19272()
getDisplayedFirstBuyItem()
private int
a(dgd arg0)
getModifiedCostCount(ItemCost arg0)
method_57555(class_9306 arg0)
getFirstBuyItemCount(TradedItem firstBuyItem)
public ItemStack
c()
getCostB()
method_8247()
getDisplayedSecondBuyItem()
public ItemCost
d()
getItemCostA()
method_57556()
getFirstBuyItem()
public Optional<ItemCost>
e()
getItemCostB()
method_57557()
getSecondBuyItem()
public ItemStack
f()
getResult()
method_8250()
getSellItem()
public void
g()
updateDemand()
method_19274()
updateDemandBonus()
public ItemStack
h()
assemble()
method_18019()
copySellItem()
public int
i()
getUses()
method_8249()
getUses()
public void
j()
resetUses()
method_19275()
resetUses()
public int
k()
getMaxUses()
method_8248()
getMaxUses()
public void
l()
increaseUses()
method_8244()
use()
public int
m()
getDemand()
method_21725()
getDemandBonus()
public void
a(int arg0)
addToSpecialPriceDiff(int arg0)
method_8245(int arg0)
increaseSpecialPrice(int increment)
public void
n()
resetSpecialPriceDiff()
method_19276()
clearSpecialPrice()
public int
o()
getSpecialPriceDiff()
method_19277()
getSpecialPrice()
public void
b(int arg0)
setSpecialPriceDiff(int arg0)
method_19273(int arg0)
setSpecialPrice(int specialPrice)
public float
p()
getPriceMultiplier()
method_19278()
getPriceMultiplier()
public int
q()
getXp()
method_19279()
getMerchantExperience()
public boolean
r()
isOutOfStock()
method_8255()
isDisabled()
public void
s()
setToOutOfStock()
method_8254()
disable()
public boolean
t()
needsRestock()
method_21834()
hasBeenUsed()
public boolean
u()
shouldRewardExp()
method_8256()
shouldRewardPlayerExperience()
public boolean
a(cxp arg0, cxp arg1)
satisfiedBy(ItemStack arg0, ItemStack arg1)
method_16952(class_1799 arg0, class_1799 arg1)
matchesBuyItems(ItemStack stack, ItemStack buyItem)
public boolean
b(cxp arg0, cxp arg1)
take(ItemStack arg0, ItemStack arg1)
method_16953(class_1799 arg0, class_1799 arg1)
depleteBuyItems(ItemStack firstBuyStack, ItemStack secondBuyStack)
public MerchantOffer
v()
copy()
method_53881()
copy()
private static void
a(xg arg0, dgf arg1)
writeToStream(RegistryFriendlyByteBuf arg0, MerchantOffer arg1)
method_56111(class_9129 arg0, class_1914 arg1)
write(RegistryByteBuf buf, TradeOffer offer)
public static MerchantOffer
a(xg arg0)
createFromStream(RegistryFriendlyByteBuf arg0)
method_56110(class_9129 arg0)
read(RegistryByteBuf buf)