net.minecraft.world.item.trading

public record ItemCost

dbs
net.minecraft.world.item.trading.ItemCost
net.minecraft.class_9306
net.minecraft.village.TradedItem
net.minecraft.src.C_313525_
net.minecraft.world.item.trading.ItemCost

Field summary

Modifier and TypeField
private final Holder<Item>
d
item
comp_2424
item
f_316448_
private final int
e
count
comp_2425
count
f_314096_
private final DataComponentPredicate
f
components
comp_2426
components
f_317105_
private final ItemStack
g
itemStack
comp_2427
itemStack
f_315785_
public static final com.mojang.serialization.Codec<ItemCost>
a
CODEC
field_49393
CODEC
f_314864_
public static final StreamCodec<RegistryFriendlyByteBuf, ItemCost>
b
STREAM_CODEC
field_49394
PACKET_CODEC
f_317082_
public static final StreamCodec<RegistryFriendlyByteBuf, Optional<ItemCost>>
c
OPTIONAL_STREAM_CODEC
field_49395
OPTIONAL_PACKET_CODEC
f_316200_

Constructor summary

ModifierConstructor
public (ItemLike item)
public (ItemLike item, int count)
public (Holder<Item> item, int count, DataComponentPredicate components)
public (Holder<Item> count, int components, DataComponentPredicate itemStack, ItemStack arg3)

Method summary

Modifier and TypeMethod
public ItemCost
a(UnaryOperator<ko$a> arg0)
withComponents(UnaryOperator<DataComponentPredicate$Builder> arg0)
method_57554(UnaryOperator<class_9329$class_9330> arg0)
withComponents(UnaryOperator<ComponentPredicate$Builder> builderCallback)
m_322130_(UnaryOperator<C_313761_$C_313508_> arg0)
private static ItemStack
a(jm<cul> arg0, int arg1, ko arg2)
createStack(Holder<Item> arg0, int arg1, DataComponentPredicate arg2)
method_57553(class_6880<class_1792> arg0, int arg1, class_9329 arg2)
createDisplayStack(RegistryEntry<Item> item, int count, ComponentPredicate components)
m_324643_(C_203228_<C_1381_> p_329043_, int p_329370_, C_313761_ p_330789_)
public boolean
a(cuq arg0)
test(ItemStack arg0)
method_57552(class_1799 arg0)
matches(ItemStack stack)
m_320083_(C_1391_ arg0)
public Holder<Item>
a()
item()
comp_2424()
item()
f_316448_()
public int
b()
count()
comp_2425()
count()
f_314096_()
public DataComponentPredicate
c()
components()
comp_2426()
components()
f_317105_()
public ItemStack
d()
itemStack()
comp_2427()
itemStack()
f_315785_()