net.minecraft.village

public record TradedItem

net.minecraft.world.item.trading.ItemCost
net.minecraft.class_9306
net.minecraft.village.TradedItem

Field summary

Modifier and TypeField
private final RegistryEntry<Item>
item
comp_2424
item
private final int
count
comp_2425
count
private final ComponentMapPredicate
components
comp_2426
components
private final ItemStack
itemStack
comp_2427
itemStack
public static final com.mojang.serialization.Codec<TradedItem>
CODEC
field_49393
CODEC
public static final PacketCodec<RegistryByteBuf, TradedItem>
STREAM_CODEC
field_49394
PACKET_CODEC
public static final PacketCodec<RegistryByteBuf, Optional<TradedItem>>
OPTIONAL_STREAM_CODEC
field_49395
OPTIONAL_PACKET_CODEC

Constructor summary

ModifierConstructor
public (ItemConvertible item)
public (ItemConvertible item, int count)
public (RegistryEntry<Item> item, int count, ComponentMapPredicate components)
public (RegistryEntry<Item> item, int count, ComponentMapPredicate components, ItemStack itemStack)

Method summary

Modifier and TypeMethod
public TradedItem
withComponents(UnaryOperator<DataComponentExactPredicate$Builder> components)
method_57554(UnaryOperator<class_9329$class_9330> arg0)
withComponents(UnaryOperator<ComponentMapPredicate$Builder> builderCallback)
private static ItemStack
createStack(Holder<Item> item, int count, DataComponentExactPredicate components)
method_57553(class_6880<class_1792> arg0, int arg1, class_9329 arg2)
createDisplayStack(RegistryEntry<Item> item, int count, ComponentMapPredicate components)
public boolean
test(ItemStack itemStack)
method_57552(class_1799 arg0)
matches(ItemStack stack)
public RegistryEntry<Item>
item()
comp_2424()
item()
public int
count()
comp_2425()
count()
public ComponentMapPredicate
components()
comp_2426()
components()
public ItemStack
itemStack()
comp_2427()
itemStack()
private static com.mojang.datafixers.kinds.App
lambda$static$0(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_57551(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_57551(com.mojang.serialization.codecs.RecordCodecBuilder$Instance instance)