Package net.minecraft.world.level.storage.loot.predicates
Part 1/1
AllOfCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.AllOfCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/AllOfCondition.java - Type:
class - Modifiers:
public - Extends:
CompositeLootItemCondition
net.minecraft.world.level.storage.loot.predicates.AllOfCondition#allOf(List<LootItemCondition>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AllOfCondition.java:16 - Modifiers:
public static - Return:
AllOfCondition
คืออะไร
ดำเนินการ allOf ตาม implementation ของ AllOfCondition
ทำงานยังไง
เรียกต่อ: copyOf(). สร้างออบเจ็กต์: AllOfCondition. คืนค่า: new AllOfCondition(List.copyOf(list)).
Parameters
List<LootItemCondition> list
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.AllOfCondition#allOf(LootItemCondition.Builder[])
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AllOfCondition.java:25 - Modifiers:
public static - Return:
AllOfCondition.Builder
คืออะไร
ดำเนินการ allOf ตาม implementation ของ AllOfCondition
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: AllOfCondition.Builder. คืนค่า: new AllOfCondition.Builder(builders).
Parameters
LootItemCondition.Builder[] builders
ตัวอย่างใช้งาน
LootItemCondition.Builder[] builders = ...;
AllOfCondition.Builder result = AllOfCondition.allOf(builders);
net.minecraft.world.level.storage.loot.predicates.AllOfCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AllOfCondition.java:20 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.ALL_OF.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
AllOfCondition$Builder
- Full name:
net.minecraft.world.level.storage.loot.predicates.AllOfCondition$Builder - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/AllOfCondition.java - Type:
class - Modifiers:
public static - Extends:
CompositeLootItemCondition.Builder
net.minecraft.world.level.storage.loot.predicates.AllOfCondition$Builder#and(LootItemCondition.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AllOfCondition.java:34 - Modifiers:
public - Return:
AllOfCondition.Builder
คืออะไร
ดำเนินการ and ตาม implementation ของ AllOfCondition$Builder
ทำงานยังไง
เรียกต่อ: addTerm(). คืนค่า: this.
Parameters
LootItemCondition.Builder builder
ตัวอย่างใช้งาน
AllOfCondition.Builder instance = ...;
LootItemCondition.Builder builder = ...;
AllOfCondition.Builder result = instance.and(builder);
net.minecraft.world.level.storage.loot.predicates.AllOfCondition$Builder#Builder(LootItemCondition.Builder[])
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AllOfCondition.java:30 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AllOfCondition.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
LootItemCondition.Builder[] builders
ตัวอย่างใช้งาน
LootItemCondition.Builder[] builders = ...;
AllOfCondition.Builder instance = new AllOfCondition.Builder(builders);
net.minecraft.world.level.storage.loot.predicates.AllOfCondition$Builder#create(List<LootItemCondition>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AllOfCondition.java:40 - Modifiers:
protected - Return:
LootItemCondition
คืออะไร
สร้าง create
ทำงานยังไง
สร้างออบเจ็กต์: AllOfCondition. คืนค่า: new AllOfCondition(list).
Parameters
List<LootItemCondition> list
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
@Override
protected LootItemCondition create(List<LootItemCondition> list) {
return super.create(list);
}
AnyOfCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.AnyOfCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/AnyOfCondition.java - Type:
class - Modifiers:
public - Extends:
CompositeLootItemCondition
net.minecraft.world.level.storage.loot.predicates.AnyOfCondition#anyOf(LootItemCondition.Builder[])
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AnyOfCondition.java:19 - Modifiers:
public static - Return:
AnyOfCondition.Builder
คืออะไร
ดำเนินการ anyOf ตาม implementation ของ AnyOfCondition
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: AnyOfCondition.Builder. คืนค่า: new AnyOfCondition.Builder(builders).
Parameters
LootItemCondition.Builder[] builders
ตัวอย่างใช้งาน
LootItemCondition.Builder[] builders = ...;
AnyOfCondition.Builder result = AnyOfCondition.anyOf(builders);
net.minecraft.world.level.storage.loot.predicates.AnyOfCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AnyOfCondition.java:14 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.ANY_OF.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
AnyOfCondition$Builder
- Full name:
net.minecraft.world.level.storage.loot.predicates.AnyOfCondition$Builder - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/AnyOfCondition.java - Type:
class - Modifiers:
public static - Extends:
CompositeLootItemCondition.Builder
net.minecraft.world.level.storage.loot.predicates.AnyOfCondition$Builder#Builder(LootItemCondition.Builder[])
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AnyOfCondition.java:24 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ AnyOfCondition.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
LootItemCondition.Builder[] builders
ตัวอย่างใช้งาน
LootItemCondition.Builder[] builders = ...;
AnyOfCondition.Builder instance = new AnyOfCondition.Builder(builders);
net.minecraft.world.level.storage.loot.predicates.AnyOfCondition$Builder#create(List<LootItemCondition>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AnyOfCondition.java:34 - Modifiers:
protected - Return:
LootItemCondition
คืออะไร
สร้าง create
ทำงานยังไง
สร้างออบเจ็กต์: AnyOfCondition. คืนค่า: new AnyOfCondition(list).
Parameters
List<LootItemCondition> list
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
@Override
protected LootItemCondition create(List<LootItemCondition> list) {
return super.create(list);
}
net.minecraft.world.level.storage.loot.predicates.AnyOfCondition$Builder#or(LootItemCondition.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/AnyOfCondition.java:28 - Modifiers:
public - Return:
AnyOfCondition.Builder
คืออะไร
ดำเนินการ or ตาม implementation ของ AnyOfCondition$Builder
ทำงานยังไง
เรียกต่อ: addTerm(). คืนค่า: this.
Parameters
LootItemCondition.Builder builder
ตัวอย่างใช้งาน
AnyOfCondition.Builder instance = ...;
LootItemCondition.Builder builder = ...;
AnyOfCondition.Builder result = instance.or(builder);
BonusLevelTableCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.BonusLevelTableCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/BonusLevelTableCondition.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.BonusLevelTableCondition#bonusLevelFlatChance(Holder<Enchantment>,float[])
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/BonusLevelTableCondition.java:44 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ bonusLevelFlatChance ตาม implementation ของ BonusLevelTableCondition
ทำงานยังไง
มีการวนลูป. เรียกต่อ: add(). สร้างออบเจ็กต์: ArrayList<>, BonusLevelTableCondition. คืนค่า: () -> new BonusLevelTableCondition(holder, list).
Parameters
Holder<Enchantment> holderfloat[] fs
ตัวอย่างใช้งาน
Holder<Enchantment> holder = ...;
float[] fs = ...;
LootItemCondition.Builder result = BonusLevelTableCondition.bonusLevelFlatChance(holder, fs);
net.minecraft.world.level.storage.loot.predicates.BonusLevelTableCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/BonusLevelTableCondition.java:32 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.TOOL).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
BonusLevelTableCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.BonusLevelTableCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/BonusLevelTableCondition.java:27 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.TABLE_BONUS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.BonusLevelTableCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/BonusLevelTableCondition.java:37 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getOptionalParameter(), getItemEnchantmentLevel(), get(), min(), size(), getRandom(), nextFloat(). คืนค่า: lootContext.getRandom().nextFloat() < f.
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
BonusLevelTableCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
CompositeLootItemCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java - Type:
class - Modifiers:
public abstract - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition#CompositeLootItemCondition(List<LootItemCondition>,Predicate<LootContext>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java:17 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CompositeLootItemCondition ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: terms, composedPredicate.
Parameters
List<LootItemCondition> listPredicate<LootContext> predicate
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
Predicate<LootContext> predicate = ...;
CompositeLootItemCondition instance = new CompositeLootItemCondition(list, predicate);
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition#createCodec(Function<List<LootItemCondition>, T>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java:22 - Modifiers:
protected static - Return:
MapCodec<T>
คืออะไร
สร้าง Codec
ทำงานยังไง
เรียกต่อ: mapCodec(), group(), listOf(), fieldOf(), forGetter(), apply().
Parameters
Function<List<LootItemCondition>, T> function
ตัวอย่างใช้งาน
Function<List<LootItemCondition>, T> function = ...;
@Override
protected MapCodec<T> createCodec(Function<List<LootItemCondition>, T> function) {
return super.createCodec(function);
}
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition#createInlineCodec(Function<List<LootItemCondition>, T>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java:31 - Modifiers:
protected static - Return:
Codec<T>
คืออะไร
สร้าง Inline Codec
ทำงานยังไง
เรียกต่อ: listOf(), xmap(). คืนค่า: LootItemCondition.DIRECT_CODEC.listOf().xmap(function, compositeLootItemCondition -> compositeLootItemCondition.terms).
Parameters
Function<List<LootItemCondition>, T> function
ตัวอย่างใช้งาน
Function<List<LootItemCondition>, T> function = ...;
@Override
protected Codec<T> createInlineCodec(Function<List<LootItemCondition>, T> function) {
return super.createInlineCodec(function);
}
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java:35 - Modifiers:
public final - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
คืนค่า: this.composedPredicate.test(lootContext).
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
CompositeLootItemCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java:39 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
มีการวนลูป. เรียกต่อ: size(), get(), forChild().
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
CompositeLootItemCondition instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
CompositeLootItemCondition$Builder
- Full name:
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition$Builder - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java - Type:
class - Modifiers:
public abstract static - Implements:
LootItemCondition.Builder
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition$Builder#addTerm(LootItemCondition.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java:57 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Term
ทำงานยังไง
เรียกต่อ: add(), build().
Parameters
LootItemCondition.Builder builder
ตัวอย่างใช้งาน
CompositeLootItemCondition.Builder instance = ...;
LootItemCondition.Builder builder = ...;
instance.addTerm(builder);
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java:61 - Modifiers:
public - Return:
LootItemCondition
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: create(). คืนค่า: this.create(this.terms.build()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition$Builder#Builder(LootItemCondition.Builder[])
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java:51 - Modifiers:
protected - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ CompositeLootItemCondition.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
มีการวนลูป. เรียกต่อ: add(), build().
Parameters
LootItemCondition.Builder[] builders
ตัวอย่างใช้งาน
LootItemCondition.Builder[] builders = ...;
CompositeLootItemCondition.Builder instance = new CompositeLootItemCondition.Builder(builders);
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition$Builder#create(List<LootItemCondition>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java:66 - Modifiers:
protected abstract - Return:
LootItemCondition
คืออะไร
สร้าง create
ทำงานยังไง
ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง
Parameters
List<LootItemCondition> list
ตัวอย่างใช้งาน
List<LootItemCondition> list = ...;
@Override
protected LootItemCondition create(List<LootItemCondition> list) {
return super.create(list);
}
ConditionReference
- Full name:
net.minecraft.world.level.storage.loot.predicates.ConditionReference - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/ConditionReference.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.ConditionReference#conditionReference(ResourceKey<LootItemCondition>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ConditionReference.java:62 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ conditionReference ตาม implementation ของ ConditionReference
ทำงานยังไง
สร้างออบเจ็กต์: ConditionReference. คืนค่า: () -> new ConditionReference(resourceKey).
Parameters
ResourceKey<LootItemCondition> resourceKey
ตัวอย่างใช้งาน
ResourceKey<LootItemCondition> resourceKey = ...;
LootItemCondition.Builder result = ConditionReference.conditionReference(resourceKey);
net.minecraft.world.level.storage.loot.predicates.ConditionReference#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ConditionReference.java:20 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.REFERENCE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.ConditionReference#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ConditionReference.java:42 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: getResolver(), get(), map(), orElse(), warn(), location(), createVisitedEntry(), pushVisitedElement(). มีจุด return อย่างน้อย 3 จุด.
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
ConditionReference instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
net.minecraft.world.level.storage.loot.predicates.ConditionReference#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ConditionReference.java:25 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: allowsReferences(), reportProblem(), location(), hasVisitedElement(), resolver(), get(), ifPresentOrElse(), value().
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
ConditionReference instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
ConditionUserBuilder
- Full name:
net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/ConditionUserBuilder.java - Type:
interface - Modifiers:
public
net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder#unwrap()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ConditionUserBuilder.java:18 - Modifiers: ``
- Return:
T
คืออะไร
ดำเนินการ unwrap ตาม implementation ของ ConditionUserBuilder
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder#when(Iterable<E>,Function<E, LootItemCondition.Builder>)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ConditionUserBuilder.java:8 - Modifiers:
default - Return:
T
คืออะไร
ดำเนินการ when ตาม implementation ของ ConditionUserBuilder
ทำงานยังไง
มีการวนลูป. เรียกต่อ: unwrap(), apply(). คืนค่า: conditionUserBuilder.
Parameters
Iterable<E> iterableFunction<E, LootItemCondition.Builder> function
ตัวอย่างใช้งาน
ConditionUserBuilder instance = ...;
Iterable<E> iterable = ...;
Function<E, LootItemCondition.Builder> function = ...;
T result = instance.when(iterable, function);
net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder#when(LootItemCondition.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ConditionUserBuilder.java:6 - Modifiers: ``
- Return:
T
คืออะไร
ดำเนินการ when ตาม implementation ของ ConditionUserBuilder
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
LootItemCondition.Builder builder
ตัวอย่างใช้งาน
ConditionUserBuilder instance = ...;
LootItemCondition.Builder builder = ...;
T result = instance.when(builder);
DamageSourceCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.DamageSourceCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/DamageSourceCondition.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.DamageSourceCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/DamageSourceCondition.java:25 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.ORIGIN, LootContextParams.DAMAGE_SOURCE).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
DamageSourceCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.DamageSourceCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/DamageSourceCondition.java:20 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.DAMAGE_SOURCE_PROPERTIES.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.DamageSourceCondition#hasDamageSource(DamageSourcePredicate.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/DamageSourceCondition.java:36 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ตรวจสอบว่ามี Damage Source
ทำงานยังไง
เรียกต่อ: of(), build(). สร้างออบเจ็กต์: DamageSourceCondition. คืนค่า: () -> new DamageSourceCondition(Optional.of(builder.build())).
Parameters
DamageSourcePredicate.Builder builder
ตัวอย่างใช้งาน
DamageSourcePredicate.Builder builder = ...;
LootItemCondition.Builder result = DamageSourceCondition.hasDamageSource(builder);
net.minecraft.world.level.storage.loot.predicates.DamageSourceCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/DamageSourceCondition.java:30 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getOptionalParameter(), isEmpty(), get(), matches(), getLevel(). คืนค่า: vec3 != null && damageSource != null ? this.predicate.isEmpty() || this.predicate.get().matches(lootContext.getLevel(), vec3, damageSource) : false.
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
DamageSourceCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
EnchantmentActiveCheck
- Full name:
net.minecraft.world.level.storage.loot.predicates.EnchantmentActiveCheck - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/EnchantmentActiveCheck.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.EnchantmentActiveCheck#enchantmentActiveCheck()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EnchantmentActiveCheck.java:30 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ enchantmentActiveCheck ตาม implementation ของ EnchantmentActiveCheck
ทำงานยังไง
สร้างออบเจ็กต์: EnchantmentActiveCheck. คืนค่า: () -> new EnchantmentActiveCheck(true).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.EnchantmentActiveCheck#enchantmentInactiveCheck()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EnchantmentActiveCheck.java:34 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ enchantmentInactiveCheck ตาม implementation ของ EnchantmentActiveCheck
ทำงานยังไง
สร้างออบเจ็กต์: EnchantmentActiveCheck. คืนค่า: () -> new EnchantmentActiveCheck(false).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.EnchantmentActiveCheck#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EnchantmentActiveCheck.java:25 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.ENCHANTMENT_ACTIVE).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
EnchantmentActiveCheck instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.EnchantmentActiveCheck#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EnchantmentActiveCheck.java:20 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.ENCHANTMENT_ACTIVE_CHECK.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.EnchantmentActiveCheck#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EnchantmentActiveCheck.java:16 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getParameter(). คืนค่า: lootContext.getParameter(LootContextParams.ENCHANTMENT_ACTIVE) == this.active.
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
EnchantmentActiveCheck instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
EntityHasScoreCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java:34 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: concat(), of(), getParam(), values(), stream(), flatMap(), collect(), toImmutableSet().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
EntityHasScoreCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java:29 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.ENTITY_SCORES.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition#hasScore(LootContext,Entity,Scoreboard,String,IntRange)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java:59 - Modifiers:
protected - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Score
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getObjective(), getPlayerScoreInfo(), test(), value(). มีจุด return อย่างน้อย 2 จุด.
Parameters
LootContext lootContextEntity entityScoreboard scoreboardString stringIntRange intRange
ตัวอย่างใช้งาน
LootContext lootContext = ...;
Entity entity = ...;
Scoreboard scoreboard = ...;
IntRange intRange = ...;
@Override
protected boolean hasScore(LootContext lootContext, Entity entity, Scoreboard scoreboard, String string, IntRange intRange) {
return super.hasScore(lootContext, entity, scoreboard, string, intRange);
}
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition#hasScores(LootContext.EntityTarget)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java:69 - Modifiers:
public static - Return:
EntityHasScoreCondition.Builder
คืออะไร
ตรวจสอบว่ามี Scores
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: EntityHasScoreCondition.Builder. คืนค่า: new EntityHasScoreCondition.Builder(entityTarget).
Parameters
LootContext.EntityTarget entityTarget
ตัวอย่างใช้งาน
LootContext.EntityTarget entityTarget = ...;
EntityHasScoreCondition.Builder result = EntityHasScoreCondition.hasScores(entityTarget);
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java:42 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getOptionalParameter(), getParam(), getLevel(), getScoreboard(), entrySet(), hasScore(), getKey(), getValue(). มีจุด return อย่างน้อย 3 จุด.
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
EntityHasScoreCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
EntityHasScoreCondition$Builder
- Full name:
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition$Builder - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java - Type:
class - Modifiers:
public static - Implements:
LootItemCondition.Builder
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java:86 - Modifiers:
public - Return:
LootItemCondition
คืออะไร
สร้าง build
ทำงานยังไง
สร้างออบเจ็กต์: EntityHasScoreCondition. คืนค่า: new EntityHasScoreCondition(this.scores.build(), this.entityTarget).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition$Builder#Builder(LootContext.EntityTarget)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java:77 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EntityHasScoreCondition.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: entityTarget.
Parameters
LootContext.EntityTarget entityTarget
ตัวอย่างใช้งาน
LootContext.EntityTarget entityTarget = ...;
EntityHasScoreCondition.Builder instance = new EntityHasScoreCondition.Builder(entityTarget);
net.minecraft.world.level.storage.loot.predicates.EntityHasScoreCondition$Builder#withScore(String,IntRange)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/EntityHasScoreCondition.java:81 - Modifiers:
public - Return:
EntityHasScoreCondition.Builder
คืออะไร
ดำเนินการ withScore ตาม implementation ของ EntityHasScoreCondition$Builder
ทำงานยังไง
เรียกต่อ: put(). คืนค่า: this.
Parameters
String stringIntRange intRange
ตัวอย่างใช้งาน
EntityHasScoreCondition.Builder instance = ...;
IntRange intRange = ...;
EntityHasScoreCondition.Builder result = instance.withScore("value", intRange);
ExplosionCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.ExplosionCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java - Type:
class - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.ExplosionCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java:22 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.EXPLOSION_RADIUS).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ExplosionCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.ExplosionCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java:17 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.SURVIVES_EXPLOSION.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.ExplosionCondition#survivesExplosion()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java:38 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ survivesExplosion ตาม implementation ของ ExplosionCondition
ทำงานยังไง
คืนค่า: () -> INSTANCE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.ExplosionCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java:27 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getOptionalParameter(), getRandom(), nextFloat(). มีจุด return อย่างน้อย 2 จุด.
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
ExplosionCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
InvertedLootItemCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.InvertedLootItemCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/InvertedLootItemCondition.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.InvertedLootItemCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/InvertedLootItemCondition.java:25 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
คืนค่า: this.term.getReferencedContextParams().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
InvertedLootItemCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.InvertedLootItemCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/InvertedLootItemCondition.java:16 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.INVERTED.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.InvertedLootItemCondition#invert(LootItemCondition.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/InvertedLootItemCondition.java:36 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ invert ตาม implementation ของ InvertedLootItemCondition
ทำงานยังไง
เรียกต่อ: build(). สร้างออบเจ็กต์: InvertedLootItemCondition. คืนค่า: () -> invertedLootItemCondition.
Parameters
LootItemCondition.Builder builder
ตัวอย่างใช้งาน
LootItemCondition.Builder builder = ...;
LootItemCondition.Builder result = InvertedLootItemCondition.invert(builder);
net.minecraft.world.level.storage.loot.predicates.InvertedLootItemCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/InvertedLootItemCondition.java:21 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
คืนค่า: !this.term.test(lootContext).
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
InvertedLootItemCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
net.minecraft.world.level.storage.loot.predicates.InvertedLootItemCondition#validate(ValidationContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/InvertedLootItemCondition.java:30 - Modifiers:
public - Return:
void
คืออะไร
ตรวจสอบความถูกต้อง validate
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 2 statement).
Parameters
ValidationContext validationContext
ตัวอย่างใช้งาน
InvertedLootItemCondition instance = ...;
ValidationContext validationContext = ...;
instance.validate(validationContext);
LocationCheck
- Full name:
net.minecraft.world.level.storage.loot.predicates.LocationCheck - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/LocationCheck.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.LocationCheck#checkLocation(LocationPredicate.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LocationCheck.java:51 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ตรวจสอบ Location
ทำงานยังไง
เรียกต่อ: of(), build(). สร้างออบเจ็กต์: LocationCheck. คืนค่า: () -> new LocationCheck(Optional.of(builder.build()), BlockPos.ZERO).
Parameters
LocationPredicate.Builder builder
ตัวอย่างใช้งาน
LocationPredicate.Builder builder = ...;
LootItemCondition.Builder result = LocationCheck.checkLocation(builder);
net.minecraft.world.level.storage.loot.predicates.LocationCheck#checkLocation(LocationPredicate.Builder,BlockPos)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LocationCheck.java:55 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ตรวจสอบ Location
ทำงานยังไง
เรียกต่อ: of(), build(). สร้างออบเจ็กต์: LocationCheck. คืนค่า: () -> new LocationCheck(Optional.of(builder.build()), blockPos).
Parameters
LocationPredicate.Builder builderBlockPos blockPos
ตัวอย่างใช้งาน
LocationPredicate.Builder builder = ...;
BlockPos blockPos = ...;
LootItemCondition.Builder result = LocationCheck.checkLocation(builder, blockPos);
net.minecraft.world.level.storage.loot.predicates.LocationCheck#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LocationCheck.java:46 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.ORIGIN).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.LocationCheck#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LocationCheck.java:32 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.LOCATION_CHECK.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.LocationCheck#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LocationCheck.java:37 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getOptionalParameter(), isEmpty(), get(), matches(), getLevel(), x(), getX(), y().
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
LocationCheck instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
LootItemBlockStatePropertyCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java:39 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.BLOCK_STATE).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemBlockStatePropertyCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java:34 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.BLOCK_STATE_PROPERTY.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemBlockStatePropertyCondition instance = ...;
LootItemConditionType result = instance.getType();
net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition#hasBlockStateProperties(Block)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java:49 - Modifiers:
public static - Return:
LootItemBlockStatePropertyCondition.Builder
คืออะไร
ตรวจสอบว่ามี Block State Properties
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: LootItemBlockStatePropertyCondition.Builder. คืนค่า: new LootItemBlockStatePropertyCondition.Builder(block).
Parameters
Block block
ตัวอย่างใช้งาน
Block block = ...;
LootItemBlockStatePropertyCondition.Builder result = LootItemBlockStatePropertyCondition.hasBlockStateProperties(block);
net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java:44 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getOptionalParameter(), is(), isEmpty(), get(), matches(). คืนค่า: blockState != null && blockState.is(this.block) && (this.properties.isEmpty() || this.properties.get().matches(blockState)).
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
LootItemBlockStatePropertyCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
LootItemBlockStatePropertyCondition$Builder
- Full name:
net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition$Builder - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java - Type:
class - Modifiers:
public static - Implements:
LootItemCondition.Builder
net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java:66 - Modifiers:
public - Return:
LootItemCondition
คืออะไร
สร้าง build
ทำงานยังไง
สร้างออบเจ็กต์: LootItemBlockStatePropertyCondition. คืนค่า: new LootItemBlockStatePropertyCondition(this.block, this.properties).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemBlockStatePropertyCondition.Builder instance = ...;
LootItemCondition result = instance.build();
net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition$Builder#Builder(Block)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java:57 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ LootItemBlockStatePropertyCondition.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: block. เรียกต่อ: builtInRegistryHolder().
Parameters
Block block
ตัวอย่างใช้งาน
Block block = ...;
LootItemBlockStatePropertyCondition.Builder instance = new LootItemBlockStatePropertyCondition.Builder(block);
net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition$Builder#setProperties(StatePropertiesPredicate.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java:61 - Modifiers:
public - Return:
LootItemBlockStatePropertyCondition.Builder
คืออะไร
กำหนดค่า Properties
ทำงานยังไง
แก้ state: properties. เรียกต่อ: build(). คืนค่า: this.
Parameters
StatePropertiesPredicate.Builder builder
ตัวอย่างใช้งาน
LootItemBlockStatePropertyCondition.Builder instance = ...;
StatePropertiesPredicate.Builder builder = ...;
LootItemBlockStatePropertyCondition.Builder result = instance.setProperties(builder);
LootItemCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.LootItemCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/LootItemCondition.java - Type:
interface - Modifiers:
public - Implements:
LootContextUser,Predicate<LootContext>
net.minecraft.world.level.storage.loot.predicates.LootItemCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemCondition.java:19 - Modifiers: ``
- Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemEntityPropertyCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/LootItemEntityPropertyCondition.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition#entityPresent(LootContext.EntityTarget)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemEntityPropertyCondition.java:39 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ entityPresent ตาม implementation ของ LootItemEntityPropertyCondition
ทำงานยังไง
เรียกต่อ: hasProperties(), entity(). คืนค่า: hasProperties(entityTarget, EntityPredicate.Builder.entity()).
Parameters
LootContext.EntityTarget entityTarget
ตัวอย่างใช้งาน
LootContext.EntityTarget entityTarget = ...;
LootItemCondition.Builder result = LootItemEntityPropertyCondition.entityPresent(entityTarget);
net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemEntityPropertyCondition.java:28 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(), getParam(). คืนค่า: Set.of(LootContextParams.ORIGIN, this.entityTarget.getParam()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemEntityPropertyCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemEntityPropertyCondition.java:23 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.ENTITY_PROPERTIES.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition#hasProperties(LootContext.EntityTarget,EntityPredicate)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemEntityPropertyCondition.java:47 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ตรวจสอบว่ามี Properties
ทำงานยังไง
เรียกต่อ: of(). สร้างออบเจ็กต์: LootItemEntityPropertyCondition. คืนค่า: () -> new LootItemEntityPropertyCondition(Optional.of(entityPredicate), entityTarget).
Parameters
LootContext.EntityTarget entityTargetEntityPredicate entityPredicate
ตัวอย่างใช้งาน
LootContext.EntityTarget entityTarget = ...;
EntityPredicate entityPredicate = ...;
LootItemCondition.Builder result = LootItemEntityPropertyCondition.hasProperties(entityTarget, entityPredicate);
net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition#hasProperties(LootContext.EntityTarget,EntityPredicate.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemEntityPropertyCondition.java:43 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ตรวจสอบว่ามี Properties
ทำงานยังไง
เรียกต่อ: of(), build(). สร้างออบเจ็กต์: LootItemEntityPropertyCondition. คืนค่า: () -> new LootItemEntityPropertyCondition(Optional.of(builder.build()), entityTarget).
Parameters
LootContext.EntityTarget entityTargetEntityPredicate.Builder builder
ตัวอย่างใช้งาน
LootContext.EntityTarget entityTarget = ...;
EntityPredicate.Builder builder = ...;
LootItemCondition.Builder result = LootItemEntityPropertyCondition.hasProperties(entityTarget, builder);
net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemEntityPropertyCondition.java:33 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getOptionalParameter(), getParam(), isEmpty(), get(), matches(), getLevel(). คืนค่า: this.predicate.isEmpty() || this.predicate.get().matches(lootContext.getLevel(), vec3, entity).
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
LootItemEntityPropertyCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
LootItemKilledByPlayerCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.LootItemKilledByPlayerCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/LootItemKilledByPlayerCondition.java - Type:
class - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.LootItemKilledByPlayerCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemKilledByPlayerCondition.java:21 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.LAST_DAMAGE_PLAYER).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemKilledByPlayerCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.LootItemKilledByPlayerCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemKilledByPlayerCondition.java:16 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.KILLED_BY_PLAYER.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.LootItemKilledByPlayerCondition#killedByPlayer()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemKilledByPlayerCondition.java:30 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ killedByPlayer ตาม implementation ของ LootItemKilledByPlayerCondition
ทำงานยังไง
คืนค่า: () -> INSTANCE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.LootItemKilledByPlayerCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemKilledByPlayerCondition.java:26 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: hasParameter(). คืนค่า: lootContext.hasParameter(LootContextParams.LAST_DAMAGE_PLAYER).
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
LootItemKilledByPlayerCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
LootItemRandomChanceCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceCondition.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceCondition.java:16 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.RANDOM_CHANCE.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition#randomChance(float)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceCondition.java:26 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ randomChance ตาม implementation ของ LootItemRandomChanceCondition
ทำงานยังไง
เรียกต่อ: exactly(). สร้างออบเจ็กต์: LootItemRandomChanceCondition. คืนค่า: () -> new LootItemRandomChanceCondition(ConstantValue.exactly(f)).
Parameters
float f
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition#randomChance(NumberProvider)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceCondition.java:30 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ randomChance ตาม implementation ของ LootItemRandomChanceCondition
ทำงานยังไง
สร้างออบเจ็กต์: LootItemRandomChanceCondition. คืนค่า: () -> new LootItemRandomChanceCondition(numberProvider).
Parameters
NumberProvider numberProvider
ตัวอย่างใช้งาน
NumberProvider numberProvider = ...;
LootItemCondition.Builder result = LootItemRandomChanceCondition.randomChance(numberProvider);
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceCondition.java:21 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getFloat(), getRandom(), nextFloat(). คืนค่า: lootContext.getRandom().nextFloat() < f.
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
LootItemRandomChanceCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
LootItemRandomChanceWithEnchantedBonusCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceWithEnchantedBonusCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceWithEnchantedBonusCondition.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceWithEnchantedBonusCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceWithEnchantedBonusCondition.java:36 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.ATTACKING_ENTITY).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemRandomChanceWithEnchantedBonusCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceWithEnchantedBonusCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceWithEnchantedBonusCondition.java:31 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.RANDOM_CHANCE_WITH_ENCHANTED_BONUS.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
LootItemRandomChanceWithEnchantedBonusCondition instance = ...;
LootItemConditionType result = instance.getType();
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceWithEnchantedBonusCondition#randomChanceAndLootingBoost(HolderLookup.Provider,float,float)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceWithEnchantedBonusCondition.java:48 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ randomChanceAndLootingBoost ตาม implementation ของ LootItemRandomChanceWithEnchantedBonusCondition
ทำงานยังไง
เรียกต่อ: lookupOrThrow(), Linear(), getOrThrow(). สร้างออบเจ็กต์: LootItemRandomChanceWithEnchantedBonusCondition, LevelBasedValue.Linear. คืนค่า: () -> new LootItemRandomChanceWithEnchantedBonusCondition(f, new LevelBasedValue.Linear(f + g, g), registryLookup.getOrThrow(Enchantments.LOOTING)).
Parameters
HolderLookup.Provider providerfloat ffloat g
ตัวอย่างใช้งาน
HolderLookup.Provider provider = ...;
LootItemCondition.Builder result = LootItemRandomChanceWithEnchantedBonusCondition.randomChanceAndLootingBoost(provider, 0.0F, 0.0F);
net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceWithEnchantedBonusCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceWithEnchantedBonusCondition.java:41 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getOptionalParameter(), getEnchantmentLevel(), calculate(), getRandom(), nextFloat(). คืนค่า: lootContext.getRandom().nextFloat() < f.
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
LootItemRandomChanceWithEnchantedBonusCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
MatchTool
- Full name:
net.minecraft.world.level.storage.loot.predicates.MatchTool - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/MatchTool.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.MatchTool#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/MatchTool.java:23 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: of(). คืนค่า: Set.of(LootContextParams.TOOL).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.MatchTool#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/MatchTool.java:18 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.MATCH_TOOL.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.MatchTool#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/MatchTool.java:28 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getOptionalParameter(), isEmpty(), get(). คืนค่า: itemStack != null && (this.predicate.isEmpty() || this.predicate.get().test(itemStack)).
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
MatchTool instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
net.minecraft.world.level.storage.loot.predicates.MatchTool#toolMatches(ItemPredicate.Builder)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/MatchTool.java:33 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ดำเนินการ toolMatches ตาม implementation ของ MatchTool
ทำงานยังไง
เรียกต่อ: of(), build(). สร้างออบเจ็กต์: MatchTool. คืนค่า: () -> new MatchTool(Optional.of(builder.build())).
Parameters
ItemPredicate.Builder builder
ตัวอย่างใช้งาน
ItemPredicate.Builder builder = ...;
LootItemCondition.Builder result = MatchTool.toolMatches(builder);
TimeCheck
- Full name:
net.minecraft.world.level.storage.loot.predicates.TimeCheck - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/TimeCheck.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.TimeCheck#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/TimeCheck.java:24 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
คืนค่า: this.value.getReferencedContextParams().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.TimeCheck#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/TimeCheck.java:19 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.TIME_CHECK.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.TimeCheck#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/TimeCheck.java:29 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLevel(), getDayTime(), isPresent(), get(). คืนค่า: this.value.test(lootContext, (int)l).
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
TimeCheck instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
net.minecraft.world.level.storage.loot.predicates.TimeCheck#time(IntRange)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/TimeCheck.java:39 - Modifiers:
public static - Return:
TimeCheck.Builder
คืออะไร
ดำเนินการ time ตาม implementation ของ TimeCheck
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: TimeCheck.Builder. คืนค่า: new TimeCheck.Builder(intRange).
Parameters
IntRange intRange
ตัวอย่างใช้งาน
TimeCheck$Builder
- Full name:
net.minecraft.world.level.storage.loot.predicates.TimeCheck$Builder - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/TimeCheck.java - Type:
class - Modifiers:
public static - Implements:
LootItemCondition.Builder
net.minecraft.world.level.storage.loot.predicates.TimeCheck$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/TimeCheck.java:56 - Modifiers:
public - Return:
TimeCheck
คืออะไร
สร้าง build
ทำงานยังไง
สร้างออบเจ็กต์: TimeCheck. คืนค่า: new TimeCheck(this.period, this.value).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.TimeCheck$Builder#Builder(IntRange)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/TimeCheck.java:47 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ TimeCheck.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: value.
Parameters
IntRange intRange
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.TimeCheck$Builder#setPeriod(long)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/TimeCheck.java:51 - Modifiers:
public - Return:
TimeCheck.Builder
คืออะไร
กำหนดค่า Period
ทำงานยังไง
แก้ state: period. เรียกต่อ: of(). คืนค่า: this.
Parameters
long l
ตัวอย่างใช้งาน
ValueCheckCondition
- Full name:
net.minecraft.world.level.storage.loot.predicates.ValueCheckCondition - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/ValueCheckCondition.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.ValueCheckCondition#getReferencedContextParams()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ValueCheckCondition.java:26 - Modifiers:
public - Return:
Set<ContextKey<?>>
คืออะไร
อ่านค่า Referenced Context Params
ทำงานยังไง
เรียกต่อ: union(). คืนค่า: Sets.union(this.provider.getReferencedContextParams(), this.range.getReferencedContextParams()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
ValueCheckCondition instance = ...;
Set<ContextKey<?>> result = instance.getReferencedContextParams();
net.minecraft.world.level.storage.loot.predicates.ValueCheckCondition#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ValueCheckCondition.java:21 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.VALUE_CHECK.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.ValueCheckCondition#hasValue(NumberProvider,IntRange)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ValueCheckCondition.java:35 - Modifiers:
public static - Return:
LootItemCondition.Builder
คืออะไร
ตรวจสอบว่ามี Value
ทำงานยังไง
สร้างออบเจ็กต์: ValueCheckCondition. คืนค่า: () -> new ValueCheckCondition(numberProvider, intRange).
Parameters
NumberProvider numberProviderIntRange intRange
ตัวอย่างใช้งาน
NumberProvider numberProvider = ...;
IntRange intRange = ...;
LootItemCondition.Builder result = ValueCheckCondition.hasValue(numberProvider, intRange);
net.minecraft.world.level.storage.loot.predicates.ValueCheckCondition#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/ValueCheckCondition.java:31 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getInt(). คืนค่า: this.range.test(lootContext, this.provider.getInt(lootContext)).
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
ValueCheckCondition instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
WeatherCheck
- Full name:
net.minecraft.world.level.storage.loot.predicates.WeatherCheck - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/WeatherCheck.java - Type:
record - Modifiers:
public - Implements:
LootItemCondition
net.minecraft.world.level.storage.loot.predicates.WeatherCheck#getType()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/WeatherCheck.java:18 - Modifiers:
public - Return:
LootItemConditionType
คืออะไร
อ่านค่า Type
ทำงานยังไง
คืนค่า: LootItemConditions.WEATHER_CHECK.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.WeatherCheck#test(LootContext)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/WeatherCheck.java:23 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getLevel(), isPresent(), get(), isRaining(), isThundering().
Parameters
LootContext lootContext
ตัวอย่างใช้งาน
WeatherCheck instance = ...;
LootContext lootContext = ...;
boolean result = instance.test(lootContext);
net.minecraft.world.level.storage.loot.predicates.WeatherCheck#weather()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/WeatherCheck.java:30 - Modifiers:
public static - Return:
WeatherCheck.Builder
คืออะไร
ดำเนินการ weather ตาม implementation ของ WeatherCheck
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: WeatherCheck.Builder. คืนค่า: new WeatherCheck.Builder().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
WeatherCheck$Builder
- Full name:
net.minecraft.world.level.storage.loot.predicates.WeatherCheck$Builder - Package:
net.minecraft.world.level.storage.loot.predicates - Source:
common—net/minecraft/world/level/storage/loot/predicates/WeatherCheck.java - Type:
class - Modifiers:
public static - Implements:
LootItemCondition.Builder
net.minecraft.world.level.storage.loot.predicates.WeatherCheck$Builder#build()
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/WeatherCheck.java:48 - Modifiers:
public - Return:
WeatherCheck
คืออะไร
สร้าง build
ทำงานยังไง
สร้างออบเจ็กต์: WeatherCheck. คืนค่า: new WeatherCheck(this.isRaining, this.isThundering).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.WeatherCheck$Builder#setRaining(boolean)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/WeatherCheck.java:38 - Modifiers:
public - Return:
WeatherCheck.Builder
คืออะไร
กำหนดค่า Raining
ทำงานยังไง
แก้ state: isRaining. เรียกต่อ: of(). คืนค่า: this.
Parameters
boolean bl
ตัวอย่างใช้งาน
net.minecraft.world.level.storage.loot.predicates.WeatherCheck$Builder#setThundering(boolean)
- Origin:
common - Source:
net/minecraft/world/level/storage/loot/predicates/WeatherCheck.java:43 - Modifiers:
public - Return:
WeatherCheck.Builder
คืออะไร
กำหนดค่า Thundering
ทำงานยังไง
แก้ state: isThundering. เรียกต่อ: of(). คืนค่า: this.
Parameters
boolean bl