V1125.java
net.minecraft.util.datafix.schemas.V1125
信息
- 全限定名:net.minecraft.util.datafix.schemas.V1125
- 类型:public class
- 包:net.minecraft.util.datafix.schemas
- 源码路径:src/main/java/net/minecraft/util/datafix/schemas/V1125.java
- 起始行号:L10
- 继承:NamespacedSchema
- 职责:
TODO
字段/常量
- 无
内部类/嵌套类型
- 无
构造器
public V1125(int versionKey, Schema parent) @ L11
- 构造器名:V1125
- 源码定位:L11
- 修饰符:public
参数:
- versionKey: int
- parent: Schema
说明:
TODO
方法
下面的方法块按源码顺序生成。
public Map<String,Supplier<TypeTemplate>> registerBlockEntities(Schema schema) @ L15
- 方法名:registerBlockEntities
- 源码定位:L15
- 返回类型:Map<String,Supplier
> - 修饰符:public
参数:
- schema: Schema
说明:
TODO
public void registerTypes(Schema schema, Map<String,Supplier<TypeTemplate>> entityTypes, Map<String,Supplier<TypeTemplate>> blockEntityTypes) @ L22
- 方法名:registerTypes
- 源码定位:L22
- 返回类型:void
- 修饰符:public
参数:
- schema: Schema
- entityTypes: Map<String,Supplier
> - blockEntityTypes: Map<String,Supplier
>
说明:
TODO
代码
public class V1125 extends NamespacedSchema {
public V1125(int versionKey, Schema parent) {
super(versionKey, parent);
}
@Override
public Map<String, Supplier<TypeTemplate>> registerBlockEntities(Schema schema) {
Map<String, Supplier<TypeTemplate>> map = super.registerBlockEntities(schema);
schema.registerSimple(map, "minecraft:bed");
return map;
}
@Override
public void registerTypes(Schema schema, Map<String, Supplier<TypeTemplate>> entityTypes, Map<String, Supplier<TypeTemplate>> blockEntityTypes) {
super.registerTypes(schema, entityTypes, blockEntityTypes);
schema.registerType(
false,
References.ADVANCEMENTS,
() -> DSL.optionalFields(
"minecraft:adventure/adventuring_time",
DSL.optionalFields("criteria", DSL.compoundList(References.BIOME.in(schema), DSL.constType(DSL.string()))),
"minecraft:adventure/kill_a_mob",
DSL.optionalFields("criteria", DSL.compoundList(References.ENTITY_NAME.in(schema), DSL.constType(DSL.string()))),
"minecraft:adventure/kill_all_mobs",
DSL.optionalFields("criteria", DSL.compoundList(References.ENTITY_NAME.in(schema), DSL.constType(DSL.string()))),
"minecraft:husbandry/bred_all_animals",
DSL.optionalFields("criteria", DSL.compoundList(References.ENTITY_NAME.in(schema), DSL.constType(DSL.string())))
)
);
schema.registerType(false, References.BIOME, () -> DSL.constType(namespacedString()));
schema.registerType(false, References.ENTITY_NAME, () -> DSL.constType(namespacedString()));
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
继承
- 引用位置: