net.minecraft.world.item.trading

public class MerchantOffer

dbu
net.minecraft.world.item.trading.MerchantOffer
net.minecraft.class_1914
net.minecraft.village.TradeOffer
net.minecraft.src.C_1551_
net.minecraft.world.item.trading.MerchantRecipe

Field summary

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

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()
m_45352_()
public ItemStack
b()
getCostA()
method_19272()
getDisplayedFirstBuyItem()
m_45358_()
private int
a(dbs arg0)
getModifiedCostCount(ItemCost arg0)
method_57555(class_9306 arg0)
getFirstBuyItemCount(TradedItem firstBuyItem)
m_319639_(C_313525_ arg0)
public ItemStack
c()
getCostB()
method_8247()
getDisplayedSecondBuyItem()
m_45364_()
public ItemCost
d()
getItemCostA()
method_57556()
getFirstBuyItem()
m_319694_()
public Optional<ItemCost>
e()
getItemCostB()
method_57557()
getSecondBuyItem()
m_320423_()
public ItemStack
f()
getResult()
method_8250()
getSellItem()
m_45368_()
public void
g()
updateDemand()
method_19274()
updateDemandBonus()
m_45369_()
public ItemStack
h()
assemble()
method_18019()
copySellItem()
m_45370_()
public int
i()
getUses()
method_8249()
getUses()
m_45371_()
public void
j()
resetUses()
method_19275()
resetUses()
m_45372_()
public int
k()
getMaxUses()
method_8248()
getMaxUses()
m_45373_()
public void
l()
increaseUses()
method_8244()
use()
m_45374_()
public int
m()
getDemand()
method_21725()
getDemandBonus()
m_45375_()
public void
a(int arg0)
addToSpecialPriceDiff(int arg0)
method_8245(int arg0)
increaseSpecialPrice(int increment)
m_45353_(int arg0)
public void
n()
resetSpecialPriceDiff()
method_19276()
clearSpecialPrice()
m_45376_()
public int
o()
getSpecialPriceDiff()
method_19277()
getSpecialPrice()
m_45377_()
public void
b(int arg0)
setSpecialPriceDiff(int arg0)
method_19273(int arg0)
setSpecialPrice(int specialPrice)
m_45359_(int arg0)
public float
p()
getPriceMultiplier()
method_19278()
getPriceMultiplier()
m_45378_()
public int
q()
getXp()
method_19279()
getMerchantExperience()
m_45379_()
public boolean
r()
isOutOfStock()
method_8255()
isDisabled()
m_45380_()
public void
s()
setToOutOfStock()
method_8254()
disable()
m_45381_()
public boolean
t()
needsRestock()
method_21834()
hasBeenUsed()
m_45382_()
public boolean
u()
shouldRewardExp()
method_8256()
shouldRewardPlayerExperience()
m_45383_()
public boolean
a(cuq arg0, cuq arg1)
satisfiedBy(ItemStack arg0, ItemStack arg1)
method_16952(class_1799 arg0, class_1799 arg1)
matchesBuyItems(ItemStack stack, ItemStack buyItem)
m_45355_(C_1391_ p_45357_, C_1391_ arg1)
public boolean
b(cuq arg0, cuq arg1)
take(ItemStack arg0, ItemStack arg1)
method_16953(class_1799 arg0, class_1799 arg1)
depleteBuyItems(ItemStack firstBuyStack, ItemStack secondBuyStack)
m_45361_(C_1391_ p_45363_, C_1391_ arg1)
public MerchantOffer
v()
copy()
method_53881()
copy()
m_301673_()
private static void
a(wk arg0, dbu arg1)
writeToStream(RegistryFriendlyByteBuf arg0, MerchantOffer arg1)
method_56111(class_9129 arg0, class_1914 arg1)
write(RegistryByteBuf buf, TradeOffer offer)
m_324118_(C_313350_ p_331919_, C_1551_ p_333750_)
public static MerchantOffer
a(wk arg0)
createFromStream(RegistryFriendlyByteBuf arg0)
method_56110(class_9129 arg0)
read(RegistryByteBuf buf)
m_320903_(C_313350_ p_335331_)