BastionBridgePools.java

net.minecraft.data.worldgen.BastionBridgePools

信息

  • 全限定名:net.minecraft.data.worldgen.BastionBridgePools
  • 类型:public class
  • 包:net.minecraft.data.worldgen
  • 源码路径:src/main/java/net/minecraft/data/worldgen/BastionBridgePools.java
  • 起始行号:L12
  • 职责:

    TODO

字段/常量

内部类/嵌套类型

构造器

方法

下面的方法块按源码顺序生成。

public static void bootstrap(BootstrapContext<StructureTemplatePool> context) @ L13

  • 方法名:bootstrap
  • 源码定位:L13
  • 返回类型:void
  • 修饰符:public static

参数:

  • context: BootstrapContext

说明:

TODO

代码

public class BastionBridgePools {
    public static void bootstrap(BootstrapContext<StructureTemplatePool> context) {
        HolderGetter<StructureProcessorList> processorLists = context.lookup(Registries.PROCESSOR_LIST);
        Holder<StructureProcessorList> entranceReplacement = processorLists.getOrThrow(ProcessorLists.ENTRANCE_REPLACEMENT);
        Holder<StructureProcessorList> bastionGenericDegradation = processorLists.getOrThrow(ProcessorLists.BASTION_GENERIC_DEGRADATION);
        Holder<StructureProcessorList> bridge = processorLists.getOrThrow(ProcessorLists.BRIDGE);
        Holder<StructureProcessorList> rampartDegradation = processorLists.getOrThrow(ProcessorLists.RAMPART_DEGRADATION);
        HolderGetter<StructureTemplatePool> pools = context.lookup(Registries.TEMPLATE_POOL);
        Holder<StructureTemplatePool> empty = pools.getOrThrow(Pools.EMPTY);
        Pools.register(
            context,
            "bastion/bridge/starting_pieces",
            new StructureTemplatePool(
                empty,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/bridge/starting_pieces/entrance", entranceReplacement), 1),
                    Pair.of(StructurePoolElement.single("bastion/bridge/starting_pieces/entrance_face", bastionGenericDegradation), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            context,
            "bastion/bridge/bridge_pieces",
            new StructureTemplatePool(
                empty,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/bridge/bridge_pieces/bridge", bridge), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            context,
            "bastion/bridge/legs",
            new StructureTemplatePool(
                empty,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/bridge/legs/leg_0", bastionGenericDegradation), 1),
                    Pair.of(StructurePoolElement.single("bastion/bridge/legs/leg_1", bastionGenericDegradation), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            context,
            "bastion/bridge/walls",
            new StructureTemplatePool(
                empty,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/bridge/walls/wall_base_0", rampartDegradation), 1),
                    Pair.of(StructurePoolElement.single("bastion/bridge/walls/wall_base_1", rampartDegradation), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            context,
            "bastion/bridge/ramparts",
            new StructureTemplatePool(
                empty,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/bridge/ramparts/rampart_0", rampartDegradation), 1),
                    Pair.of(StructurePoolElement.single("bastion/bridge/ramparts/rampart_1", rampartDegradation), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            context,
            "bastion/bridge/rampart_plates",
            new StructureTemplatePool(
                empty,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/bridge/rampart_plates/plate_0", rampartDegradation), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            context,
            "bastion/bridge/connectors",
            new StructureTemplatePool(
                empty,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/bridge/connectors/back_bridge_top", bastionGenericDegradation), 1),
                    Pair.of(StructurePoolElement.single("bastion/bridge/connectors/back_bridge_bottom", bastionGenericDegradation), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
    }
}

引用的其他类