CustomDataPredicate.java
net.minecraft.core.component.predicates.CustomDataPredicate
信息
- 全限定名:net.minecraft.core.component.predicates.CustomDataPredicate
- 类型:public record
- 包:net.minecraft.core.component.predicates
- 源码路径:src/main/java/net/minecraft/core/component/predicates/CustomDataPredicate.java
- 起始行号:L7
- 实现:DataComponentPredicate
- 职责:
TODO
字段/常量
CODEC- 类型:
Codec<CustomDataPredicate> - 修饰符:
public static final - 源码定位:
L8 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public boolean matches(DataComponentGetter components) @ L10
- 方法名:matches
- 源码定位:L10
- 返回类型:boolean
- 修饰符:public
参数:
- components: DataComponentGetter
说明:
TODO
public static CustomDataPredicate customData(NbtPredicate value) @ L15
- 方法名:customData
- 源码定位:L15
- 返回类型:CustomDataPredicate
- 修饰符:public static
参数:
- value: NbtPredicate
说明:
TODO
代码
public record CustomDataPredicate(NbtPredicate value) implements DataComponentPredicate {
public static final Codec<CustomDataPredicate> CODEC = NbtPredicate.CODEC.xmap(CustomDataPredicate::new, CustomDataPredicate::value);
@Override
public boolean matches(DataComponentGetter components) {
return this.value.matches(components);
}
public static CustomDataPredicate customData(NbtPredicate value) {
return new CustomDataPredicate(value);
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
实现
- 引用位置: