Pools.java
net.minecraft.data.worldgen.Pools
信息
- 全限定名:net.minecraft.data.worldgen.Pools
- 类型:public class
- 包:net.minecraft.data.worldgen
- 源码路径:src/main/java/net/minecraft/data/worldgen/Pools.java
- 起始行号:L11
- 职责:
TODO
字段/常量
EMPTY- 类型:
ResourceKey<StructureTemplatePool> - 修饰符:
public static final - 源码定位:
L12 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public static ResourceKey<StructureTemplatePool> createKey(Identifier location) @ L14
- 方法名:createKey
- 源码定位:L14
- 返回类型:ResourceKey
- 修饰符:public static
参数:
- location: Identifier
说明:
TODO
public static ResourceKey<StructureTemplatePool> createKey(String name) @ L18
- 方法名:createKey
- 源码定位:L18
- 返回类型:ResourceKey
- 修饰符:public static
参数:
- name: String
说明:
TODO
public static ResourceKey<StructureTemplatePool> parseKey(String name) @ L22
- 方法名:parseKey
- 源码定位:L22
- 返回类型:ResourceKey
- 修饰符:public static
参数:
- name: String
说明:
TODO
public static void register(BootstrapContext<StructureTemplatePool> context, String name, StructureTemplatePool pool) @ L26
- 方法名:register
- 源码定位:L26
- 返回类型:void
- 修饰符:public static
参数:
- context: BootstrapContext
- name: String
- pool: StructureTemplatePool
说明:
TODO
public static void bootstrap(BootstrapContext<StructureTemplatePool> context) @ L30
- 方法名:bootstrap
- 源码定位:L30
- 返回类型:void
- 修饰符:public static
参数:
- context: BootstrapContext
说明:
TODO
代码
public class Pools {
public static final ResourceKey<StructureTemplatePool> EMPTY = createKey("empty");
public static ResourceKey<StructureTemplatePool> createKey(Identifier location) {
return ResourceKey.create(Registries.TEMPLATE_POOL, location);
}
public static ResourceKey<StructureTemplatePool> createKey(String name) {
return createKey(Identifier.withDefaultNamespace(name));
}
public static ResourceKey<StructureTemplatePool> parseKey(String name) {
return createKey(Identifier.parse(name));
}
public static void register(BootstrapContext<StructureTemplatePool> context, String name, StructureTemplatePool pool) {
context.register(createKey(name), pool);
}
public static void bootstrap(BootstrapContext<StructureTemplatePool> context) {
HolderGetter<StructureTemplatePool> pools = context.lookup(Registries.TEMPLATE_POOL);
Holder<StructureTemplatePool> empty = pools.getOrThrow(EMPTY);
context.register(EMPTY, new StructureTemplatePool(empty, ImmutableList.of(), StructureTemplatePool.Projection.RIGID));
BastionPieces.bootstrap(context);
PillagerOutpostPools.bootstrap(context);
VillagePools.bootstrap(context);
AncientCityStructurePieces.bootstrap(context);
TrailRuinsStructurePools.bootstrap(context);
TrialChambersStructurePools.bootstrap(context);
}
}引用的其他类
-
- 引用位置:
方法调用 - 关联成员:
AncientCityStructurePieces.bootstrap()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
BastionPieces.bootstrap()
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
PillagerOutpostPools.bootstrap()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
TrailRuinsStructurePools.bootstrap()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
TrialChambersStructurePools.bootstrap()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
VillagePools.bootstrap()
- 引用位置:
-
- 引用位置:
参数/方法调用 - 关联成员:
Identifier.parse(), Identifier.withDefaultNamespace()
- 引用位置:
-
- 引用位置:
字段/方法调用/返回值 - 关联成员:
ResourceKey.create()
- 引用位置:
-
- 引用位置:
参数/字段/构造调用/返回值 - 关联成员:
StructureTemplatePool()
- 引用位置: