Package net.minecraft.world.level.storage.loot.functions
Part 1/1
ApplyBonusCount
- Full name:
net.minecraft.world.level.storage.loot.functions.ApplyBonusCount - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/ApplyBonusCount.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.ApplyBonusCount#addBonusBinomialDistributionCount(Holder<Enchantment>,float,int)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyBonusCount.java:78 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
เพิ่ม Bonus Binomial Distribution Count
ทำงานยังไง
เรียกต่อ: simpleBuilder(), BinomialWithBonusCount(). สร้างออบเจ็กต์: ApplyBonusCount, ApplyBonusCount.BinomialWithBonusCount. คืนค่า: simpleBuilder(list -> new ApplyBonusCount(list, holder, new ApplyBonusCount.BinomialWithBonusCount(i, f))).
Parameters
Holder<Enchantment> holderfloat fint i
ตัวอย่างใช้งาน
Holder<Enchantment> holder = ...;
LootItemConditionalFunction.Builder<?> result = ApplyBonusCount.addBonusBinomialDistributionCount(holder, 0.0F, 0);
net.minecraft.world.level.storage.loot.functions.ApplyBonusCount#addOreBonusCount(Holder<Enchantment>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyBonusCount.java:82 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
เพิ่ม Ore Bonus Count
ทำงานยังไง
เรียกต่อ: simpleBuilder(), OreDrops(). สร้างออบเจ็กต์: ApplyBonusCount, ApplyBonusCount.OreDrops. คืนค่า: simpleBuilder(list -> new ApplyBonusCount(list, holder, new ApplyBonusCount.OreDrops())).
Parameters
Holder<Enchantment> holder
ตัวอย่างใช้งาน
Holder<Enchantment> holder = ...;
LootItemConditionalFunction.Builder<?> result = ApplyBonusCount.addOreBonusCount(holder);
net.minecraft.world.level.storage.loot.functions.ApplyBonusCount#addUniformBonusCount(Holder<Enchantment>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyBonusCount.java:86 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
เพิ่ม Uniform Bonus Count
ทำงานยังไง
เรียกต่อ: simpleBuilder(), UniformBonusCount(). สร้างออบเจ็กต์: ApplyBonusCount, ApplyBonusCount.UniformBonusCount. คืนค่า: simpleBuilder(list -> new ApplyBonusCount(list, holder, new ApplyBonusCount.UniformBonusCount(1))).
Parameters
Holder<Enchantment> holder
ตัวอย่างใช้งาน
Holder<Enchantment> holder = ...;
LootItemConditionalFunction.Builder<?> result = ApplyBonusCount.addUniformBonusCount(holder);
net.minecraft.world.level.storage.loot.functions.ApplyBonusCount#addUniformBonusCount(Holder<Enchantment>,int)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyBonusCount.java:90 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
เพิ่ม Uniform Bonus Count
ทำงานยังไง
เรียกต่อ: simpleBuilder(), UniformBonusCount(). สร้างออบเจ็กต์: ApplyBonusCount, ApplyBonusCount.UniformBonusCount. คืนค่า: simpleBuilder(list -> new ApplyBonusCount(list, holder, new ApplyBonusCount.UniformBonusCount(i))).
Parameters
Holder<Enchantment> holderint i
ตัวอย่างใช้งาน
Holder<Enchantment> holder = ...;
LootItemConditionalFunction.Builder<?> result = ApplyBonusCount.addUniformBonusCount(holder, 0);
net.minecraft.world.level.storage.loot.functions.ApplyBonusCount#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyBonusCount.java:61 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.TOOL).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.ApplyBonusCount#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyBonusCount.java:56 - Modifiers:
public - Return:
LootItemFunctionType<ApplyBonusCount>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.APPLY_BONUS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.ApplyBonusCount#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyBonusCount.java:66 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOptionalParameter(), getItemEnchantmentLevel(), calculateNewCount(), getRandom(), getCount(), setCount(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ApplyBonusCount instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
ApplyExplosionDecay
- Full name:
net.minecraft.world.level.storage.loot.functions.ApplyExplosionDecay - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/ApplyExplosionDecay.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.ApplyExplosionDecay#explosionDecay()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyExplosionDecay.java:47 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
ดำเนินการ explosionDecay ตาม implementation ของ ApplyExplosionDecay
ทำงานยังไง
เรียกต่อ: simpleBuilder(). คืนค่า: simpleBuilder(ApplyExplosionDecay::new).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.ApplyExplosionDecay#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyExplosionDecay.java:21 - Modifiers:
public - Return:
LootItemFunctionType<ApplyExplosionDecay>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.EXPLOSION_DECAY.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ApplyExplosionDecay instance = ...;
LootItemFunctionType<ApplyExplosionDecay> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.ApplyExplosionDecay#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ApplyExplosionDecay.java:26 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getOptionalParameter(), getRandom(), getCount(), nextFloat(), setCount(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ApplyExplosionDecay instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
CopyBlockState
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyBlockState - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyBlockState.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.CopyBlockState#copyState(Block)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyBlockState.java:76 - Modifiers:
public static - Return:
CopyBlockState.Builder
คืออะไร
คัดลอก State
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: CopyBlockState.Builder. คืนค่า: new CopyBlockState.Builder(block).
Parameters
Block block
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.CopyBlockState#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyBlockState.java:53 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.BLOCK_STATE).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.CopyBlockState#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyBlockState.java:48 - Modifiers:
public - Return:
LootItemFunctionType<CopyBlockState>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.COPY_STATE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.CopyBlockState#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyBlockState.java:58 - Modifiers:
protected - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getOptionalParameter(), update(), hasProperty(), with(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}
CopyBlockState$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyBlockState$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyBlockState.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<CopyBlockState.Builder>
net.minecraft.world.level.storage.loot.functions.CopyBlockState$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyBlockState.java:101 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: CopyBlockState. คืนค่า: new CopyBlockState(this.getConditions(), this.block, this.properties.build()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.CopyBlockState$Builder#copy(Property<?>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyBlockState.java:88 - Modifiers:
public - Return:
CopyBlockState.Builder
คืออะไร
คัดลอก copy
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: value(), getStateDefinition(), getProperties(), contains(), add(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: this.
Parameters
Property<?> property
ตัวอย่างใช้งาน
CopyBlockState.Builder instance = ...;
Property<?> property = ...;
CopyBlockState.Builder result = instance.copy(property);
net.minecraft.world.level.storage.loot.functions.CopyBlockState$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyBlockState.java:97 - Modifiers:
protected - Return:
CopyBlockState.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CopyComponentsFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction#copyComponents(CopyComponentsFunction.Source)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:73 - Modifiers:
public static - Return:
CopyComponentsFunction.Builder
คืออะไร
คัดลอก Components
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: CopyComponentsFunction.Builder. คืนค่า: new CopyComponentsFunction.Builder(source).
Parameters
CopyComponentsFunction.Source source
ตัวอย่างใช้งาน
CopyComponentsFunction.Source source = ...;
CopyComponentsFunction.Builder result = CopyComponentsFunction.copyComponents(source);
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:61 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
คืนค่า: this.source.getReferencedContextParams().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CopyComponentsFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:56 - Modifiers:
public - Return:
LootItemFunctionType<CopyComponentsFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.COPY_COMPONENTS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CopyComponentsFunction instance = ...;
LootItemFunctionType<CopyComponentsFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:66 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: get(), applyComponents(), filter(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
CopyComponentsFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
CopyComponentsFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<CopyComponentsFunction.Builder>
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:108 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(), map(). สร้างออบเจ็กต์: CopyComponentsFunction.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction$Builder#exclude(DataComponentType<?>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:95 - Modifiers:
public - Return:
CopyComponentsFunction.Builder
คืออะไร
ดำเนินการ exclude ตาม implementation ของ CopyComponentsFunction$Builder
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: exclude. เรียกต่อ: isEmpty(), of(), builder(), get(), add(). คืนค่า: this.
Parameters
DataComponentType<?> dataComponentType
ตัวอย่างใช้งาน
CopyComponentsFunction.Builder instance = ...;
DataComponentType<?> dataComponentType = ...;
CopyComponentsFunction.Builder result = instance.exclude(dataComponentType);
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:104 - Modifiers:
protected - Return:
CopyComponentsFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction$Builder#include(DataComponentType<?>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:86 - Modifiers:
public - Return:
CopyComponentsFunction.Builder
คืออะไร
ดำเนินการ include ตาม implementation ของ CopyComponentsFunction$Builder
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: include. เรียกต่อ: isEmpty(), of(), builder(), get(), add(). คืนค่า: this.
Parameters
DataComponentType<?> dataComponentType
ตัวอย่างใช้งาน
CopyComponentsFunction.Builder instance = ...;
DataComponentType<?> dataComponentType = ...;
CopyComponentsFunction.Builder result = instance.include(dataComponentType);
CopyComponentsFunction$Source
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction$Source - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction$Source#get(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:126 - Modifiers:
public - Return:
DataComponentMap
คืออะไร
อ่านค่า get
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: getOptionalParameter(), collectComponents(). สร้างออบเจ็กต์: MatchException. คืนค่า: blockEntity != null ? blockEntity.collectComponents() : DataComponentMap.EMPTY.
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
CopyComponentsFunction.Source instance = ...;
LootContext lootContext = ...;
DataComponentMap result = instance.get(lootContext);
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction$Source#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:136 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
แยกกรณีด้วย switch. เรียกต่อ: of(). สร้างออบเจ็กต์: MatchException. คืนค่า: Set.of(LootContextParams.BLOCK_ENTITY).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CopyComponentsFunction.Source instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction$Source#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyComponentsFunction.java:145 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CopyCustomDataFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction#copyData(LootContext.EntityTarget)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:87 - Modifiers:
public static - Return:
CopyCustomDataFunction.Builder
คืออะไร
คัดลอก Data
ทำงานยังไง
เรียกต่อ: Builder(), forContextEntity(). สร้างออบเจ็กต์: CopyCustomDataFunction.Builder. คืนค่า: new CopyCustomDataFunction.Builder(ContextNbtProvider.forContextEntity(entityTarget)).
Parameters
LootContext.EntityTarget entityTarget
ตัวอย่างใช้งาน
LootContext.EntityTarget entityTarget = ...;
CopyCustomDataFunction.Builder result = CopyCustomDataFunction.copyData(entityTarget);
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction#copyData(NbtProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:82 - Modifiers:
public static - Return:
CopyCustomDataFunction.Builder
คืออะไร
คัดลอก Data
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: CopyCustomDataFunction.Builder. คืนค่า: new CopyCustomDataFunction.Builder(nbtProvider).
Parameters
NbtProvider nbtProvider
ตัวอย่างใช้งาน
NbtProvider nbtProvider = ...;
CopyCustomDataFunction.Builder result = CopyCustomDataFunction.copyData(nbtProvider);
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:53 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
คืนค่า: this.source.getReferencedContextParams().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CopyCustomDataFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:48 - Modifiers:
public - Return:
LootItemFunctionType<CopyCustomDataFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.COPY_CUSTOM_DATA.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CopyCustomDataFunction instance = ...;
LootItemFunctionType<CopyCustomDataFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:58 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), getValue(), setValue(), getOrDefault(), copyTag(), forEach(), apply(), set(). สร้างออบเจ็กต์: MutableObject<>. มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
CopyCustomDataFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
CopyCustomDataFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<CopyCustomDataFunction.Builder>
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:116 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: CopyCustomDataFunction. คืนค่า: new CopyCustomDataFunction(this.getConditions(), this.source, this.ops).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction$Builder#copy(String,String)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:108 - Modifiers:
public - Return:
CopyCustomDataFunction.Builder
คืออะไร
คัดลอก copy
ทำงานยังไง
คืนค่า: this.copy(string, string2, CopyCustomDataFunction.MergeStrategy.REPLACE).
Parameters
String stringString string2
ตัวอย่างใช้งาน
CopyCustomDataFunction.Builder instance = ...;
CopyCustomDataFunction.Builder result = instance.copy("value", "value");
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction$Builder#copy(String,String,CopyCustomDataFunction.MergeStrategy)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:99 - Modifiers:
public - Return:
CopyCustomDataFunction.Builder
คืออะไร
คัดลอก copy
ทำงานยังไง
มีการจัดการ exception. เรียกต่อ: add(), CopyOperation(), of(). สร้างออบเจ็กต์: CopyCustomDataFunction.CopyOperation, IllegalArgumentException. คืนค่า: this.
Parameters
String stringString string2CopyCustomDataFunction.MergeStrategy mergeStrategy
ตัวอย่างใช้งาน
CopyCustomDataFunction.Builder instance = ...;
CopyCustomDataFunction.MergeStrategy mergeStrategy = ...;
CopyCustomDataFunction.Builder result = instance.copy("value", "value", mergeStrategy);
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:112 - Modifiers:
protected - Return:
CopyCustomDataFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CopyCustomDataFunction$MergeStrategy
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction$MergeStrategy - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction$MergeStrategy#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:186 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction$MergeStrategy#merge(Tag,NbtPathArgument.NbtPath,List<Tag>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyCustomDataFunction.java:180 - Modifiers:
public abstract - Return:
void
คืออะไร
ดำเนินการ merge ตาม implementation ของ CopyCustomDataFunction$MergeStrategy
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
Tag tagNbtPathArgument.NbtPath nbtPathList<Tag> list
Throws
CommandSyntaxException
ตัวอย่างใช้งาน
CopyCustomDataFunction.MergeStrategy instance = ...;
Tag tag = ...;
NbtPathArgument.NbtPath nbtPath = ...;
List<Tag> list = ...;
instance.merge(tag, nbtPath, list);
CopyNameFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyNameFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.CopyNameFunction#copyName(CopyNameFunction.NameSource)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java:49 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
คัดลอก Name
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: CopyNameFunction. คืนค่า: simpleBuilder(list -> new CopyNameFunction(list, nameSource)).
Parameters
CopyNameFunction.NameSource nameSource
ตัวอย่างใช้งาน
CopyNameFunction.NameSource nameSource = ...;
LootItemConditionalFunction.Builder<?> result = CopyNameFunction.copyName(nameSource);
net.minecraft.world.level.storage.loot.functions.CopyNameFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java:35 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(this.source.param).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.CopyNameFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java:30 - Modifiers:
public - Return:
LootItemFunctionType<CopyNameFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.COPY_NAME.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
CopyNameFunction instance = ...;
LootItemFunctionType<CopyNameFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.CopyNameFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java:40 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOptionalParameter(), set(), getCustomName(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
CopyNameFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
CopyNameFunction$NameSource
- Full name:
net.minecraft.world.level.storage.loot.functions.CopyNameFunction$NameSource - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.level.storage.loot.functions.CopyNameFunction$NameSource#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java:68 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
EnchantedCountIncreaseFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java:55 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: union(), of(). คืนค่า: Sets.union(ImmutableSet.of(LootContextParams.ATTACKING_ENTITY), this.value.getReferencedContextParams()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
EnchantedCountIncreaseFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java:50 - Modifiers:
public - Return:
LootItemFunctionType<EnchantedCountIncreaseFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.ENCHANTED_COUNT_INCREASE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
EnchantedCountIncreaseFunction instance = ...;
LootItemFunctionType<EnchantedCountIncreaseFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction#lootingMultiplier(HolderLookup.Provider,NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java:83 - Modifiers:
public static - Return:
EnchantedCountIncreaseFunction.Builder
คืออะไร
ดำเนินการ lootingMultiplier ตาม implementation ของ EnchantedCountIncreaseFunction
ทำงานยังไง
เรียกต่อ: lookupOrThrow(), Builder(), getOrThrow(). สร้างออบเจ็กต์: EnchantedCountIncreaseFunction.Builder. คืนค่า: new EnchantedCountIncreaseFunction.Builder(registryLookup.getOrThrow(Enchantments.LOOTING), numberProvider).
Parameters
HolderLookup.Provider providerNumberProvider numberProvider
ตัวอย่างใช้งาน
HolderLookup.Provider provider = ...;
NumberProvider numberProvider = ...;
EnchantedCountIncreaseFunction.Builder result = EnchantedCountIncreaseFunction.lootingMultiplier(provider, numberProvider);
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java:64 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOptionalParameter(), getEnchantmentLevel(), getFloat(), grow(), round(), hasLimit(), limitSize(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
EnchantedCountIncreaseFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
EnchantedCountIncreaseFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<EnchantedCountIncreaseFunction.Builder>
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java:107 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: EnchantedCountIncreaseFunction. คืนค่า: new EnchantedCountIncreaseFunction(this.getConditions(), this.enchantment, this.count, this.limit).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction$Builder#Builder(Holder<Enchantment>,NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java:93 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EnchantedCountIncreaseFunction.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: enchantment, count.
Parameters
Holder<Enchantment> holderNumberProvider numberProvider
ตัวอย่างใช้งาน
Holder<Enchantment> holder = ...;
NumberProvider numberProvider = ...;
EnchantedCountIncreaseFunction.Builder instance = new EnchantedCountIncreaseFunction.Builder(holder, numberProvider);
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java:98 - Modifiers:
protected - Return:
EnchantedCountIncreaseFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction$Builder#setLimit(int)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java:102 - Modifiers:
public - Return:
EnchantedCountIncreaseFunction.Builder
คืออะไร
กำหนดค่า Limit
ทำงานยังไง
แก้ state: limit. คืนค่า: this.
Parameters
int i
ตัวอย่างใช้งาน
EnchantedCountIncreaseFunction.Builder instance = ...;
EnchantedCountIncreaseFunction.Builder result = instance.setLimit(0);
EnchantRandomlyFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java:48 - Modifiers:
public - Return:
LootItemFunctionType<EnchantRandomlyFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.ENCHANT_RANDOMLY.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
EnchantRandomlyFunction instance = ...;
LootItemFunctionType<EnchantRandomlyFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction#randomApplicableEnchantment(HolderLookup.Provider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java:86 - Modifiers:
public static - Return:
EnchantRandomlyFunction.Builder
คืออะไร
ดำเนินการ randomApplicableEnchantment ตาม implementation ของ EnchantRandomlyFunction
ทำงานยังไง
เรียกต่อ: randomEnchantment(), withOneOf(), lookupOrThrow(), getOrThrow(). คืนค่า: randomEnchantment().withOneOf(provider.lookupOrThrow(Registries.ENCHANTMENT).getOrThrow(EnchantmentTags.ON_RANDOM_LOOT)).
Parameters
HolderLookup.Provider provider
ตัวอย่างใช้งาน
HolderLookup.Provider provider = ...;
EnchantRandomlyFunction.Builder result = EnchantRandomlyFunction.randomApplicableEnchantment(provider);
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction#randomEnchantment()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java:82 - Modifiers:
public static - Return:
EnchantRandomlyFunction.Builder
คืออะไร
ดำเนินการ randomEnchantment ตาม implementation ของ EnchantRandomlyFunction
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: EnchantRandomlyFunction.Builder. คืนค่า: new EnchantRandomlyFunction.Builder().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java:53 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getRandom(), is(), map(), orElseGet(), getLevel(), registryAccess(), lookupOrThrow(), listElements(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
EnchantRandomlyFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
EnchantRandomlyFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<EnchantRandomlyFunction.Builder>
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction$Builder#allowingIncompatibleEnchantments()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java:108 - Modifiers:
public - Return:
EnchantRandomlyFunction.Builder
คืออะไร
ดำเนินการ allowingIncompatibleEnchantments ตาม implementation ของ EnchantRandomlyFunction$Builder
ทำงานยังไง
แก้ state: onlyCompatible. คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
EnchantRandomlyFunction.Builder instance = ...;
EnchantRandomlyFunction.Builder result = instance.allowingIncompatibleEnchantments();
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java:113 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: EnchantRandomlyFunction. คืนค่า: new EnchantRandomlyFunction(this.getConditions(), this.options, this.onlyCompatible).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java:94 - Modifiers:
protected - Return:
EnchantRandomlyFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction$Builder#withEnchantment(Holder<Enchantment>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java:98 - Modifiers:
public - Return:
EnchantRandomlyFunction.Builder
คืออะไร
ดำเนินการ withEnchantment ตาม implementation ของ EnchantRandomlyFunction$Builder
ทำงานยังไง
แก้ state: options. เรียกต่อ: of(), direct(). คืนค่า: this.
Parameters
Holder<Enchantment> holder
ตัวอย่างใช้งาน
EnchantRandomlyFunction.Builder instance = ...;
Holder<Enchantment> holder = ...;
EnchantRandomlyFunction.Builder result = instance.withEnchantment(holder);
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction$Builder#withOneOf(HolderSet<Enchantment>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java:103 - Modifiers:
public - Return:
EnchantRandomlyFunction.Builder
คืออะไร
ดำเนินการ withOneOf ตาม implementation ของ EnchantRandomlyFunction$Builder
ทำงานยังไง
แก้ state: options. เรียกต่อ: of(). คืนค่า: this.
Parameters
HolderSet<Enchantment> holderSet
ตัวอย่างใช้งาน
EnchantRandomlyFunction.Builder instance = ...;
HolderSet<Enchantment> holderSet = ...;
EnchantRandomlyFunction.Builder result = instance.withOneOf(holderSet);
EnchantWithLevelsFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction#enchantWithLevels(HolderLookup.Provider,NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java:63 - Modifiers:
public static - Return:
EnchantWithLevelsFunction.Builder
คืออะไร
ดำเนินการ enchantWithLevels ตาม implementation ของ EnchantWithLevelsFunction
ทำงานยังไง
เรียกต่อ: Builder(), fromOptions(), lookupOrThrow(), getOrThrow(). สร้างออบเจ็กต์: EnchantWithLevelsFunction.Builder. คืนค่า: new EnchantWithLevelsFunction.Builder(numberProvider) .fromOptions(provider.lookupOrThrow(Registries.ENCHANTMENT).getOrThrow(EnchantmentTags.ON_RANDOM_LOOT)).
Parameters
HolderLookup.Provider providerNumberProvider numberProvider
ตัวอย่างใช้งาน
HolderLookup.Provider provider = ...;
NumberProvider numberProvider = ...;
EnchantWithLevelsFunction.Builder result = EnchantWithLevelsFunction.enchantWithLevels(provider, numberProvider);
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java:51 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
คืนค่า: this.levels.getReferencedContextParams().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
EnchantWithLevelsFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java:46 - Modifiers:
public - Return:
LootItemFunctionType<EnchantWithLevelsFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.ENCHANT_WITH_LEVELS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
EnchantWithLevelsFunction instance = ...;
LootItemFunctionType<EnchantWithLevelsFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java:56 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: getRandom(), getLevel(), registryAccess(), enchantItem(), getInt(). คืนค่า: EnchantmentHelper.enchantItem(randomSource, itemStack, this.levels.getInt(lootContext), registryAccess, this.options).
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
EnchantWithLevelsFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
EnchantWithLevelsFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<EnchantWithLevelsFunction.Builder>
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java:85 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: EnchantWithLevelsFunction. คืนค่า: new EnchantWithLevelsFunction(this.getConditions(), this.levels, this.options).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction$Builder#Builder(NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java:72 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EnchantWithLevelsFunction.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: levels.
Parameters
NumberProvider numberProvider
ตัวอย่างใช้งาน
NumberProvider numberProvider = ...;
EnchantWithLevelsFunction.Builder instance = new EnchantWithLevelsFunction.Builder(numberProvider);
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction$Builder#fromOptions(HolderSet<Enchantment>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java:80 - Modifiers:
public - Return:
EnchantWithLevelsFunction.Builder
คืออะไร
ดำเนินการ fromOptions ตาม implementation ของ EnchantWithLevelsFunction$Builder
ทำงานยังไง
แก้ state: options. เรียกต่อ: of(). คืนค่า: this.
Parameters
HolderSet<Enchantment> holderSet
ตัวอย่างใช้งาน
EnchantWithLevelsFunction.Builder instance = ...;
HolderSet<Enchantment> holderSet = ...;
EnchantWithLevelsFunction.Builder result = instance.fromOptions(holderSet);
net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/EnchantWithLevelsFunction.java:76 - Modifiers:
protected - Return:
EnchantWithLevelsFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ExplorationMapFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:68 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.ORIGIN).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ExplorationMapFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:63 - Modifiers:
public - Return:
LootItemFunctionType<ExplorationMapFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.EXPLORATION_MAP.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ExplorationMapFunction instance = ...;
LootItemFunctionType<ExplorationMapFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction#makeExplorationMap()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:94 - Modifiers:
public static - Return:
ExplorationMapFunction.Builder
คืออะไร
สร้าง Exploration Map
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: ExplorationMapFunction.Builder. คืนค่า: new ExplorationMapFunction.Builder().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:73 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getOptionalParameter(), getLevel(), findNearestMapStructure(), containing(), create(), getX(), getZ(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ExplorationMapFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
ExplorationMapFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<ExplorationMapFunction.Builder>
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:134 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: ExplorationMapFunction. คืนค่า: new ExplorationMapFunction(this.getConditions(), this.destination, this.mapDecoration, this.zoom, this.searchRadius, this.skipKnownStructures).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:105 - Modifiers:
protected - Return:
ExplorationMapFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction$Builder#setDestination(TagKey<Structure>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:109 - Modifiers:
public - Return:
ExplorationMapFunction.Builder
คืออะไร
กำหนดค่า Destination
ทำงานยังไง
แก้ state: destination. คืนค่า: this.
Parameters
TagKey<Structure> tagKey
ตัวอย่างใช้งาน
ExplorationMapFunction.Builder instance = ...;
TagKey<Structure> tagKey = ...;
ExplorationMapFunction.Builder result = instance.setDestination(tagKey);
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction$Builder#setMapDecoration(Holder<MapDecorationType>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:114 - Modifiers:
public - Return:
ExplorationMapFunction.Builder
คืออะไร
กำหนดค่า Map Decoration
ทำงานยังไง
แก้ state: mapDecoration. คืนค่า: this.
Parameters
Holder<MapDecorationType> holder
ตัวอย่างใช้งาน
ExplorationMapFunction.Builder instance = ...;
Holder<MapDecorationType> holder = ...;
ExplorationMapFunction.Builder result = instance.setMapDecoration(holder);
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction$Builder#setSearchRadius(int)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:124 - Modifiers:
public - Return:
ExplorationMapFunction.Builder
คืออะไร
กำหนดค่า Search Radius
ทำงานยังไง
แก้ state: searchRadius. คืนค่า: this.
Parameters
int i
ตัวอย่างใช้งาน
ExplorationMapFunction.Builder instance = ...;
ExplorationMapFunction.Builder result = instance.setSearchRadius(0);
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction$Builder#setSkipKnownStructures(boolean)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:129 - Modifiers:
public - Return:
ExplorationMapFunction.Builder
คืออะไร
กำหนดค่า Skip Known Structures
ทำงานยังไง
แก้ state: skipKnownStructures. คืนค่า: this.
Parameters
boolean bl
ตัวอย่างใช้งาน
ExplorationMapFunction.Builder instance = ...;
ExplorationMapFunction.Builder result = instance.setSkipKnownStructures(true);
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction$Builder#setZoom(byte)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java:119 - Modifiers:
public - Return:
ExplorationMapFunction.Builder
คืออะไร
กำหนดค่า Zoom
ทำงานยังไง
แก้ state: zoom. คืนค่า: this.
Parameters
byte b
ตัวอย่างใช้งาน
ExplorationMapFunction.Builder instance = ...;
ExplorationMapFunction.Builder result = instance.setZoom(0);
FillPlayerHead
- Full name:
net.minecraft.world.level.storage.loot.functions.FillPlayerHead - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/FillPlayerHead.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.FillPlayerHead#FillPlayerHead(List<LootItemCondition>,LootContext.EntityTarget)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FillPlayerHead.java:24 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ FillPlayerHead ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: entityTarget.
Parameters
List<LootItemCondition> listLootContext.EntityTarget entityTarget
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
LootContext.EntityTarget entityTarget = ...;
FillPlayerHead instance = new FillPlayerHead(list, entityTarget);
net.minecraft.world.level.storage.loot.functions.FillPlayerHead#fillPlayerHead(LootContext.EntityTarget)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FillPlayerHead.java:48 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
ดำเนินการ fillPlayerHead ตาม implementation ของ FillPlayerHead
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: FillPlayerHead. คืนค่า: simpleBuilder(list -> new FillPlayerHead(list, entityTarget)).
Parameters
LootContext.EntityTarget entityTarget
ตัวอย่างใช้งาน
LootContext.EntityTarget entityTarget = ...;
LootItemConditionalFunction.Builder<?> result = FillPlayerHead.fillPlayerHead(entityTarget);
net.minecraft.world.level.storage.loot.functions.FillPlayerHead#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FillPlayerHead.java:34 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(), getParam(). คืนค่า: Set.of(this.entityTarget.getParam()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.FillPlayerHead#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FillPlayerHead.java:29 - Modifiers:
public - Return:
LootItemFunctionType<FillPlayerHead>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.FILL_PLAYER_HEAD.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.FillPlayerHead#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FillPlayerHead.java:39 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), getOptionalParameter(), getParam(), set(), getGameProfile(). สร้างออบเจ็กต์: ResolvableProfile. คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
FillPlayerHead instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
FilteredFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.FilteredFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/FilteredFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.FilteredFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FilteredFunction.java:32 - Modifiers:
public - Return:
LootItemFunctionType<FilteredFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.FILTERED.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
FilteredFunction instance = ...;
LootItemFunctionType<FilteredFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.FilteredFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FilteredFunction.java:37 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: test(), apply(). คืนค่า: this.filter.test(itemStack) ? this.modifier.apply(itemStack, lootContext) : itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
FilteredFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.FilteredFunction#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FilteredFunction.java:42 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
เรียกต่อ: forChild().
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
FilteredFunction instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
FunctionReference
- Full name:
net.minecraft.world.level.storage.loot.functions.FunctionReference - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/FunctionReference.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.FunctionReference#functionReference(ResourceKey<LootItemFunction>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FunctionReference.java:73 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
ดำเนินการ functionReference ตาม implementation ของ FunctionReference
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: FunctionReference. คืนค่า: simpleBuilder(list -> new FunctionReference(list, resourceKey)).
Parameters
ResourceKey<LootItemFunction> resourceKey
ตัวอย่างใช้งาน
ResourceKey<LootItemFunction> resourceKey = ...;
LootItemConditionalFunction.Builder<?> result = FunctionReference.functionReference(resourceKey);
net.minecraft.world.level.storage.loot.functions.FunctionReference#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FunctionReference.java:30 - Modifiers:
public - Return:
LootItemFunctionType<FunctionReference>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.REFERENCE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
FunctionReference instance = ...;
LootItemFunctionType<FunctionReference> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.FunctionReference#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FunctionReference.java:52 - Modifiers:
protected - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: getResolver(), get(), map(), orElse(), warn(), location(), createVisitedEntry(), pushVisitedElement(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}
net.minecraft.world.level.storage.loot.functions.FunctionReference#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FunctionReference.java:35 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: allowsReferences(), reportProblem(), location(), hasVisitedElement(), resolver(), get(), ifPresentOrElse(), value().
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
FunctionReference instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
FunctionUserBuilder
- Full name:
net.minecraft.world.level.storage.loot.functions.FunctionUserBuilder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/FunctionUserBuilder.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.storage.loot.functions.FunctionUserBuilder#apply(E[],Function<E, LootItemFunction.Builder>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FunctionUserBuilder.java:19 - Modifiers:
default - Return:
T
คืออะไร
นำไปใช้ apply
ทำงานยังไง
เรียกต่อ: asList(). คืนค่า: this.apply(Arrays.asList(objects), function).
Parameters
E[] objectsFunction<E, LootItemFunction.Builder> function
ตัวอย่างใช้งาน
FunctionUserBuilder instance = ...;
E[] objects = ...;
Function<E, LootItemFunction.Builder> function = ...;
T result = instance.apply(objects, function);
net.minecraft.world.level.storage.loot.functions.FunctionUserBuilder#apply(Iterable<E>,Function<E, LootItemFunction.Builder>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FunctionUserBuilder.java:9 - Modifiers:
default - Return:
T
คืออะไร
นำไปใช้ apply
ทำงานยังไง
มีการวนลูป. เรียกต่อ: unwrap(). คืนค่า: functionUserBuilder.
Parameters
Iterable<E> iterableFunction<E, LootItemFunction.Builder> function
ตัวอย่างใช้งาน
FunctionUserBuilder instance = ...;
Iterable<E> iterable = ...;
Function<E, LootItemFunction.Builder> function = ...;
T result = instance.apply(iterable, function);
net.minecraft.world.level.storage.loot.functions.FunctionUserBuilder#apply(LootItemFunction.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FunctionUserBuilder.java:7 - Modifiers: ``
- Return:
T
คืออะไร
นำไปใช้ apply
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
LootItemFunction.Builder builder
ตัวอย่างใช้งาน
FunctionUserBuilder instance = ...;
LootItemFunction.Builder builder = ...;
T result = instance.apply(builder);
net.minecraft.world.level.storage.loot.functions.FunctionUserBuilder#unwrap()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/FunctionUserBuilder.java:23 - Modifiers: ``
- Return:
T
คืออะไร
ดำเนินการ unwrap ตาม implementation ของ FunctionUserBuilder
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LimitCount
- Full name:
net.minecraft.world.level.storage.loot.functions.LimitCount - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/LimitCount.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.LimitCount#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LimitCount.java:29 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
คืนค่า: this.limiter.getReferencedContextParams().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.LimitCount#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LimitCount.java:24 - Modifiers:
public - Return:
LootItemFunctionType<LimitCount>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.LIMIT_COUNT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.LimitCount#limitCount(IntRange)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LimitCount.java:41 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
ดำเนินการ limitCount ตาม implementation ของ LimitCount
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: LimitCount. คืนค่า: simpleBuilder(list -> new LimitCount(list, intRange)).
Parameters
IntRange intRange
ตัวอย่างใช้งาน
IntRange intRange = ...;
LootItemConditionalFunction.Builder<?> result = LimitCount.limitCount(intRange);
net.minecraft.world.level.storage.loot.functions.LimitCount#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LimitCount.java:34 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: clamp(), getCount(), setCount(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
LimitCount instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
ListOperation
- Full name:
net.minecraft.world.level.storage.loot.functions.ListOperation - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/ListOperation.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.storage.loot.functions.ListOperation#apply(List<T>,List<T>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ListOperation.java:35 - Modifiers:
default - Return:
List<T>
คืออะไร
นำไปใช้ apply
ทำงานยังไง
คืนค่า: this.apply(list, list2, Integer.MAX_VALUE).
Parameters
List<T> listList<T> list2
ตัวอย่างใช้งาน
ListOperation instance = ...;
List<T> list = ...;
List<T> list2 = ...;
List<T> result = instance.apply(list, list2);
net.minecraft.world.level.storage.loot.functions.ListOperation#apply(List<T>,List<T>,int)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ListOperation.java:39 - Modifiers: ``
- Return:
List<T>
คืออะไร
นำไปใช้ apply
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
List<T> listList<T> list2int i
ตัวอย่างใช้งาน
ListOperation instance = ...;
List<T> list = ...;
List<T> list2 = ...;
List<T> result = instance.apply(list, list2, 0);
net.minecraft.world.level.storage.loot.functions.ListOperation#codec(int)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ListOperation.java:20 - Modifiers:
static - Return:
MapCodec<ListOperation>
คืออะไร
ดำเนินการ codec ตาม implementation ของ ListOperation
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: dispatchMap(), validate(), size(), isPresent(), get(), error(), success(). มีจุด return อย่างน้อย 2 จุด.
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.ListOperation#mode()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ListOperation.java:33 - Modifiers: ``
- Return:
ListOperation.Type
คืออะไร
ดำเนินการ mode ตาม implementation ของ ListOperation
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemConditionalFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java - Type:
class - Modifiers:
public abstract - Implements:
LootItemFunction
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction#apply(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:38 - Modifiers:
public final - Return:
ItemStack
คืออะไร
นำไปใช้ apply
ทำงานยังไง
เรียกต่อ: test(), run(). คืนค่า: this.compositePredicates.test(lootContext) ? this.run(itemStack, lootContext) : itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
LootItemConditionalFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.apply(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction#commonFields(Instance<T>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:29 - Modifiers:
protected static - Return:
P1<Mu<T>, List<LootItemCondition>>
คืออะไร
ดำเนินการ commonFields ตาม implementation ของ LootItemConditionalFunction
ทำงานยังไง
เรียกต่อ: group(), listOf(), optionalFieldOf(), of(), forGetter().
Parameters
Instance<T> instance
ตัวอย่างใช้งาน
Instance<T> instance = ...;
@Override
protected P1<Mu<T>, List<LootItemCondition>> commonFields(Instance<T> instance) {
return super.commonFields(instance);
}
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:26 - Modifiers:
public abstract - Return:
LootItemFunctionType<? extends LootItemConditionalFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemConditionalFunction instance = ...;
LootItemFunctionType<? extends LootItemConditionalFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction#LootItemConditionalFunction(List<LootItemCondition>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:21 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LootItemConditionalFunction ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: predicates, compositePredicates. เรียกต่อ: allOf().
Parameters
List<LootItemCondition> list
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
LootItemConditionalFunction instance = new LootItemConditionalFunction(list);
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:42 - Modifiers:
protected abstract - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction#simpleBuilder(Function<List<LootItemCondition>, LootItemFunction>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:53 - Modifiers:
protected static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
ดำเนินการ simpleBuilder ตาม implementation ของ LootItemConditionalFunction
ทำงานยังไง
เรียกต่อ: DummyBuilder(). สร้างออบเจ็กต์: LootItemConditionalFunction.DummyBuilder. คืนค่า: new LootItemConditionalFunction.DummyBuilder(function).
Parameters
Function<List<LootItemCondition>, LootItemFunction> function
ตัวอย่างใช้งาน
Function<List<LootItemCondition>, LootItemFunction> function = ...;
@Override
protected LootItemConditionalFunction.Builder<?> simpleBuilder(Function<List<LootItemCondition>, LootItemFunction> function) {
return super.simpleBuilder(function);
}
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:44 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
มีการวนลูป. เรียกต่อ: size(), get(), forChild().
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
LootItemConditionalFunction instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
LootItemConditionalFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java - Type:
class - Modifiers:
public abstract static - Implements:
LootItemFunction.Builder,ConditionUserBuilder<T>
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction$Builder#getConditions()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:71 - Modifiers:
protected - Return:
List<LootItemCondition>
คืออะไร
อ่านค่า Conditions
ทำงานยังไง
เรียกต่อ: build(). คืนค่า: this.conditions.build().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:69 - Modifiers:
protected abstract - Return:
T
คืออะไร
อ่านค่า This
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction$Builder#unwrap()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:65 - Modifiers:
public final - Return:
T
คืออะไร
ดำเนินการ unwrap ตาม implementation ของ LootItemConditionalFunction$Builder
ทำงานยังไง
เรียกต่อ: getThis(). คืนค่า: this.getThis().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction$Builder#when(LootItemCondition.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java:60 - Modifiers:
public - Return:
T
คืออะไร
ดำเนินการ when ตาม implementation ของ LootItemConditionalFunction$Builder
ทำงานยังไง
เรียกต่อ: add(), build(), getThis(). คืนค่า: this.getThis().
Parameters
LootItemCondition.Builder builder
ตัวอย่างใช้งาน
LootItemConditionalFunction.Builder instance = ...;
LootItemCondition.Builder builder = ...;
T result = instance.when(builder);
LootItemFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.LootItemFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/LootItemFunction.java - Type:
interface - Modifiers:
public - Implements:
LootContextUser,BiFunction<ItemStack, LootContext, ItemStack>
net.minecraft.world.level.storage.loot.functions.LootItemFunction#decorate(BiFunction<ItemStack, LootContext, ItemStack>,Consumer<ItemStack>,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemFunction.java:12 - Modifiers:
static - Return:
Consumer<ItemStack>
คืออะไร
ดำเนินการ decorate ตาม implementation ของ LootItemFunction
ทำงานยังไง
เรียกต่อ: accept(), apply(). คืนค่า: itemStack -> consumer.accept(biFunction.apply(itemStack, lootContext)).
Parameters
BiFunction<ItemStack, LootContext, ItemStack> biFunctionConsumer<ItemStack> consumerLootContext lootContext
ตัวอย่างใช้งาน
BiFunction<ItemStack, LootContext, ItemStack> biFunction = ...;
Consumer<ItemStack> consumer = ...;
LootContext lootContext = ...;
Consumer<ItemStack> result = LootItemFunction.decorate(biFunction, consumer, lootContext);
net.minecraft.world.level.storage.loot.functions.LootItemFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemFunction.java:10 - Modifiers: ``
- Return:
LootItemFunctionType<? extends LootItemFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemFunction instance = ...;
LootItemFunctionType<? extends LootItemFunction> result = instance.getType();
LootItemFunctions
- Full name:
net.minecraft.world.level.storage.loot.functions.LootItemFunctions - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/LootItemFunctions.java - Type:
class - Modifiers:
public
net.minecraft.world.level.storage.loot.functions.LootItemFunctions#compose(List<? extends BiFunction<ItemStack, LootContext, ItemStack>>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/LootItemFunctions.java:80 - Modifiers:
public static - Return:
BiFunction<ItemStack, LootContext, ItemStack>
คืออะไร
ดำเนินการ compose ตาม implementation ของ LootItemFunctions
ทำงานยังไง
แยกกรณีด้วย switch ; มีการวนลูป. เรียกต่อ: copyOf(), size(), get(), yield(), apply(). มีจุด return อย่างน้อย 2 จุด.
Parameters
List<? extends BiFunction<ItemStack, LootContext, ItemStack>> list
ตัวอย่างใช้งาน
List<? extends BiFunction<ItemStack, LootContext, ItemStack>> list = ...;
BiFunction<ItemStack, LootContext, ItemStack> result = LootItemFunctions.compose(list);
ModifyContainerContents
- Full name:
net.minecraft.world.level.storage.loot.functions.ModifyContainerContents - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/ModifyContainerContents.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.ModifyContainerContents#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ModifyContainerContents.java:35 - Modifiers:
public - Return:
LootItemFunctionType<ModifyContainerContents>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.MODIFY_CONTENTS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ModifyContainerContents instance = ...;
LootItemFunctionType<ModifyContainerContents> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.ModifyContainerContents#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ModifyContainerContents.java:40 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), modifyItems(), apply(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ModifyContainerContents instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.ModifyContainerContents#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ModifyContainerContents.java:50 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
เรียกต่อ: forChild().
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
ModifyContainerContents instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
SequenceFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SequenceFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SequenceFunction.java - Type:
class - Modifiers:
public - Implements:
LootItemFunction
net.minecraft.world.level.storage.loot.functions.SequenceFunction#apply(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SequenceFunction.java:32 - Modifiers:
public - Return:
ItemStack
คืออะไร
นำไปใช้ apply
ทำงานยังไง
คืนค่า: this.compositeFunction.apply(itemStack, lootContext).
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SequenceFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.apply(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SequenceFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SequenceFunction.java:45 - Modifiers:
public - Return:
LootItemFunctionType<SequenceFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SEQUENCE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SequenceFunction instance = ...;
LootItemFunctionType<SequenceFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SequenceFunction#of(List<LootItemFunction>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SequenceFunction.java:28 - Modifiers:
public static - Return:
SequenceFunction
คืออะไร
ดำเนินการ of ตาม implementation ของ SequenceFunction
ทำงานยังไง
เรียกต่อ: copyOf(). สร้างออบเจ็กต์: SequenceFunction. คืนค่า: new SequenceFunction(List.copyOf(list)).
Parameters
List<LootItemFunction> list
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SequenceFunction#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SequenceFunction.java:36 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
มีการวนลูป. เรียกต่อ: size(), get(), forChild().
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
SequenceFunction instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
SetAttributesFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:53 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: stream(), flatMap(), collect(), toImmutableSet(). คืนค่า: this.modifiers.stream().flatMap(modifier -> modifier.amount.getReferencedContextParams().stream()).collect(ImmutableSet.toImmutableSet()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetAttributesFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:48 - Modifiers:
public - Return:
LootItemFunctionType<SetAttributesFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_ATTRIBUTES.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetAttributesFunction instance = ...;
LootItemFunctionType<SetAttributesFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction#modifier(ResourceLocation,Holder<Attribute>,AttributeModifier.Operation,NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:84 - Modifiers:
public static - Return:
SetAttributesFunction.ModifierBuilder
คืออะไร
ดำเนินการ modifier ตาม implementation ของ SetAttributesFunction
ทำงานยังไง
เรียกต่อ: ModifierBuilder(). สร้างออบเจ็กต์: SetAttributesFunction.ModifierBuilder. คืนค่า: new SetAttributesFunction.ModifierBuilder(resourceLocation, holder, operation, numberProvider).
Parameters
ResourceLocation resourceLocationHolder<Attribute> holderAttributeModifier.Operation operationNumberProvider numberProvider
ตัวอย่างใช้งาน
ResourceLocation resourceLocation = ...;
Holder<Attribute> holder = ...;
AttributeModifier.Operation operation = ...;
NumberProvider numberProvider = ...;
SetAttributesFunction.ModifierBuilder result = SetAttributesFunction.modifier(resourceLocation, holder, operation, numberProvider);
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:58 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: set(), updateModifiers(), update(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetAttributesFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction#setAttributes()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:90 - Modifiers:
public static - Return:
SetAttributesFunction.Builder
คืออะไร
กำหนดค่า Attributes
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: SetAttributesFunction.Builder. คืนค่า: new SetAttributesFunction.Builder().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetAttributesFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<SetAttributesFunction.Builder>
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:115 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: SetAttributesFunction. คืนค่า: new SetAttributesFunction(this.getConditions(), this.modifiers, this.replace).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$Builder#Builder()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:102 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetAttributesFunction.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$Builder#Builder(boolean)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:98 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetAttributesFunction.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: replace.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:106 - Modifiers:
protected - Return:
SetAttributesFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$Builder#withModifier(SetAttributesFunction.ModifierBuilder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:110 - Modifiers:
public - Return:
SetAttributesFunction.Builder
คืออะไร
ดำเนินการ withModifier ตาม implementation ของ SetAttributesFunction$Builder
ทำงานยังไง
เรียกต่อ: add(), build(). คืนค่า: this.
Parameters
SetAttributesFunction.ModifierBuilder modifierBuilder
ตัวอย่างใช้งาน
SetAttributesFunction.Builder instance = ...;
SetAttributesFunction.ModifierBuilder modifierBuilder = ...;
SetAttributesFunction.Builder result = instance.withModifier(modifierBuilder);
SetAttributesFunction$ModifierBuilder
- Full name:
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$ModifierBuilder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java - Type:
class - Modifiers:
public static
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$ModifierBuilder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:154 - Modifiers:
public - Return:
SetAttributesFunction.Modifier
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: Modifier(), copyOf(). สร้างออบเจ็กต์: SetAttributesFunction.Modifier. คืนค่า: new SetAttributesFunction.Modifier(this.id, this.attribute, this.operation, this.amount, List.copyOf(this.slots)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetAttributesFunction.ModifierBuilder instance = ...;
SetAttributesFunction.Modifier result = instance.build();
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$ModifierBuilder#forSlot(EquipmentSlotGroup)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:149 - Modifiers:
public - Return:
SetAttributesFunction.ModifierBuilder
คืออะไร
ดำเนินการ forSlot ตาม implementation ของ SetAttributesFunction$ModifierBuilder
ทำงานยังไง
เรียกต่อ: add(). คืนค่า: this.
Parameters
EquipmentSlotGroup equipmentSlotGroup
ตัวอย่างใช้งาน
SetAttributesFunction.ModifierBuilder instance = ...;
EquipmentSlotGroup equipmentSlotGroup = ...;
SetAttributesFunction.ModifierBuilder result = instance.forSlot(equipmentSlotGroup);
net.minecraft.world.level.storage.loot.functions.SetAttributesFunction$ModifierBuilder#ModifierBuilder(ResourceLocation,Holder<Attribute>,AttributeModifier.Operation,NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java:142 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetAttributesFunction.ModifierBuilder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: id, attribute, operation, amount.
Parameters
ResourceLocation resourceLocationHolder<Attribute> holderAttributeModifier.Operation operationNumberProvider numberProvider
ตัวอย่างใช้งาน
ResourceLocation resourceLocation = ...;
Holder<Attribute> holder = ...;
AttributeModifier.Operation operation = ...;
NumberProvider numberProvider = ...;
SetAttributesFunction.ModifierBuilder instance = new SetAttributesFunction.ModifierBuilder(resourceLocation, holder, operation, numberProvider);
SetBannerPatternFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetBannerPatternFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetBannerPatternFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetBannerPatternFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetBannerPatternFunction.java:52 - Modifiers:
public - Return:
LootItemFunctionType<SetBannerPatternFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_BANNER_PATTERN.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetBannerPatternFunction instance = ...;
LootItemFunctionType<SetBannerPatternFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetBannerPatternFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetBannerPatternFunction.java:36 - Modifiers:
protected - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: update(), Builder(), addAll(), build(), set(). สร้างออบเจ็กต์: BannerPatternLayers.Builder. คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}
net.minecraft.world.level.storage.loot.functions.SetBannerPatternFunction#setBannerPattern(boolean)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetBannerPatternFunction.java:57 - Modifiers:
public static - Return:
SetBannerPatternFunction.Builder
คืออะไร
กำหนดค่า Banner Pattern
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: SetBannerPatternFunction.Builder. คืนค่า: new SetBannerPatternFunction.Builder(bl).
Parameters
boolean bl
ตัวอย่างใช้งาน
SetBannerPatternFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.SetBannerPatternFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetBannerPatternFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<SetBannerPatternFunction.Builder>
net.minecraft.world.level.storage.loot.functions.SetBannerPatternFunction$Builder#addPattern(Holder<BannerPattern>,DyeColor)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetBannerPatternFunction.java:78 - Modifiers:
public - Return:
SetBannerPatternFunction.Builder
คืออะไร
เพิ่ม Pattern
ทำงานยังไง
เรียกต่อ: add(). คืนค่า: this.
Parameters
Holder<BannerPattern> holderDyeColor dyeColor
ตัวอย่างใช้งาน
SetBannerPatternFunction.Builder instance = ...;
Holder<BannerPattern> holder = ...;
DyeColor dyeColor = ...;
SetBannerPatternFunction.Builder result = instance.addPattern(holder, dyeColor);
net.minecraft.world.level.storage.loot.functions.SetBannerPatternFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetBannerPatternFunction.java:73 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: SetBannerPatternFunction. คืนค่า: new SetBannerPatternFunction(this.getConditions(), this.patterns.build(), this.append).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetBannerPatternFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetBannerPatternFunction.java:69 - Modifiers:
protected - Return:
SetBannerPatternFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetBookCoverFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetBookCoverFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetBookCoverFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetBookCoverFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetBookCoverFunction.java:55 - Modifiers:
public - Return:
LootItemFunctionType<SetBookCoverFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_BOOK_COVER.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetBookCoverFunction instance = ...;
LootItemFunctionType<SetBookCoverFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetBookCoverFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetBookCoverFunction.java:39 - Modifiers:
protected - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: update(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}
net.minecraft.world.level.storage.loot.functions.SetBookCoverFunction#SetBookCoverFunction(List<LootItemCondition>,Optional<Filterable<String>>,Optional<String>,Optional<Integer>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetBookCoverFunction.java:32 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetBookCoverFunction ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: author, title, generation.
Parameters
List<LootItemCondition> listOptional<Filterable<String>> optionalOptional<String> optional2Optional<Integer> optional3
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
Optional<Filterable<String>> optional = ...;
Optional<String> optional2 = ...;
Optional<Integer> optional3 = ...;
SetBookCoverFunction instance = new SetBookCoverFunction(list, optional, optional2, optional3);
SetComponentsFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetComponentsFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetComponentsFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetComponentsFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetComponentsFunction.java:25 - Modifiers:
public - Return:
LootItemFunctionType<SetComponentsFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_COMPONENTS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetComponentsFunction instance = ...;
LootItemFunctionType<SetComponentsFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetComponentsFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetComponentsFunction.java:30 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: applyComponentsAndValidate(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetComponentsFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetComponentsFunction#setComponent(DataComponentType<T>,T)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetComponentsFunction.java:36 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Component
ทำงานยังไง
เรียกต่อ: simpleBuilder(), builder(), set(), build(). สร้างออบเจ็กต์: SetComponentsFunction. คืนค่า: simpleBuilder(list -> new SetComponentsFunction(list, DataComponentPatch.builder().set(dataComponentType, object).build())).
Parameters
DataComponentType<T> dataComponentTypeT object
ตัวอย่างใช้งาน
DataComponentType<T> dataComponentType = ...;
T object = ...;
LootItemConditionalFunction.Builder<?> result = SetComponentsFunction.setComponent(dataComponentType, object);
SetContainerContents
- Full name:
net.minecraft.world.level.storage.loot.functions.SetContainerContents - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetContainerContents.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetContainerContents#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerContents.java:38 - Modifiers:
public - Return:
LootItemFunctionType<SetContainerContents>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_CONTENTS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetContainerContents instance = ...;
LootItemFunctionType<SetContainerContents> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetContainerContents#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerContents.java:43 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), builder(), forEach(), expand(), createItemStack(), createStackSplitter(), getLevel(), setContents(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetContainerContents instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetContainerContents#setContents(ContainerComponentManipulator<?>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerContents.java:69 - Modifiers:
public static - Return:
SetContainerContents.Builder
คืออะไร
กำหนดค่า Contents
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: SetContainerContents.Builder. คืนค่า: new SetContainerContents.Builder(containerComponentManipulator).
Parameters
ContainerComponentManipulator<?> containerComponentManipulator
ตัวอย่างใช้งาน
ContainerComponentManipulator<?> containerComponentManipulator = ...;
SetContainerContents.Builder result = SetContainerContents.setContents(containerComponentManipulator);
net.minecraft.world.level.storage.loot.functions.SetContainerContents#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerContents.java:60 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
มีการวนลูป. เรียกต่อ: size(), get(), forChild().
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
SetContainerContents instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
SetContainerContents$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.SetContainerContents$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetContainerContents.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<SetContainerContents.Builder>
net.minecraft.world.level.storage.loot.functions.SetContainerContents$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerContents.java:90 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: SetContainerContents. คืนค่า: new SetContainerContents(this.getConditions(), this.component, this.entries.build()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetContainerContents$Builder#Builder(ContainerComponentManipulator<?>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerContents.java:77 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetContainerContents.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: component.
Parameters
ContainerComponentManipulator<?> containerComponentManipulator
ตัวอย่างใช้งาน
ContainerComponentManipulator<?> containerComponentManipulator = ...;
SetContainerContents.Builder instance = new SetContainerContents.Builder(containerComponentManipulator);
net.minecraft.world.level.storage.loot.functions.SetContainerContents$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerContents.java:81 - Modifiers:
protected - Return:
SetContainerContents.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetContainerContents$Builder#withEntry(LootPoolEntryContainer.Builder<?>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerContents.java:85 - Modifiers:
public - Return:
SetContainerContents.Builder
คืออะไร
ดำเนินการ withEntry ตาม implementation ของ SetContainerContents$Builder
ทำงานยังไง
เรียกต่อ: add(), build(). คืนค่า: this.
Parameters
LootPoolEntryContainer.Builder<?> builder
ตัวอย่างใช้งาน
SetContainerContents.Builder instance = ...;
LootPoolEntryContainer.Builder<?> builder = ...;
SetContainerContents.Builder result = instance.withEntry(builder);
SetContainerLootTable
- Full name:
net.minecraft.world.level.storage.loot.functions.SetContainerLootTable - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetContainerLootTable#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java:43 - Modifiers:
public - Return:
LootItemFunctionType<SetContainerLootTable>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_LOOT_TABLE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetContainerLootTable instance = ...;
LootItemFunctionType<SetContainerLootTable> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetContainerLootTable#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java:48 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), set(). สร้างออบเจ็กต์: SeededContainerLoot. มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetContainerLootTable instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetContainerLootTable#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java:58 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: allowsReferences(), reportProblem(), location(), resolver(), get(), isEmpty().
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
SetContainerLootTable instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
net.minecraft.world.level.storage.loot.functions.SetContainerLootTable#withLootTable(BlockEntityType<?>,ResourceKey<LootTable>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java:70 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
ดำเนินการ withLootTable ตาม implementation ของ SetContainerLootTable
ทำงานยังไง
เรียกต่อ: simpleBuilder(), builtInRegistryHolder(). สร้างออบเจ็กต์: SetContainerLootTable. คืนค่า: simpleBuilder(list -> new SetContainerLootTable(list, resourceKey, 0L, blockEntityType.builtInRegistryHolder())).
Parameters
BlockEntityType<?> blockEntityTypeResourceKey<LootTable> resourceKey
ตัวอย่างใช้งาน
BlockEntityType<?> blockEntityType = ...;
ResourceKey<LootTable> resourceKey = ...;
LootItemConditionalFunction.Builder<?> result = SetContainerLootTable.withLootTable(blockEntityType, resourceKey);
net.minecraft.world.level.storage.loot.functions.SetContainerLootTable#withLootTable(BlockEntityType<?>,ResourceKey<LootTable>,long)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java:74 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
ดำเนินการ withLootTable ตาม implementation ของ SetContainerLootTable
ทำงานยังไง
เรียกต่อ: simpleBuilder(), builtInRegistryHolder(). สร้างออบเจ็กต์: SetContainerLootTable. คืนค่า: simpleBuilder(list -> new SetContainerLootTable(list, resourceKey, l, blockEntityType.builtInRegistryHolder())).
Parameters
BlockEntityType<?> blockEntityTypeResourceKey<LootTable> resourceKeylong l
ตัวอย่างใช้งาน
BlockEntityType<?> blockEntityType = ...;
ResourceKey<LootTable> resourceKey = ...;
LootItemConditionalFunction.Builder<?> result = SetContainerLootTable.withLootTable(blockEntityType, resourceKey, 0L);
SetCustomDataFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetCustomDataFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetCustomDataFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetCustomDataFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetCustomDataFunction.java:27 - Modifiers:
public - Return:
LootItemFunctionType<SetCustomDataFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_CUSTOM_DATA.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetCustomDataFunction instance = ...;
LootItemFunctionType<SetCustomDataFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetCustomDataFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetCustomDataFunction.java:32 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: update(), merge(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetCustomDataFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetCustomDataFunction#setCustomData(CompoundTag)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetCustomDataFunction.java:38 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Custom Data
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: SetCustomDataFunction. คืนค่า: simpleBuilder(list -> new SetCustomDataFunction(list, compoundTag)).
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
CompoundTag compoundTag = ...;
LootItemConditionalFunction.Builder<?> result = SetCustomDataFunction.setCustomData(compoundTag);
SetCustomModelDataFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetCustomModelDataFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetCustomModelDataFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetCustomModelDataFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetCustomModelDataFunction.java:64 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: concat(), stream(), flatMap(), value(), collect(), toSet().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetCustomModelDataFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.SetCustomModelDataFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetCustomModelDataFunction.java:72 - Modifiers:
public - Return:
LootItemFunctionType<SetCustomModelDataFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_CUSTOM_MODEL_DATA.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetCustomModelDataFunction instance = ...;
LootItemFunctionType<SetCustomModelDataFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetCustomModelDataFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetCustomModelDataFunction.java:88 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: getOrDefault(), set(), apply(), floats(), getFloat(), flags(), strings(), colors(). สร้างออบเจ็กต์: CustomModelData. คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetCustomModelDataFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetCustomModelDataFunction#SetCustomModelDataFunction(List<LootItemCondition>,Optional<ListOperation.StandAlone<NumberProvider>>,Optional<ListOperation.StandAlone<Boolean>>,Optional<ListOperation.StandAlone<String>>,Optional<ListOperation.StandAlone<NumberProvider>>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetCustomModelDataFunction.java:50 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetCustomModelDataFunction ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: floats, flags, strings, colors.
Parameters
List<LootItemCondition> listOptional<ListOperation.StandAlone<NumberProvider>> optionalOptional<ListOperation.StandAlone<Boolean>> optional2Optional<ListOperation.StandAlone<String>> optional3Optional<ListOperation.StandAlone<NumberProvider>> optional4
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
Optional<ListOperation.StandAlone<NumberProvider>> optional = ...;
Optional<ListOperation.StandAlone<Boolean>> optional2 = ...;
Optional<ListOperation.StandAlone<String>> optional3 = ...;
Optional<ListOperation.StandAlone<NumberProvider>> optional4 = ...;
SetCustomModelDataFunction instance = new SetCustomModelDataFunction(list, optional, optional2, optional3, optional4);
SetEnchantmentsFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java:50 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: values(), stream(), flatMap(), collect(), toImmutableSet().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetEnchantmentsFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java:45 - Modifiers:
public - Return:
LootItemFunctionType<SetEnchantmentsFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_ENCHANTMENTS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetEnchantmentsFunction instance = ...;
LootItemFunctionType<SetEnchantmentsFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java:59 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), transmuteCopy(), updateEnchantments(), forEach(), set(), clamp(), getLevel(), getInt(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetEnchantmentsFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
SetEnchantmentsFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<SetEnchantmentsFunction.Builder>
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java:104 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: SetEnchantmentsFunction. คืนค่า: new SetEnchantmentsFunction(this.getConditions(), this.enchantments.build(), this.add).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction$Builder#Builder()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java:87 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetEnchantmentsFunction.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction$Builder#Builder(boolean)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java:91 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetEnchantmentsFunction.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: add.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java:95 - Modifiers:
protected - Return:
SetEnchantmentsFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction$Builder#withEnchantment(Holder<Enchantment>,NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetEnchantmentsFunction.java:99 - Modifiers:
public - Return:
SetEnchantmentsFunction.Builder
คืออะไร
ดำเนินการ withEnchantment ตาม implementation ของ SetEnchantmentsFunction$Builder
ทำงานยังไง
เรียกต่อ: put(). คืนค่า: this.
Parameters
Holder<Enchantment> holderNumberProvider numberProvider
ตัวอย่างใช้งาน
SetEnchantmentsFunction.Builder instance = ...;
Holder<Enchantment> holder = ...;
NumberProvider numberProvider = ...;
SetEnchantmentsFunction.Builder result = instance.withEnchantment(holder, numberProvider);
SetFireworkExplosionFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetFireworkExplosionFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetFireworkExplosionFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetFireworkExplosionFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetFireworkExplosionFunction.java:68 - Modifiers:
public - Return:
LootItemFunctionType<SetFireworkExplosionFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_FIREWORK_EXPLOSION.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetFireworkExplosionFunction instance = ...;
LootItemFunctionType<SetFireworkExplosionFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetFireworkExplosionFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetFireworkExplosionFunction.java:52 - Modifiers:
protected - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: update(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}
net.minecraft.world.level.storage.loot.functions.SetFireworkExplosionFunction#SetFireworkExplosionFunction(List<LootItemCondition>,Optional<FireworkExplosion.Shape>,Optional<IntList>,Optional<IntList>,Optional<Boolean>,Optional<Boolean>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetFireworkExplosionFunction.java:36 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetFireworkExplosionFunction ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: shape, colors, fadeColors, trail, twinkle.
Parameters
List<LootItemCondition> listOptional<FireworkExplosion.Shape> optionalOptional<IntList> optional2Optional<IntList> optional3Optional<Boolean> optional4Optional<Boolean> optional5
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
Optional<FireworkExplosion.Shape> optional = ...;
Optional<IntList> optional2 = ...;
Optional<IntList> optional3 = ...;
Optional<Boolean> optional4 = ...;
Optional<Boolean> optional5 = ...;
SetFireworkExplosionFunction instance = new SetFireworkExplosionFunction(list, optional, optional2, optional3, optional4, optional5);
SetFireworksFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetFireworksFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetFireworksFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetFireworksFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetFireworksFunction.java:51 - Modifiers:
public - Return:
LootItemFunctionType<SetFireworksFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_FIREWORKS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetFireworksFunction instance = ...;
LootItemFunctionType<SetFireworksFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetFireworksFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetFireworksFunction.java:38 - Modifiers:
protected - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: update(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}
net.minecraft.world.level.storage.loot.functions.SetFireworksFunction#SetFireworksFunction(List<LootItemCondition>,Optional<ListOperation.StandAlone<FireworkExplosion>>,Optional<Integer>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetFireworksFunction.java:32 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetFireworksFunction ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: explosions, flightDuration.
Parameters
List<LootItemCondition> listOptional<ListOperation.StandAlone<FireworkExplosion>> optionalOptional<Integer> optional2
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
Optional<ListOperation.StandAlone<FireworkExplosion>> optional = ...;
Optional<Integer> optional2 = ...;
SetFireworksFunction instance = new SetFireworksFunction(list, optional, optional2);
SetInstrumentFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetInstrumentFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetInstrumentFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetInstrumentFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetInstrumentFunction.java:30 - Modifiers:
public - Return:
LootItemFunctionType<SetInstrumentFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_INSTRUMENT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetInstrumentFunction instance = ...;
LootItemFunctionType<SetInstrumentFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetInstrumentFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetInstrumentFunction.java:35 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), registryAccess(), lookupOrThrow(), getRandomElementOf(), getRandom(), isPresent(), set(), get(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetInstrumentFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetInstrumentFunction#setInstrumentOptions(TagKey<Instrument>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetInstrumentFunction.java:46 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Instrument Options
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: SetInstrumentFunction. คืนค่า: simpleBuilder(list -> new SetInstrumentFunction(list, tagKey)).
Parameters
TagKey<Instrument> tagKey
ตัวอย่างใช้งาน
TagKey<Instrument> tagKey = ...;
LootItemConditionalFunction.Builder<?> result = SetInstrumentFunction.setInstrumentOptions(tagKey);
SetItemCountFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetItemCountFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetItemCountFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetItemCountFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemCountFunction.java:40 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
คืนค่า: this.value.getReferencedContextParams().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetItemCountFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.SetItemCountFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemCountFunction.java:35 - Modifiers:
public - Return:
LootItemFunctionType<SetItemCountFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_COUNT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetItemCountFunction instance = ...;
LootItemFunctionType<SetItemCountFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetItemCountFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemCountFunction.java:45 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: getCount(), setCount(), getInt(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetItemCountFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetItemCountFunction#setCount(NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemCountFunction.java:52 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Count
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: SetItemCountFunction. คืนค่า: simpleBuilder(list -> new SetItemCountFunction(list, numberProvider, false)).
Parameters
NumberProvider numberProvider
ตัวอย่างใช้งาน
NumberProvider numberProvider = ...;
LootItemConditionalFunction.Builder<?> result = SetItemCountFunction.setCount(numberProvider);
net.minecraft.world.level.storage.loot.functions.SetItemCountFunction#setCount(NumberProvider,boolean)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemCountFunction.java:56 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Count
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: SetItemCountFunction. คืนค่า: simpleBuilder(list -> new SetItemCountFunction(list, numberProvider, bl)).
Parameters
NumberProvider numberProviderboolean bl
ตัวอย่างใช้งาน
NumberProvider numberProvider = ...;
LootItemConditionalFunction.Builder<?> result = SetItemCountFunction.setCount(numberProvider, true);
SetItemDamageFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetItemDamageFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemDamageFunction.java:44 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
คืนค่า: this.damage.getReferencedContextParams().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetItemDamageFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemDamageFunction.java:39 - Modifiers:
public - Return:
LootItemFunctionType<SetItemDamageFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_DAMAGE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetItemDamageFunction instance = ...;
LootItemFunctionType<SetItemDamageFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemDamageFunction.java:49 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isDamageableItem(), getMaxDamage(), getDamageValue(), clamp(), getFloat(), setDamageValue(), floor(), warn(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetItemDamageFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction#setDamage(NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemDamageFunction.java:63 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Damage
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: SetItemDamageFunction. คืนค่า: simpleBuilder(list -> new SetItemDamageFunction(list, numberProvider, false)).
Parameters
NumberProvider numberProvider
ตัวอย่างใช้งาน
NumberProvider numberProvider = ...;
LootItemConditionalFunction.Builder<?> result = SetItemDamageFunction.setDamage(numberProvider);
net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction#setDamage(NumberProvider,boolean)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemDamageFunction.java:67 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Damage
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: SetItemDamageFunction. คืนค่า: simpleBuilder(list -> new SetItemDamageFunction(list, numberProvider, bl)).
Parameters
NumberProvider numberProviderboolean bl
ตัวอย่างใช้งาน
NumberProvider numberProvider = ...;
LootItemConditionalFunction.Builder<?> result = SetItemDamageFunction.setDamage(numberProvider, true);
SetItemFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetItemFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetItemFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetItemFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemFunction.java:23 - Modifiers:
public - Return:
LootItemFunctionType<SetItemFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_ITEM.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetItemFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetItemFunction.java:28 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: transmuteCopy(), value(). คืนค่า: itemStack.transmuteCopy(this.item.value()).
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetItemFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
SetLoreFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetLoreFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetLoreFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:48 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: map(), of(), getParam(), orElseGet(). คืนค่า: this.resolutionContext.<Set<ContextKey<?>>>map(entityTarget -> Set.of(entityTarget.getParam())).orElseGet(Set::of).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetLoreFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:43 - Modifiers:
public - Return:
LootItemFunctionType<SetLoreFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_LORE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetLoreFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:53 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: update(), updateLore(). สร้างออบเจ็กต์: ItemLore. คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetLoreFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetLoreFunction#setLore()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:69 - Modifiers:
public static - Return:
SetLoreFunction.Builder
คืออะไร
กำหนดค่า Lore
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: SetLoreFunction.Builder. คืนค่า: new SetLoreFunction.Builder().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetLoreFunction#SetLoreFunction(List<LootItemCondition>,List<Component>,ListOperation,Optional<LootContext.EntityTarget>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:36 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetLoreFunction ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: lore, mode, resolutionContext. เรียกต่อ: copyOf().
Parameters
List<LootItemCondition> listList<Component> list2ListOperation listOperationOptional<LootContext.EntityTarget> optional
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
List<Component> list2 = ...;
ListOperation listOperation = ...;
Optional<LootContext.EntityTarget> optional = ...;
SetLoreFunction instance = new SetLoreFunction(list, list2, listOperation, optional);
SetLoreFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.SetLoreFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<SetLoreFunction.Builder>
net.minecraft.world.level.storage.loot.functions.SetLoreFunction$Builder#addLine(Component)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:88 - Modifiers:
public - Return:
SetLoreFunction.Builder
คืออะไร
เพิ่ม Line
ทำงานยังไง
เรียกต่อ: add(). คืนค่า: this.
Parameters
Component component
ตัวอย่างใช้งาน
SetLoreFunction.Builder instance = ...;
Component component = ...;
SetLoreFunction.Builder result = instance.addLine(component);
net.minecraft.world.level.storage.loot.functions.SetLoreFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:97 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: SetLoreFunction. คืนค่า: new SetLoreFunction(this.getConditions(), this.lore.build(), this.mode, this.resolutionContext).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetLoreFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:93 - Modifiers:
protected - Return:
SetLoreFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetLoreFunction$Builder#setMode(ListOperation)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:78 - Modifiers:
public - Return:
SetLoreFunction.Builder
คืออะไร
กำหนดค่า Mode
ทำงานยังไง
แก้ state: mode. คืนค่า: this.
Parameters
ListOperation listOperation
ตัวอย่างใช้งาน
SetLoreFunction.Builder instance = ...;
ListOperation listOperation = ...;
SetLoreFunction.Builder result = instance.setMode(listOperation);
net.minecraft.world.level.storage.loot.functions.SetLoreFunction$Builder#setResolutionContext(LootContext.EntityTarget)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetLoreFunction.java:83 - Modifiers:
public - Return:
SetLoreFunction.Builder
คืออะไร
กำหนดค่า Resolution Context
ทำงานยังไง
แก้ state: resolutionContext. เรียกต่อ: of(). คืนค่า: this.
Parameters
LootContext.EntityTarget entityTarget
ตัวอย่างใช้งาน
SetLoreFunction.Builder instance = ...;
LootContext.EntityTarget entityTarget = ...;
SetLoreFunction.Builder result = instance.setResolutionContext(entityTarget);
SetNameFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetNameFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetNameFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetNameFunction#createResolver(LootContext,LootContext.EntityTarget)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetNameFunction.java:63 - Modifiers:
public static - Return:
UnaryOperator<Component>
คืออะไร
สร้าง Resolver
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: getOptionalParameter(), getParam(), createCommandSourceStackForNameResolution(), getLevel(), withPermission(), updateForEntity(), warn(). มีจุด return อย่างน้อย 3 จุด.
Parameters
LootContext lootContextLootContext.EntityTarget entityTarget
ตัวอย่างใช้งาน
LootContext lootContext = ...;
LootContext.EntityTarget entityTarget = ...;
UnaryOperator<Component> result = SetNameFunction.createResolver(lootContext, entityTarget);
net.minecraft.world.level.storage.loot.functions.SetNameFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetNameFunction.java:58 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: map(), of(), getParam(), orElse(). คืนค่า: this.resolutionContext.<Set<ContextKey<?>>>map(entityTarget -> Set.of(entityTarget.getParam())).orElse(Set.of()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetNameFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetNameFunction.java:53 - Modifiers:
public - Return:
LootItemFunctionType<SetNameFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_NAME.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetNameFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetNameFunction.java:82 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: ifPresent(), set(), component(), createResolver(), orElse(), apply(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetNameFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetNameFunction#setName(Component,SetNameFunction.Target)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetNameFunction.java:88 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Name
ทำงานยังไง
เรียกต่อ: simpleBuilder(), of(), empty(). สร้างออบเจ็กต์: SetNameFunction. คืนค่า: simpleBuilder(list -> new SetNameFunction(list, Optional.of(component), Optional.empty(), target)).
Parameters
Component componentSetNameFunction.Target target
ตัวอย่างใช้งาน
Component component = ...;
SetNameFunction.Target target = ...;
LootItemConditionalFunction.Builder<?> result = SetNameFunction.setName(component, target);
net.minecraft.world.level.storage.loot.functions.SetNameFunction#setName(Component,SetNameFunction.Target,LootContext.EntityTarget)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetNameFunction.java:92 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Name
ทำงานยังไง
เรียกต่อ: simpleBuilder(), of(). สร้างออบเจ็กต์: SetNameFunction. คืนค่า: simpleBuilder(list -> new SetNameFunction(list, Optional.of(component), Optional.of(entityTarget), target)).
Parameters
Component componentSetNameFunction.Target targetLootContext.EntityTarget entityTarget
ตัวอย่างใช้งาน
Component component = ...;
SetNameFunction.Target target = ...;
LootContext.EntityTarget entityTarget = ...;
LootItemConditionalFunction.Builder<?> result = SetNameFunction.setName(component, target, entityTarget);
SetNameFunction$Target
- Full name:
net.minecraft.world.level.storage.loot.functions.SetNameFunction$Target - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetNameFunction.java - Type:
enum - Modifiers:
public - Implements:
StringRepresentable
net.minecraft.world.level.storage.loot.functions.SetNameFunction$Target#component()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetNameFunction.java:112 - Modifiers:
public - Return:
DataComponentType<Component>
คืออะไร
ดำเนินการ component ตาม implementation ของ SetNameFunction$Target
ทำงานยังไง
แยกกรณีด้วย switch. คืนค่า: switch (this) { case CUSTOM_NAME -> DataComponents.CUSTOM_NAME.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetNameFunction$Target#getSerializedName()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetNameFunction.java:107 - Modifiers:
public - Return:
String
คืออะไร
อ่านค่า Serialized Name
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetOminousBottleAmplifierFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetOminousBottleAmplifierFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetOminousBottleAmplifierFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetOminousBottleAmplifierFunction#amplifier()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetOminousBottleAmplifierFunction.java:47 - Modifiers:
public - Return:
NumberProvider
คืออะไร
ดำเนินการ amplifier ตาม implementation ของ SetOminousBottleAmplifierFunction
ทำงานยังไง
คืนค่า: this.amplifierGenerator.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetOminousBottleAmplifierFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetOminousBottleAmplifierFunction.java:30 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
คืนค่า: this.amplifierGenerator.getReferencedContextParams().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetOminousBottleAmplifierFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.SetOminousBottleAmplifierFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetOminousBottleAmplifierFunction.java:35 - Modifiers:
public - Return:
LootItemFunctionType<SetOminousBottleAmplifierFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_OMINOUS_BOTTLE_AMPLIFIER.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetOminousBottleAmplifierFunction instance = ...;
LootItemFunctionType<SetOminousBottleAmplifierFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetOminousBottleAmplifierFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetOminousBottleAmplifierFunction.java:40 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: clamp(), getInt(), set(). สร้างออบเจ็กต์: OminousBottleAmplifier. คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetOminousBottleAmplifierFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetOminousBottleAmplifierFunction#setAmplifier(NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetOminousBottleAmplifierFunction.java:51 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Amplifier
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: SetOminousBottleAmplifierFunction. คืนค่า: simpleBuilder(list -> new SetOminousBottleAmplifierFunction(list, numberProvider)).
Parameters
NumberProvider numberProvider
ตัวอย่างใช้งาน
NumberProvider numberProvider = ...;
LootItemConditionalFunction.Builder<?> result = SetOminousBottleAmplifierFunction.setAmplifier(numberProvider);
SetPotionFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetPotionFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetPotionFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetPotionFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetPotionFunction.java:27 - Modifiers:
public - Return:
LootItemFunctionType<SetPotionFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_POTION.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetPotionFunction instance = ...;
LootItemFunctionType<SetPotionFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetPotionFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetPotionFunction.java:32 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: update(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetPotionFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetPotionFunction#setPotion(Holder<Potion>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetPotionFunction.java:38 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
กำหนดค่า Potion
ทำงานยังไง
เรียกต่อ: simpleBuilder(). สร้างออบเจ็กต์: SetPotionFunction. คืนค่า: simpleBuilder(list -> new SetPotionFunction(list, holder)).
Parameters
Holder<Potion> holder
ตัวอย่างใช้งาน
Holder<Potion> holder = ...;
LootItemConditionalFunction.Builder<?> result = SetPotionFunction.setPotion(holder);
SetStewEffectFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetStewEffectFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetStewEffectFunction.java:54 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: stream(), flatMap(), duration(), collect(), toImmutableSet(). คืนค่า: this.effects.stream().flatMap(effectEntry -> effectEntry.duration().getReferencedContextParams().stream()).collect(ImmutableSet.toImmutableSet()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetStewEffectFunction instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetStewEffectFunction.java:49 - Modifiers:
public - Return:
LootItemFunctionType<SetStewEffectFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_STEW_EFFECT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetStewEffectFunction instance = ...;
LootItemFunctionType<SetStewEffectFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetStewEffectFunction.java:59 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), isEmpty(), getRandom(), effect(), duration(), getInt(), value(), isInstantenous(). สร้างออบเจ็กต์: SuspiciousStewEffects.Entry. มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SetStewEffectFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction#stewEffect()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetStewEffectFunction.java:77 - Modifiers:
public static - Return:
SetStewEffectFunction.Builder
คืออะไร
ดำเนินการ stewEffect ตาม implementation ของ SetStewEffectFunction
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: SetStewEffectFunction.Builder. คืนค่า: new SetStewEffectFunction.Builder().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetStewEffectFunction$Builder
- Full name:
net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction$Builder - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetStewEffectFunction.java - Type:
class - Modifiers:
public static - Extends:
LootItemConditionalFunction.Builder<SetStewEffectFunction.Builder>
net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetStewEffectFunction.java:93 - Modifiers:
public - Return:
LootItemFunction
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: getConditions(). สร้างออบเจ็กต์: SetStewEffectFunction. คืนค่า: new SetStewEffectFunction(this.getConditions(), this.effects.build()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction$Builder#getThis()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetStewEffectFunction.java:84 - Modifiers:
protected - Return:
SetStewEffectFunction.Builder
คืออะไร
อ่านค่า This
ทำงานยังไง
คืนค่า: this.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction$Builder#withEffect(Holder<MobEffect>,NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetStewEffectFunction.java:88 - Modifiers:
public - Return:
SetStewEffectFunction.Builder
คืออะไร
ดำเนินการ withEffect ตาม implementation ของ SetStewEffectFunction$Builder
ทำงานยังไง
เรียกต่อ: add(), EffectEntry(). สร้างออบเจ็กต์: SetStewEffectFunction.EffectEntry. คืนค่า: this.
Parameters
Holder<MobEffect> holderNumberProvider numberProvider
ตัวอย่างใช้งาน
SetStewEffectFunction.Builder instance = ...;
Holder<MobEffect> holder = ...;
NumberProvider numberProvider = ...;
SetStewEffectFunction.Builder result = instance.withEffect(holder, numberProvider);
SetWritableBookPagesFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetWritableBookPagesFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetWritableBookPagesFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetWritableBookPagesFunction#apply(WritableBookContent)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetWritableBookPagesFunction.java:39 - Modifiers:
public - Return:
WritableBookContent
คืออะไร
นำไปใช้ apply
ทำงานยังไง
เรียกต่อ: pages(), withReplacedPages(). คืนค่า: writableBookContent.withReplacedPages(list).
Parameters
WritableBookContent writableBookContent
ตัวอย่างใช้งาน
SetWritableBookPagesFunction instance = ...;
WritableBookContent writableBookContent = ...;
WritableBookContent result = instance.apply(writableBookContent);
net.minecraft.world.level.storage.loot.functions.SetWritableBookPagesFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetWritableBookPagesFunction.java:44 - Modifiers:
public - Return:
LootItemFunctionType<SetWritableBookPagesFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_WRITABLE_BOOK_PAGES.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetWritableBookPagesFunction instance = ...;
LootItemFunctionType<SetWritableBookPagesFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetWritableBookPagesFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetWritableBookPagesFunction.java:33 - Modifiers:
protected - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: update(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}
net.minecraft.world.level.storage.loot.functions.SetWritableBookPagesFunction#SetWritableBookPagesFunction(List<LootItemCondition>,List<Filterable<String>>,ListOperation)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetWritableBookPagesFunction.java:27 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetWritableBookPagesFunction ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: pages, pageOperation.
Parameters
List<LootItemCondition> listList<Filterable<String>> list2ListOperation listOperation
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
List<Filterable<String>> list2 = ...;
ListOperation listOperation = ...;
SetWritableBookPagesFunction instance = new SetWritableBookPagesFunction(list, list2, listOperation);
SetWrittenBookPagesFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SetWrittenBookPagesFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SetWrittenBookPagesFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetWrittenBookPagesFunction#apply(WrittenBookContent)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetWrittenBookPagesFunction.java:46 - Modifiers:
public - Return:
WrittenBookContent
คืออะไร
นำไปใช้ apply
ทำงานยังไง
เรียกต่อ: pages(), withReplacedPages(). คืนค่า: writtenBookContent.withReplacedPages(list).
Parameters
WrittenBookContent writtenBookContent
ตัวอย่างใช้งาน
SetWrittenBookPagesFunction instance = ...;
WrittenBookContent writtenBookContent = ...;
WrittenBookContent result = instance.apply(writtenBookContent);
net.minecraft.world.level.storage.loot.functions.SetWrittenBookPagesFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetWrittenBookPagesFunction.java:52 - Modifiers:
public - Return:
LootItemFunctionType<SetWrittenBookPagesFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.SET_WRITTEN_BOOK_PAGES.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SetWrittenBookPagesFunction instance = ...;
LootItemFunctionType<SetWrittenBookPagesFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SetWrittenBookPagesFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetWrittenBookPagesFunction.java:40 - Modifiers:
protected - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: update(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}
net.minecraft.world.level.storage.loot.functions.SetWrittenBookPagesFunction#SetWrittenBookPagesFunction(List<LootItemCondition>,List<Filterable<Component>>,ListOperation)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SetWrittenBookPagesFunction.java:34 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ SetWrittenBookPagesFunction ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: pages, pageOperation.
Parameters
List<LootItemCondition> listList<Filterable<Component>> list2ListOperation listOperation
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
List<Filterable<Component>> list2 = ...;
ListOperation listOperation = ...;
SetWrittenBookPagesFunction instance = new SetWrittenBookPagesFunction(list, list2, listOperation);
SmeltItemFunction
- Full name:
net.minecraft.world.level.storage.loot.functions.SmeltItemFunction - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/SmeltItemFunction.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SmeltItemFunction#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SmeltItemFunction.java:25 - Modifiers:
public - Return:
LootItemFunctionType<SmeltItemFunction>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.FURNACE_SMELT.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
SmeltItemFunction instance = ...;
LootItemFunctionType<SmeltItemFunction> result = instance.getType();
net.minecraft.world.level.storage.loot.functions.SmeltItemFunction#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SmeltItemFunction.java:30 - Modifiers:
public - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), getLevel(), recipeAccess(), getRecipeFor(), isPresent(), get(), value(), assemble(). สร้างออบเจ็กต์: SingleRecipeInput. มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
SmeltItemFunction instance = ...;
ItemStack itemStack = ...;
LootContext lootContext = ...;
ItemStack result = instance.run(itemStack, lootContext);
net.minecraft.world.level.storage.loot.functions.SmeltItemFunction#smelted()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/SmeltItemFunction.java:51 - Modifiers:
public static - Return:
LootItemConditionalFunction.Builder<?>
คืออะไร
ดำเนินการ smelted ตาม implementation ของ SmeltItemFunction
ทำงานยังไง
เรียกต่อ: simpleBuilder(). คืนค่า: simpleBuilder(SmeltItemFunction::new).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ToggleTooltips
- Full name:
net.minecraft.world.level.storage.loot.functions.ToggleTooltips - Package:
net.minecraft.world.level.storage.loot.functions - Source:
common—net/minecraft/world/level/storage/loot/functions/ToggleTooltips.java - Type:
class - Modifiers:
public - Extends:
LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.ToggleTooltips#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ToggleTooltips.java:67 - Modifiers:
public - Return:
LootItemFunctionType<ToggleTooltips>
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemFunctions.TOGGLE_TOOLTIPS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.functions.ToggleTooltips#run(ItemStack,LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/functions/ToggleTooltips.java:61 - Modifiers:
protected - Return:
ItemStack
คืออะไร
สั่งทำงาน run
ทำงานยังไง
เรียกต่อ: forEach(), applyIfPresent(). คืนค่า: itemStack.
Parameters
ItemStack itemStackLootContext lootContext
ตัวอย่างใช้งาน
ItemStack itemStack = ...;
LootContext lootContext = ...;
@Override
protected ItemStack run(ItemStack itemStack, LootContext lootContext) {
return super.run(itemStack, lootContext);
}