Package net.minecraft.world.item.trading
Part 1/1
ItemCost
- Full name:
net.minecraft.world.item.trading.ItemCost - Package:
net.minecraft.world.item.trading - Source:
common—net/minecraft/world/item/trading/ItemCost.java - Type:
record - Modifiers:
public
net.minecraft.world.item.trading.ItemCost#ItemCost(Holder<Item>,int,DataComponentPredicate)
- Origin:
common - Source:
net/minecraft/world/item/trading/ItemCost.java:46 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ItemCost ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: createStack().
Parameters
Holder<Item> holderint iDataComponentPredicate dataComponentPredicate
ตัวอย่างใช้งาน
Holder<Item> holder = ...;
DataComponentPredicate dataComponentPredicate = ...;
ItemCost instance = new ItemCost(holder, 0, dataComponentPredicate);
net.minecraft.world.item.trading.ItemCost#ItemCost(ItemLike)
- Origin:
common - Source:
net/minecraft/world/item/trading/ItemCost.java:38 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ItemCost ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ItemLike itemLike
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.ItemCost#ItemCost(ItemLike,int)
- Origin:
common - Source:
net/minecraft/world/item/trading/ItemCost.java:42 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ ItemCost ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: asItem(), builtInRegistryHolder().
Parameters
ItemLike itemLikeint i
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.ItemCost#test(ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/trading/ItemCost.java:58 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: is(). คืนค่า: itemStack.is(this.item) && this.components.test(itemStack).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.ItemCost#withComponents(UnaryOperator<DataComponentPredicate.Builder>)
- Origin:
common - Source:
net/minecraft/world/item/trading/ItemCost.java:50 - Modifiers:
public - Return:
ItemCost
คืออะไร
ดำเนินการ withComponents ตาม implementation ของ ItemCost
ทำงานยังไง
เรียกต่อ: apply(), builder(), build(). สร้างออบเจ็กต์: ItemCost. คืนค่า: new ItemCost(this.item, this.count, unaryOperator.apply(DataComponentPredicate.builder()).build()).
Parameters
UnaryOperator<DataComponentPredicate.Builder> unaryOperator
ตัวอย่างใช้งาน
ItemCost instance = ...;
UnaryOperator<DataComponentPredicate.Builder> unaryOperator = ...;
ItemCost result = instance.withComponents(unaryOperator);
Merchant
- Full name:
net.minecraft.world.item.trading.Merchant - Package:
net.minecraft.world.item.trading - Source:
common—net/minecraft/world/item/trading/Merchant.java - Type:
interface - Modifiers:
public
net.minecraft.world.item.trading.Merchant#canRestock()
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:34 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบว่าสามารถ Restock
ทำงานยังไง
คืนค่า: false.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#getNotifyTradeSound()
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:32 - Modifiers: ``
- Return:
SoundEvent
คืออะไร
อ่านค่า Notify Trade Sound
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#getOffers()
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:18 - Modifiers: ``
- Return:
MerchantOffers
คืออะไร
อ่านค่า Offers
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#getTradingPlayer()
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:15 - Modifiers: ``
- Return:
Player
คืออะไร
อ่านค่า Trading Player
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#getVillagerXp()
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:26 - Modifiers: ``
- Return:
int
คืออะไร
อ่านค่า Villager Xp
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#isClientSide()
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:48 - Modifiers: ``
- Return:
boolean
คืออะไร
ตรวจสอบสถานะ Client Side
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#notifyTrade(MerchantOffer)
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:22 - Modifiers: ``
- Return:
void
คืออะไร
ดำเนินการ notifyTrade ตาม implementation ของ Merchant
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
MerchantOffer merchantOffer
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#notifyTradeUpdated(ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:24 - Modifiers: ``
- Return:
void
คืออะไร
ดำเนินการ notifyTradeUpdated ตาม implementation ของ Merchant
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#openTradingScreen(Player,Component,int)
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:38 - Modifiers:
default - Return:
void
คืออะไร
เปิด Trading Screen
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: openMenu(), isPresent(), getOffers(), isEmpty(), sendMerchantOffers(), getAsInt(), getVillagerXp(), showProgressBar(). สร้างออบเจ็กต์: SimpleMenuProvider, MerchantMenu.
Parameters
Player playerComponent componentint i
ตัวอย่างใช้งาน
Merchant instance = ...;
Player player = ...;
Component component = ...;
instance.openTradingScreen(player, component, 0);
net.minecraft.world.item.trading.Merchant#overrideOffers(MerchantOffers)
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:20 - Modifiers: ``
- Return:
void
คืออะไร
ดำเนินการ overrideOffers ตาม implementation ของ Merchant
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
MerchantOffers merchantOffers
ตัวอย่างใช้งาน
Merchant instance = ...;
MerchantOffers merchantOffers = ...;
instance.overrideOffers(merchantOffers);
net.minecraft.world.item.trading.Merchant#overrideXp(int)
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:28 - Modifiers: ``
- Return:
void
คืออะไร
ดำเนินการ overrideXp ตาม implementation ของ Merchant
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#setTradingPlayer(Player)
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:13 - Modifiers: ``
- Return:
void
คืออะไร
กำหนดค่า Trading Player
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
Player player
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#showProgressBar()
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:30 - Modifiers: ``
- Return:
boolean
คืออะไร
ดำเนินการ showProgressBar ตาม implementation ของ Merchant
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.Merchant#stillValid(Player)
- Origin:
common - Source:
net/minecraft/world/item/trading/Merchant.java:50 - Modifiers: ``
- Return:
boolean
คืออะไร
ดำเนินการ stillValid ตาม implementation ของ Merchant
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
Player player
ตัวอย่างใช้งาน
MerchantOffer
- Full name:
net.minecraft.world.item.trading.MerchantOffer - Package:
net.minecraft.world.item.trading - Source:
common—net/minecraft/world/item/trading/MerchantOffer.java - Type:
class - Modifiers:
public
net.minecraft.world.item.trading.MerchantOffer#addToSpecialPriceDiff(int)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:143 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม To Special Price Diff
ทำงานยังไง
แก้ state: specialPriceDiff.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#assemble()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:119 - Modifiers:
public - Return:
ItemStack
คืออะไร
ดำเนินการ assemble ตาม implementation ของ MerchantOffer
ทำงานยังไง
เรียกต่อ: copy(). คืนค่า: this.result.copy().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#copy()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:204 - Modifiers:
public - Return:
MerchantOffer
คืออะไร
คัดลอก copy
ทำงานยังไง
สร้างออบเจ็กต์: MerchantOffer. คืนค่า: new MerchantOffer(this).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#createFromStream(RegistryFriendlyByteBuf)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:221 - Modifiers:
public static - Return:
MerchantOffer
คืออะไร
สร้าง From Stream
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: decode(), readBoolean(), readInt(), readFloat(), setToOutOfStock(), setSpecialPriceDiff(). สร้างออบเจ็กต์: MerchantOffer. คืนค่า: merchantOffer.
Parameters
RegistryFriendlyByteBuf registryFriendlyByteBuf
ตัวอย่างใช้งาน
RegistryFriendlyByteBuf registryFriendlyByteBuf = ...;
MerchantOffer result = MerchantOffer.createFromStream(registryFriendlyByteBuf);
net.minecraft.world.item.trading.MerchantOffer#getBaseCostA()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:85 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Base Cost A
ทำงานยังไง
เรียกต่อ: itemStack(). คืนค่า: this.baseCostA.itemStack().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getCostA()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:89 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Cost A
ทำงานยังไง
เรียกต่อ: itemStack(), copyWithCount(), getModifiedCostCount(). คืนค่า: this.baseCostA.itemStack().copyWithCount(this.getModifiedCostCount(this.baseCostA)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getCostB()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:99 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Cost B
ทำงานยังไง
เรียกต่อ: map(), orElse(). คืนค่า: this.costB.map(ItemCost::itemStack).orElse(ItemStack.EMPTY).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getDemand()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:139 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Demand
ทำงานยังไง
คืนค่า: this.demand.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getItemCostA()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:103 - Modifiers:
public - Return:
ItemCost
คืออะไร
อ่านค่า Item Cost A
ทำงานยังไง
คืนค่า: this.baseCostA.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getItemCostB()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:107 - Modifiers:
public - Return:
Optional<ItemCost>
คืออะไร
อ่านค่า Item Cost B
ทำงานยังไง
คืนค่า: this.costB.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getMaxUses()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:131 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Max Uses
ทำงานยังไง
คืนค่า: this.maxUses.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getPriceMultiplier()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:159 - Modifiers:
public - Return:
float
คืออะไร
อ่านค่า Price Multiplier
ทำงานยังไง
คืนค่า: this.priceMultiplier.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getResult()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:111 - Modifiers:
public - Return:
ItemStack
คืออะไร
อ่านค่า Result
ทำงานยังไง
คืนค่า: this.result.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getSpecialPriceDiff()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:151 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Special Price Diff
ทำงานยังไง
คืนค่า: this.specialPriceDiff.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getUses()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:123 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Uses
ทำงานยังไง
คืนค่า: this.uses.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#getXp()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:163 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Xp
ทำงานยังไง
คืนค่า: this.xp.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#increaseUses()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:135 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ increaseUses ตาม implementation ของ MerchantOffer
ทำงานยังไง
แก้ state: uses.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#isOutOfStock()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:167 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Out Of Stock
ทำงานยังไง
คืนค่า: this.uses >= this.maxUses.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#MerchantOffer(ItemCost,ItemStack,int,int,float)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:54 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MerchantOffer ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: empty().
Parameters
ItemCost itemCostItemStack itemStackint iint jfloat f
ตัวอย่างใช้งาน
ItemCost itemCost = ...;
ItemStack itemStack = ...;
MerchantOffer instance = new MerchantOffer(itemCost, itemStack, 0, 0, 0.0F);
net.minecraft.world.item.trading.MerchantOffer#MerchantOffer(ItemCost,Optional<ItemCost>,ItemStack,int,int,float)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:58 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MerchantOffer ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ItemCost itemCostOptional<ItemCost> optionalItemStack itemStackint iint jfloat f
ตัวอย่างใช้งาน
ItemCost itemCost = ...;
Optional<ItemCost> optional = ...;
ItemStack itemStack = ...;
MerchantOffer instance = new MerchantOffer(itemCost, optional, itemStack, 0, 0, 0.0F);
net.minecraft.world.item.trading.MerchantOffer#MerchantOffer(ItemCost,Optional<ItemCost>,ItemStack,int,int,int,float)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:62 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MerchantOffer ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ItemCost itemCostOptional<ItemCost> optionalItemStack itemStackint iint jint kfloat f
ตัวอย่างใช้งาน
ItemCost itemCost = ...;
Optional<ItemCost> optional = ...;
ItemStack itemStack = ...;
MerchantOffer instance = new MerchantOffer(itemCost, optional, itemStack, 0, 0, 0, 0.0F);
net.minecraft.world.item.trading.MerchantOffer#MerchantOffer(ItemCost,Optional<ItemCost>,ItemStack,int,int,int,float,int)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:66 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MerchantOffer ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
ItemCost itemCostOptional<ItemCost> optionalItemStack itemStackint iint jint kfloat fint l
ตัวอย่างใช้งาน
ItemCost itemCost = ...;
Optional<ItemCost> optional = ...;
ItemStack itemStack = ...;
MerchantOffer instance = new MerchantOffer(itemCost, optional, itemStack, 0, 0, 0, 0.0F, 0);
net.minecraft.world.item.trading.MerchantOffer#needsRestock()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:175 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ needsRestock ตาม implementation ของ MerchantOffer
ทำงานยังไง
คืนค่า: this.uses > 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#resetSpecialPriceDiff()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:147 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต Special Price Diff
ทำงานยังไง
แก้ state: specialPriceDiff.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#resetUses()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:127 - Modifiers:
public - Return:
void
คืออะไร
รีเซ็ต Uses
ทำงานยังไง
แก้ state: uses.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#satisfiedBy(ItemStack,ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:183 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ satisfiedBy ตาม implementation ของ MerchantOffer
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: test(), getCount(), getModifiedCostCount(), isPresent(), isEmpty(), get(), count(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackItemStack itemStack2
ตัวอย่างใช้งาน
MerchantOffer instance = ...;
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
boolean result = instance.satisfiedBy(itemStack, itemStack2);
net.minecraft.world.item.trading.MerchantOffer#setSpecialPriceDiff(int)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:155 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Special Price Diff
ทำงานยังไง
แก้ state: specialPriceDiff.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#setToOutOfStock()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:171 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า To Out Of Stock
ทำงานยังไง
แก้ state: uses.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#shouldRewardExp()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:179 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่าควร Reward Exp
ทำงานยังไง
คืนค่า: this.rewardExp.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffer#take(ItemStack,ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:191 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ take ตาม implementation ของ MerchantOffer
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: satisfiedBy(), shrink(), getCostA(), getCount(), getCostB(), isEmpty(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackItemStack itemStack2
ตัวอย่างใช้งาน
MerchantOffer instance = ...;
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
boolean result = instance.take(itemStack, itemStack2);
net.minecraft.world.item.trading.MerchantOffer#updateDemand()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffer.java:115 - Modifiers:
public - Return:
void
คืออะไร
อัปเดต Demand
ทำงานยังไง
แก้ state: demand.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
MerchantOffers
- Full name:
net.minecraft.world.item.trading.MerchantOffers - Package:
net.minecraft.world.item.trading - Source:
common—net/minecraft/world/item/trading/MerchantOffers.java - Type:
class - Modifiers:
public - Extends:
ArrayList<MerchantOffer>
net.minecraft.world.item.trading.MerchantOffers#copy()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffers.java:51 - Modifiers:
public - Return:
MerchantOffers
คืออะไร
คัดลอก copy
ทำงานยังไง
มีการวนลูป. เรียกต่อ: size(), add(). สร้างออบเจ็กต์: MerchantOffers. คืนค่า: merchantOffers.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.trading.MerchantOffers#getRecipeFor(ItemStack,ItemStack,int)
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffers.java:34 - Modifiers:
public - Return:
MerchantOffer
คืออะไร
อ่านค่า Recipe For
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), get(), satisfiedBy(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackItemStack itemStack2int i
ตัวอย่างใช้งาน
MerchantOffers instance = ...;
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
MerchantOffer result = instance.getRecipeFor(itemStack, itemStack2, 0);
net.minecraft.world.item.trading.MerchantOffers#MerchantOffers()
- Origin:
common - Source:
net/minecraft/world/item/trading/MerchantOffers.java:23 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MerchantOffers ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี