Package net.minecraft.core.component
Part 1/1
DataComponentHolder
- Full name:
net.minecraft.core.component.DataComponentHolder - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/DataComponentHolder.java - Type:
interface - Modifiers:
public
net.minecraft.core.component.DataComponentHolder#get(DataComponentType<? extends T>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentHolder.java:9 - Modifiers:
default - Return:
T
คืออะไร
อ่านค่า get
ทำงานยังไง
เรียกต่อ: getComponents(). คืนค่า: this.getComponents().get(dataComponentType).
Parameters
DataComponentType<? extends T> dataComponentType
ตัวอย่างใช้งาน
DataComponentHolder instance = ...;
DataComponentType<? extends T> dataComponentType = ...;
T result = instance.get(dataComponentType);
net.minecraft.core.component.DataComponentHolder#getAllOfType(Class<? extends T>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentHolder.java:14 - Modifiers:
default - Return:
Stream<T>
คืออะไร
อ่านค่า All Of Type
ทำงานยังไง
เรียกต่อ: getComponents(), stream(), map(), filter(), isAssignableFrom(), getClass(). คืนค่า: this.getComponents().stream().map(TypedDataComponent::value).filter(object -> class_.isAssignableFrom(object.getClass())).map(object -> (T)object).
Parameters
Class<? extends T> class_
ตัวอย่างใช้งาน
DataComponentHolder instance = ...;
Class<? extends T> class_ = ...;
Stream<T> result = instance.getAllOfType(class_);
net.minecraft.core.component.DataComponentHolder#getComponents()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentHolder.java:7 - Modifiers: ``
- Return:
DataComponentMap
คืออะไร
อ่านค่า Components
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentHolder#getOrDefault(DataComponentType<? extends T>,T)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentHolder.java:18 - Modifiers:
default - Return:
T
คืออะไร
อ่านค่า Or Default
ทำงานยังไง
เรียกต่อ: getComponents(). คืนค่า: this.getComponents().getOrDefault(dataComponentType, object).
Parameters
DataComponentType<? extends T> dataComponentTypeT object
ตัวอย่างใช้งาน
DataComponentHolder instance = ...;
DataComponentType<? extends T> dataComponentType = ...;
T object = ...;
T result = instance.getOrDefault(dataComponentType, object);
net.minecraft.core.component.DataComponentHolder#has(DataComponentType<?>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentHolder.java:22 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบว่ามี has
ทำงานยังไง
เรียกต่อ: getComponents(). คืนค่า: this.getComponents().has(dataComponentType).
Parameters
DataComponentType<?> dataComponentType
ตัวอย่างใช้งาน
DataComponentHolder instance = ...;
DataComponentType<?> dataComponentType = ...;
boolean result = instance.has(dataComponentType);
DataComponentMap
- Full name:
net.minecraft.core.component.DataComponentMap - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/DataComponentMap.java - Type:
interface - Modifiers:
public - Implements:
Iterable<TypedDataComponent<?>>
net.minecraft.core.component.DataComponentMap#builder()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:82 - Modifiers:
static - Return:
DataComponentMap.Builder
คืออะไร
ดำเนินการ builder ตาม implementation ของ DataComponentMap
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: DataComponentMap.Builder. คืนค่า: new DataComponentMap.Builder().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentMap#composite(DataComponentMap,DataComponentMap)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:66 - Modifiers:
static - Return:
DataComponentMap
คืออะไร
ดำเนินการ composite ตาม implementation ของ DataComponentMap
ทำงานยังไง
เรียกต่อ: get(), keySet(), union(). สร้างออบเจ็กต์: DataComponentMap. มีจุด return อย่างน้อย 2 จุด.
Parameters
DataComponentMap dataComponentMapDataComponentMap dataComponentMap2
ตัวอย่างใช้งาน
DataComponentMap dataComponentMap = ...;
DataComponentMap dataComponentMap2 = ...;
DataComponentMap result = DataComponentMap.composite(dataComponentMap, dataComponentMap2);
net.minecraft.core.component.DataComponentMap#filter(Predicate<DataComponentType<?>>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:123 - Modifiers:
default - Return:
DataComponentMap
คืออะไร
ดำเนินการ filter ตาม implementation ของ DataComponentMap
ทำงานยังไง
เรียกต่อ: get(), test(), keySet(). สร้างออบเจ็กต์: DataComponentMap. มีจุด return อย่างน้อย 2 จุด.
Parameters
Predicate<DataComponentType<?>> predicate
ตัวอย่างใช้งาน
DataComponentMap instance = ...;
Predicate<DataComponentType<?>> predicate = ...;
DataComponentMap result = instance.filter(predicate);
net.minecraft.core.component.DataComponentMap#get(DataComponentType<? extends T>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:86 - Modifiers: ``
- Return:
T
คืออะไร
อ่านค่า get
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
DataComponentType<? extends T> dataComponentType
ตัวอย่างใช้งาน
DataComponentMap instance = ...;
DataComponentType<? extends T> dataComponentType = ...;
T result = instance.get(dataComponentType);
net.minecraft.core.component.DataComponentMap#getOrDefault(DataComponentType<? extends T>,T)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:95 - Modifiers:
default - Return:
T
คืออะไร
อ่านค่า Or Default
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: object2 != null ? object2 : object.
Parameters
DataComponentType<? extends T> dataComponentTypeT object
ตัวอย่างใช้งาน
DataComponentMap instance = ...;
DataComponentType<? extends T> dataComponentType = ...;
T object = ...;
T result = instance.getOrDefault(dataComponentType, object);
net.minecraft.core.component.DataComponentMap#getTyped(DataComponentType<T>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:100 - Modifiers:
default - Return:
TypedDataComponent<T>
คืออะไร
อ่านค่า Typed
ทำงานยังไง
เรียกต่อ: get(). สร้างออบเจ็กต์: TypedDataComponent<>. คืนค่า: object != null ? new TypedDataComponent<>(dataComponentType, object) : null.
Parameters
DataComponentType<T> dataComponentType
ตัวอย่างใช้งาน
DataComponentMap instance = ...;
DataComponentType<T> dataComponentType = ...;
TypedDataComponent<T> result = instance.getTyped(dataComponentType);
net.minecraft.core.component.DataComponentMap#has(DataComponentType<?>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:91 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบว่ามี has
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.get(dataComponentType) != null.
Parameters
DataComponentType<?> dataComponentType
ตัวอย่างใช้งาน
DataComponentMap instance = ...;
DataComponentType<?> dataComponentType = ...;
boolean result = instance.has(dataComponentType);
net.minecraft.core.component.DataComponentMap#isEmpty()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:119 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Empty
ทำงานยังไง
เรียกต่อ: size(). คืนค่า: this.size() == 0.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentMap#iterator()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:106 - Modifiers:
default - Return:
Iterator<TypedDataComponent<?>>
คืออะไร
ดำเนินการ iterator ตาม implementation ของ DataComponentMap
ทำงานยังไง
เรียกต่อ: transform(), keySet(), requireNonNull(), getTyped(). คืนค่า: Iterators.transform(this.keySet().iterator(), dataComponentType -> Objects.requireNonNull(this.getTyped((DataComponentType<?>)dataComponentType))).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentMap#keySet()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:89 - Modifiers: ``
- Return:
Set<DataComponentType<?>>
คืออะไร
ดำเนินการ keySet ตาม implementation ของ DataComponentMap
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentMap#makeCodec(Codec<DataComponentType<?>>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:43 - Modifiers:
static - Return:
Codec<DataComponentMap>
คืออะไร
สร้าง Codec
ทำงานยังไง
เรียกต่อ: makeCodecFromMap(), dispatchedMap(). คืนค่า: makeCodecFromMap(Codec.dispatchedMap(codec, DataComponentType::codecOrThrow)).
Parameters
Codec<DataComponentType<?>> codec
ตัวอย่างใช้งาน
Codec<DataComponentType<?>> codec = ...;
Codec<DataComponentMap> result = DataComponentMap.makeCodec(codec);
net.minecraft.core.component.DataComponentMap#makeCodecFromMap(Codec<Map<DataComponentType<?>, Object>>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:47 - Modifiers:
static - Return:
Codec<DataComponentMap>
คืออะไร
สร้าง Codec From Map
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: flatComapMap(), size(), success(), emptyMap(), type(), isTransient(), put(), value(). สร้างออบเจ็กต์: Reference2ObjectArrayMap<>. มีจุด return อย่างน้อย 3 จุด.
Parameters
Codec<Map<DataComponentType<?>, Object>> codec
ตัวอย่างใช้งาน
Codec<Map<DataComponentType<?>, Object>> codec = ...;
Codec<DataComponentMap> result = DataComponentMap.makeCodecFromMap(codec);
net.minecraft.core.component.DataComponentMap#size()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:115 - Modifiers:
default - Return:
int
คืออะไร
ดำเนินการ size ตาม implementation ของ DataComponentMap
ทำงานยังไง
เรียกต่อ: keySet(). คืนค่า: this.keySet().size().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentMap#stream()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentMap.java:111 - Modifiers:
default - Return:
Stream<TypedDataComponent<?>>
คืออะไร
ดำเนินการ stream ตาม implementation ของ DataComponentMap
ทำงานยังไง
เรียกต่อ: spliterator(), iterator(), size(). คืนค่า: StreamSupport.stream(Spliterators.spliterator(this.iterator(), this.size(), 1345), false).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
DataComponentPatch
- Full name:
net.minecraft.core.component.DataComponentPatch - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/DataComponentPatch.java - Type:
class - Modifiers:
public final
net.minecraft.core.component.DataComponentPatch#builder()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:136 - Modifiers:
public static - Return:
DataComponentPatch.Builder
คืออะไร
ดำเนินการ builder ตาม implementation ของ DataComponentPatch
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: DataComponentPatch.Builder. คืนค่า: new DataComponentPatch.Builder().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPatch#entrySet()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:145 - Modifiers:
public - Return:
Set<Entry<DataComponentType<?>, Optional<?>>>
คืออะไร
ดำเนินการ entrySet ตาม implementation ของ DataComponentPatch
ทำงานยังไง
คืนค่า: this.map.entrySet().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
DataComponentPatch instance = ...;
Set<Entry<DataComponentType<?>, Optional<?>>> result = instance.entrySet();
net.minecraft.core.component.DataComponentPatch#equals(Object)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:184 - Modifiers:
public - Return:
boolean
คืออะไร
เปรียบเทียบความเท่ากัน equals
ทำงานยังไง
คืนค่า: this == object ? true : object instanceof DataComponentPatch dataComponentPatch && this.map.equals(dataComponentPatch.map).
Parameters
Object object
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPatch#forget(Predicate<DataComponentType<?>>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:153 - Modifiers:
public - Return:
DataComponentPatch
คืออะไร
ดำเนินการ forget ตาม implementation ของ DataComponentPatch
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), keySet(), removeIf(). สร้างออบเจ็กต์: Reference2ObjectArrayMap<>, DataComponentPatch. มีจุด return อย่างน้อย 2 จุด.
Parameters
Predicate<DataComponentType<?>> predicate
ตัวอย่างใช้งาน
DataComponentPatch instance = ...;
Predicate<DataComponentType<?>> predicate = ...;
DataComponentPatch result = instance.forget(predicate);
net.minecraft.core.component.DataComponentPatch#get(DataComponentType<? extends T>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:140 - Modifiers:
public - Return:
Optional<? extends T>
คืออะไร
อ่านค่า get
ทำงานยังไง
คืนค่า: (Optional<? extends T>)this.map.get(dataComponentType).
Parameters
DataComponentType<? extends T> dataComponentType
ตัวอย่างใช้งาน
DataComponentPatch instance = ...;
DataComponentType<? extends T> dataComponentType = ...;
Optional<? extends T> result = instance.get(dataComponentType);
net.minecraft.core.component.DataComponentPatch#hashCode()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:189 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ hashCode ตาม implementation ของ DataComponentPatch
ทำงานยังไง
คืนค่า: this.map.hashCode().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPatch#isEmpty()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:163 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Empty
ทำงานยังไง
คืนค่า: this.map.isEmpty().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPatch#size()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:149 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ size ตาม implementation ของ DataComponentPatch
ทำงานยังไง
คืนค่า: this.map.size().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPatch#split()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:167 - Modifiers:
public - Return:
DataComponentPatch.SplitResult
คืออะไร
แยก split
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), builder(), newIdentityHashSet(), forEach(), isPresent(), setUnchecked(), get(), add(). สร้างออบเจ็กต์: DataComponentPatch.SplitResult. มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPatch#toString()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:194 - Modifiers:
public - Return:
String
คืออะไร
ดำเนินการ toString ตาม implementation ของ DataComponentPatch
ทำงานยังไง
คืนค่า: toString(this.map).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
DataComponentPatch$Builder
- Full name:
net.minecraft.core.component.DataComponentPatch$Builder - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/DataComponentPatch.java - Type:
class - Modifiers:
public static
net.minecraft.core.component.DataComponentPatch$Builder#build()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:246 - Modifiers:
public - Return:
DataComponentPatch
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: isEmpty(). สร้างออบเจ็กต์: DataComponentPatch. คืนค่า: this.map.isEmpty() ? DataComponentPatch.EMPTY : new DataComponentPatch(this.map).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPatch$Builder#remove(DataComponentType<T>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:237 - Modifiers:
public - Return:
DataComponentPatch.Builder
คืออะไร
ลบ remove
ทำงานยังไง
เรียกต่อ: put(), empty(). คืนค่า: this.
Parameters
DataComponentType<T> dataComponentType
ตัวอย่างใช้งาน
DataComponentPatch.Builder instance = ...;
DataComponentType<T> dataComponentType = ...;
DataComponentPatch.Builder result = instance.remove(dataComponentType);
net.minecraft.core.component.DataComponentPatch$Builder#set(DataComponentType<T>,T)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:232 - Modifiers:
public - Return:
DataComponentPatch.Builder
คืออะไร
กำหนดค่า set
ทำงานยังไง
เรียกต่อ: put(), of(). คืนค่า: this.
Parameters
DataComponentType<T> dataComponentTypeT object
ตัวอย่างใช้งาน
DataComponentPatch.Builder instance = ...;
DataComponentType<T> dataComponentType = ...;
T object = ...;
DataComponentPatch.Builder result = instance.set(dataComponentType, object);
net.minecraft.core.component.DataComponentPatch$Builder#set(TypedDataComponent<T>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPatch.java:242 - Modifiers:
public - Return:
DataComponentPatch.Builder
คืออะไร
กำหนดค่า set
ทำงานยังไง
เรียกต่อ: type(), value(). คืนค่า: this.set(typedDataComponent.type(), typedDataComponent.value()).
Parameters
TypedDataComponent<T> typedDataComponent
ตัวอย่างใช้งาน
DataComponentPatch.Builder instance = ...;
TypedDataComponent<T> typedDataComponent = ...;
DataComponentPatch.Builder result = instance.set(typedDataComponent);
DataComponentPredicate
- Full name:
net.minecraft.core.component.DataComponentPredicate - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/DataComponentPredicate.java - Type:
class - Modifiers:
public final - Implements:
Predicate<DataComponentMap>
net.minecraft.core.component.DataComponentPredicate#allOf(DataComponentMap)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:37 - Modifiers:
public static - Return:
DataComponentPredicate
คืออะไร
ดำเนินการ allOf ตาม implementation ของ DataComponentPredicate
ทำงานยังไง
เรียกต่อ: copyOf(). สร้างออบเจ็กต์: DataComponentPredicate. คืนค่า: new DataComponentPredicate(ImmutableList.copyOf(dataComponentMap)).
Parameters
DataComponentMap dataComponentMap
ตัวอย่างใช้งาน
DataComponentMap dataComponentMap = ...;
DataComponentPredicate result = DataComponentPredicate.allOf(dataComponentMap);
net.minecraft.core.component.DataComponentPredicate#alwaysMatches()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:84 - Modifiers:
public - Return:
boolean
คืออะไร
ดำเนินการ alwaysMatches ตาม implementation ของ DataComponentPredicate
ทำงานยังไง
เรียกต่อ: isEmpty(). คืนค่า: this.expectedComponents.isEmpty().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPredicate#asPatch()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:88 - Modifiers:
public - Return:
DataComponentPatch
คืออะไร
ดำเนินการ asPatch ตาม implementation ของ DataComponentPredicate
ทำงานยังไง
มีการวนลูป. เรียกต่อ: builder(), set(), build(). คืนค่า: builder.build().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPredicate#builder()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:33 - Modifiers:
public static - Return:
DataComponentPredicate.Builder
คืออะไร
ดำเนินการ builder ตาม implementation ของ DataComponentPredicate
ทำงานยังไง
เรียกต่อ: Builder(). สร้างออบเจ็กต์: DataComponentPredicate.Builder. คืนค่า: new DataComponentPredicate.Builder().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPredicate#equals(Object)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:54 - Modifiers:
public - Return:
boolean
คืออะไร
เปรียบเทียบความเท่ากัน equals
ทำงานยังไง
คืนค่า: object instanceof DataComponentPredicate dataComponentPredicate && this.expectedComponents.equals(dataComponentPredicate.expectedComponents).
Parameters
Object object
ตัวอย่างใช้งาน
DataComponentPredicate instance = ...;
Object object = ...;
boolean result = instance.equals(object);
net.minecraft.core.component.DataComponentPredicate#hashCode()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:59 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ hashCode ตาม implementation ของ DataComponentPredicate
ทำงานยังไง
คืนค่า: this.expectedComponents.hashCode().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPredicate#someOf(DataComponentMap,DataComponentType<?>[])
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:41 - Modifiers:
public static - Return:
DataComponentPredicate
คืออะไร
ดำเนินการ someOf ตาม implementation ของ DataComponentPredicate
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: Builder(), getTyped(), expect(), build(). สร้างออบเจ็กต์: DataComponentPredicate.Builder. คืนค่า: builder.build().
Parameters
DataComponentMap dataComponentMapDataComponentType<?>[] dataComponentTypes
ตัวอย่างใช้งาน
DataComponentMap dataComponentMap = ...;
DataComponentType<?>[] dataComponentTypes = ...;
DataComponentPredicate result = DataComponentPredicate.someOf(dataComponentMap, dataComponentTypes);
net.minecraft.core.component.DataComponentPredicate#test(DataComponentHolder)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:80 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
เรียกต่อ: getComponents(). คืนค่า: this.test(dataComponentHolder.getComponents()).
Parameters
DataComponentHolder dataComponentHolder
ตัวอย่างใช้งาน
DataComponentPredicate instance = ...;
DataComponentHolder dataComponentHolder = ...;
boolean result = instance.test(dataComponentHolder);
net.minecraft.core.component.DataComponentPredicate#test(DataComponentMap)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:69 - Modifiers:
public - Return:
boolean
คืออะไร
ทดสอบเงื่อนไข test
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: get(), type(), equals(), value(). มีจุด return อย่างน้อย 2 จุด.
Parameters
DataComponentMap dataComponentMap
ตัวอย่างใช้งาน
DataComponentPredicate instance = ...;
DataComponentMap dataComponentMap = ...;
boolean result = instance.test(dataComponentMap);
net.minecraft.core.component.DataComponentPredicate#toString()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:64 - Modifiers:
public - Return:
String
คืออะไร
ดำเนินการ toString ตาม implementation ของ DataComponentPredicate
ทำงานยังไง
คืนค่า: this.expectedComponents.toString().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
DataComponentPredicate$Builder
- Full name:
net.minecraft.core.component.DataComponentPredicate$Builder - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/DataComponentPredicate.java - Type:
class - Modifiers:
public static
net.minecraft.core.component.DataComponentPredicate$Builder#build()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:119 - Modifiers:
public - Return:
DataComponentPredicate
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: copyOf(). สร้างออบเจ็กต์: DataComponentPredicate. คืนค่า: new DataComponentPredicate(List.copyOf(this.expectedComponents)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentPredicate$Builder#expect(DataComponentType<? super T>,T)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:108 - Modifiers:
public - Return:
DataComponentPredicate.Builder
คืออะไร
ดำเนินการ expect ตาม implementation ของ DataComponentPredicate$Builder
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: type(), add(). สร้างออบเจ็กต์: IllegalArgumentException, TypedDataComponent<>. คืนค่า: this.
Parameters
DataComponentType<? super T> dataComponentTypeT object
ตัวอย่างใช้งาน
DataComponentPredicate.Builder instance = ...;
DataComponentType<? super T> dataComponentType = ...;
T object = ...;
DataComponentPredicate.Builder result = instance.expect(dataComponentType, object);
net.minecraft.core.component.DataComponentPredicate$Builder#expect(TypedDataComponent<T>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponentPredicate.java:104 - Modifiers:
public - Return:
DataComponentPredicate.Builder
คืออะไร
ดำเนินการ expect ตาม implementation ของ DataComponentPredicate$Builder
ทำงานยังไง
เรียกต่อ: type(), value(). คืนค่า: this.expect(typedDataComponent.type(), typedDataComponent.value()).
Parameters
TypedDataComponent<T> typedDataComponent
ตัวอย่างใช้งาน
DataComponentPredicate.Builder instance = ...;
TypedDataComponent<T> typedDataComponent = ...;
DataComponentPredicate.Builder result = instance.expect(typedDataComponent);
DataComponents
- Full name:
net.minecraft.core.component.DataComponents - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/DataComponents.java - Type:
class - Modifiers:
public
net.minecraft.core.component.DataComponents#bootstrap(Registry<DataComponentType<?>>)
- Origin:
common - Source:
net/minecraft/core/component/DataComponents.java:272 - Modifiers:
public static - Return:
DataComponentType<?>
คืออะไร
ดำเนินการ bootstrap ตาม implementation ของ DataComponents
ทำงานยังไง
คืนค่า: CUSTOM_DATA.
Parameters
Registry<DataComponentType<?>> registry
ตัวอย่างใช้งาน
Registry<DataComponentType<?>> registry = ...;
DataComponentType<?> result = DataComponents.bootstrap(registry);
DataComponentType
- Full name:
net.minecraft.core.component.DataComponentType - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/DataComponentType.java - Type:
interface - Modifiers:
public
net.minecraft.core.component.DataComponentType#builder()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentType.java:28 - Modifiers:
static - Return:
DataComponentType.Builder<T>
คืออะไร
ดำเนินการ builder ตาม implementation ของ DataComponentType
ทำงานยังไง
สร้างออบเจ็กต์: DataComponentType.Builder<>. คืนค่า: new DataComponentType.Builder<>().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentType#codec()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentType.java:32 - Modifiers: ``
- Return:
Codec<T>
คืออะไร
ดำเนินการ codec ตาม implementation ของ DataComponentType
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentType#codecOrThrow()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentType.java:35 - Modifiers:
default - Return:
Codec<T>
คืออะไร
ดำเนินการ codecOrThrow ตาม implementation ของ DataComponentType
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: codec(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: codec.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentType#isTransient()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentType.java:44 - Modifiers:
default - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Transient
ทำงานยังไง
เรียกต่อ: codec(). คืนค่า: this.codec() == null.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.DataComponentType#streamCodec()
- Origin:
common - Source:
net/minecraft/core/component/DataComponentType.java:48 - Modifiers: ``
- Return:
StreamCodec<? super RegistryFriendlyByteBuf, T>
คืออะไร
ดำเนินการ streamCodec ตาม implementation ของ DataComponentType
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
DataComponentType instance = ...;
StreamCodec<? super RegistryFriendlyByteBuf, T> result = instance.streamCodec();
PatchedDataComponentMap
- Full name:
net.minecraft.core.component.PatchedDataComponentMap - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/PatchedDataComponentMap.java - Type:
class - Modifiers:
public final - Implements:
DataComponentMap
net.minecraft.core.component.PatchedDataComponentMap#applyPatch(DataComponentPatch)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:97 - Modifiers:
public - Return:
void
คืออะไร
นำไปใช้ Patch
ทำงานยังไง
มีการวนลูป. เรียกต่อ: ensureMapOwnership(), fastIterable(), getKey(), getValue().
Parameters
DataComponentPatch dataComponentPatch
ตัวอย่างใช้งาน
PatchedDataComponentMap instance = ...;
DataComponentPatch dataComponentPatch = ...;
instance.applyPatch(dataComponentPatch);
net.minecraft.core.component.PatchedDataComponentMap#asPatch()
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:202 - Modifiers:
public - Return:
DataComponentPatch
คืออะไร
ดำเนินการ asPatch ตาม implementation ของ PatchedDataComponentMap
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. แก้ state: copyOnWrite. เรียกต่อ: isEmpty(). สร้างออบเจ็กต์: DataComponentPatch. มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.PatchedDataComponentMap#clearPatch()
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:126 - Modifiers:
public - Return:
void
คืออะไร
ล้าง Patch
ทำงานยังไง
เรียกต่อ: ensureMapOwnership(), clear().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.PatchedDataComponentMap#copy()
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:211 - Modifiers:
public - Return:
PatchedDataComponentMap
คืออะไร
คัดลอก copy
ทำงานยังไง
แก้ state: copyOnWrite. สร้างออบเจ็กต์: PatchedDataComponentMap. คืนค่า: new PatchedDataComponentMap(this.prototype, this.patch, true).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.PatchedDataComponentMap#equals(Object)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:220 - Modifiers:
public - Return:
boolean
คืออะไร
เปรียบเทียบความเท่ากัน equals
ทำงานยังไง
ทำงานตาม body โดยตรง (ประมาณ 1 statement).
Parameters
Object object
ตัวอย่างใช้งาน
PatchedDataComponentMap instance = ...;
Object object = ...;
boolean result = instance.equals(object);
net.minecraft.core.component.PatchedDataComponentMap#fromPatch(DataComponentMap,DataComponentPatch)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:32 - Modifiers:
public static - Return:
PatchedDataComponentMap
คืออะไร
ดำเนินการ fromPatch ตาม implementation ของ PatchedDataComponentMap
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isPatchSanitized(), applyPatch(). สร้างออบเจ็กต์: PatchedDataComponentMap. มีจุด return อย่างน้อย 2 จุด.
Parameters
DataComponentMap dataComponentMapDataComponentPatch dataComponentPatch
ตัวอย่างใช้งาน
DataComponentMap dataComponentMap = ...;
DataComponentPatch dataComponentPatch = ...;
PatchedDataComponentMap result = PatchedDataComponentMap.fromPatch(dataComponentMap, dataComponentPatch);
net.minecraft.core.component.PatchedDataComponentMap#get(DataComponentType<? extends T>)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:58 - Modifiers:
public - Return:
T
คืออะไร
อ่านค่า get
ทำงานยังไง
เรียกต่อ: orElse(). คืนค่า: (T)(optional != null ? optional.orElse(null) : this.prototype.get(dataComponentType)).
Parameters
DataComponentType<? extends T> dataComponentType
ตัวอย่างใช้งาน
PatchedDataComponentMap instance = ...;
DataComponentType<? extends T> dataComponentType = ...;
T result = instance.get(dataComponentType);
net.minecraft.core.component.PatchedDataComponentMap#hashCode()
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:229 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ hashCode ตาม implementation ของ PatchedDataComponentMap
ทำงานยังไง
คืนค่า: this.prototype.hashCode() + this.patch.hashCode() * 31.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.PatchedDataComponentMap#hasNonDefault(DataComponentType<?>)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:65 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Non Default
ทำงานยังไง
เรียกต่อ: containsKey(). คืนค่า: this.patch.containsKey(dataComponentType).
Parameters
DataComponentType<?> dataComponentType
ตัวอย่างใช้งาน
PatchedDataComponentMap instance = ...;
DataComponentType<?> dataComponentType = ...;
boolean result = instance.hasNonDefault(dataComponentType);
net.minecraft.core.component.PatchedDataComponentMap#iterator()
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:164 - Modifiers:
public - Return:
Iterator<TypedDataComponent<?>>
คืออะไร
ดำเนินการ iterator ตาม implementation ของ PatchedDataComponentMap
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isEmpty(), size(), fastIterable(), getValue(), isPresent(), add(), createUnchecked(), getKey(). สร้างออบเจ็กต์: ArrayList<>. มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
PatchedDataComponentMap instance = ...;
Iterator<TypedDataComponent<?>> result = instance.iterator();
net.minecraft.core.component.PatchedDataComponentMap#keySet()
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:144 - Modifiers:
public - Return:
Set<DataComponentType<?>>
คืออะไร
ดำเนินการ keySet ตาม implementation ของ PatchedDataComponentMap
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isEmpty(), fastIterable(), getValue(), isPresent(), add(), getKey(), remove(). สร้างออบเจ็กต์: ReferenceArraySet<>. มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.PatchedDataComponentMap#PatchedDataComponentMap(DataComponentMap)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:22 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ PatchedDataComponentMap ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: emptyMap().
Parameters
DataComponentMap dataComponentMap
ตัวอย่างใช้งาน
DataComponentMap dataComponentMap = ...;
PatchedDataComponentMap instance = new PatchedDataComponentMap(dataComponentMap);
net.minecraft.core.component.PatchedDataComponentMap#remove(DataComponentType<? extends T>)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:83 - Modifiers:
public - Return:
T
คืออะไร
ลบ remove
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: ensureMapOwnership(), get(), put(), empty(), orElse(). คืนค่า: (T)(optional != null ? optional.orElse(null) : object).
Parameters
DataComponentType<? extends T> dataComponentType
ตัวอย่างใช้งาน
PatchedDataComponentMap instance = ...;
DataComponentType<? extends T> dataComponentType = ...;
T result = instance.remove(dataComponentType);
net.minecraft.core.component.PatchedDataComponentMap#restorePatch(DataComponentPatch)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:120 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ restorePatch ตาม implementation ของ PatchedDataComponentMap
ทำงานยังไง
เรียกต่อ: ensureMapOwnership(), clear(), putAll().
Parameters
DataComponentPatch dataComponentPatch
ตัวอย่างใช้งาน
PatchedDataComponentMap instance = ...;
DataComponentPatch dataComponentPatch = ...;
instance.restorePatch(dataComponentPatch);
net.minecraft.core.component.PatchedDataComponentMap#set(DataComponentType<? super T>,T)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:69 - Modifiers:
public - Return:
T
คืออะไร
กำหนดค่า set
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: ensureMapOwnership(), get(), equals(), remove(), put(), ofNullable(), orElse(). คืนค่า: optional != null ? optional.orElse(object2) : object2.
Parameters
DataComponentType<? super T> dataComponentTypeT object
ตัวอย่างใช้งาน
PatchedDataComponentMap instance = ...;
DataComponentType<? super T> dataComponentType = ...;
T object = ...;
T result = instance.set(dataComponentType, object);
net.minecraft.core.component.PatchedDataComponentMap#setAll(DataComponentMap)
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:131 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า All
ทำงานยังไง
มีการวนลูป. เรียกต่อ: applyTo().
Parameters
DataComponentMap dataComponentMap
ตัวอย่างใช้งาน
PatchedDataComponentMap instance = ...;
DataComponentMap dataComponentMap = ...;
instance.setAll(dataComponentMap);
net.minecraft.core.component.PatchedDataComponentMap#size()
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:187 - Modifiers:
public - Return:
int
คืออะไร
ดำเนินการ size ตาม implementation ของ PatchedDataComponentMap
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: fastIterable(), getValue(), isPresent(), has(), getKey(). คืนค่า: i.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.PatchedDataComponentMap#toImmutableMap()
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:216 - Modifiers:
public - Return:
DataComponentMap
คืออะไร
ดำเนินการ toImmutableMap ตาม implementation ของ PatchedDataComponentMap
ทำงานยังไง
เรียกต่อ: isEmpty(), copy(). คืนค่า: this.patch.isEmpty() ? this.prototype : this.copy().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.core.component.PatchedDataComponentMap#toString()
- Origin:
common - Source:
net/minecraft/core/component/PatchedDataComponentMap.java:234 - Modifiers:
public - Return:
String
คืออะไร
ดำเนินการ toString ตาม implementation ของ PatchedDataComponentMap
ทำงานยังไง
เรียกต่อ: stream(), map(), collect(), joining(). คืนค่า: "{" + this.stream().map(TypedDataComponent::toString).collect(Collectors.joining(", ")) + "}".
Parameters
- ไม่มี
ตัวอย่างใช้งาน
TypedDataComponent
- Full name:
net.minecraft.core.component.TypedDataComponent - Package:
net.minecraft.core.component - Source:
common—net/minecraft/core/component/TypedDataComponent.java - Type:
record - Modifiers:
public
net.minecraft.core.component.TypedDataComponent#applyTo(PatchedDataComponentMap)
- Origin:
common - Source:
net/minecraft/core/component/TypedDataComponent.java:39 - Modifiers:
public - Return:
void
คืออะไร
นำไปใช้ To
ทำงานยังไง
เรียกต่อ: set().
Parameters
PatchedDataComponentMap patchedDataComponentMap
ตัวอย่างใช้งาน
TypedDataComponent instance = ...;
PatchedDataComponentMap patchedDataComponentMap = ...;
instance.applyTo(patchedDataComponentMap);
net.minecraft.core.component.TypedDataComponent#createUnchecked(DataComponentType<T>,Object)
- Origin:
common - Source:
net/minecraft/core/component/TypedDataComponent.java:35 - Modifiers:
public static - Return:
TypedDataComponent<T>
คืออะไร
สร้าง Unchecked
ทำงานยังไง
สร้างออบเจ็กต์: TypedDataComponent<>. คืนค่า: new TypedDataComponent<>(dataComponentType, (T)object).
Parameters
DataComponentType<T> dataComponentTypeObject object
ตัวอย่างใช้งาน
DataComponentType<T> dataComponentType = ...;
Object object = ...;
TypedDataComponent<T> result = TypedDataComponent.createUnchecked(dataComponentType, object);
net.minecraft.core.component.TypedDataComponent#encodeValue(DynamicOps<D>)
- Origin:
common - Source:
net/minecraft/core/component/TypedDataComponent.java:43 - Modifiers:
public - Return:
DataResult<D>
คืออะไร
เข้ารหัสข้อมูล Value
ทำงานยังไง
เรียกต่อ: codec(), error(), encodeStart(). คืนค่า: codec == null ? DataResult.error(() -> "Component of type " + this.type + " is not encodable") : codec.encodeStart(dynamicOps, this.value).
Parameters
DynamicOps<D> dynamicOps
ตัวอย่างใช้งาน
TypedDataComponent instance = ...;
DynamicOps<D> dynamicOps = ...;
DataResult<D> result = instance.encodeValue(dynamicOps);
net.minecraft.core.component.TypedDataComponent#toString()
- Origin:
common - Source:
net/minecraft/core/component/TypedDataComponent.java:48 - Modifiers:
public - Return:
String
คืออะไร
ดำเนินการ toString ตาม implementation ของ TypedDataComponent
ทำงานยังไง
คืนค่า: this.type + "=>" + this.value.
Parameters
- ไม่มี