| 1 | package net.minecraft.data.worldgen;
|
| 2 |
|
| 3 | import com.google.common.collect.ImmutableList;
|
| 4 | import com.mojang.datafixers.util.Pair;
|
| 5 | import net.minecraft.core.Holder;
|
| 6 | import net.minecraft.core.HolderGetter;
|
| 7 | import net.minecraft.core.registries.Registries;
|
| 8 | import net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement;
|
| 9 | import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
|
| 10 |
|
| 11 | public class BastionSharedPools {
|
| 12 | public static void bootstrap(final BootstrapContext<StructureTemplatePool> context) {
|
| 13 | HolderGetter<StructureTemplatePool> pools = context.lookup(Registries.TEMPLATE_POOL);
|
| 14 | Holder<StructureTemplatePool> empty = pools.getOrThrow(Pools.EMPTY);
|
| 15 | Pools.register(
|
| 16 | context,
|
| 17 | "bastion/mobs/piglin",
|
| 18 | new StructureTemplatePool(
|
| 19 | empty,
|
| 20 | ImmutableList.of(
|
| 21 | Pair.of(StructurePoolElement.single("bastion/mobs/melee_piglin"), 1),
|
| 22 | Pair.of(StructurePoolElement.single("bastion/mobs/sword_piglin"), 4),
|
| 23 | Pair.of(StructurePoolElement.single("bastion/mobs/crossbow_piglin"), 4),
|
| 24 | Pair.of(StructurePoolElement.single("bastion/mobs/empty"), 1)
|
| 25 | ),
|
| 26 | StructureTemplatePool.Projection.RIGID
|
| 27 | )
|
| 28 | );
|
| 29 | Pools.register(
|
| 30 | context,
|
| 31 | "bastion/mobs/hoglin",
|
| 32 | new StructureTemplatePool(
|
| 33 | empty,
|
| 34 | ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/mobs/hoglin"), 2), Pair.of(StructurePoolElement.single("bastion/mobs/empty"), 1)),
|
| 35 | StructureTemplatePool.Projection.RIGID
|
| 36 | )
|
| 37 | );
|
| 38 | Pools.register(
|
| 39 | context,
|
| 40 | "bastion/blocks/gold",
|
| 41 | new StructureTemplatePool(
|
| 42 | empty,
|
| 43 | ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/blocks/air"), 3), Pair.of(StructurePoolElement.single("bastion/blocks/gold"), 1)),
|
| 44 | StructureTemplatePool.Projection.RIGID
|
| 45 | )
|
| 46 | );
|
| 47 | Pools.register(
|
| 48 | context,
|
| 49 | "bastion/mobs/piglin_melee",
|
| 50 | new StructureTemplatePool(
|
| 51 | empty,
|
| 52 | ImmutableList.of(
|
| 53 | Pair.of(StructurePoolElement.single("bastion/mobs/melee_piglin_always"), 1),
|
| 54 | Pair.of(StructurePoolElement.single("bastion/mobs/melee_piglin"), 5),
|
| 55 | Pair.of(StructurePoolElement.single("bastion/mobs/sword_piglin"), 1)
|
| 56 | ),
|
| 57 | StructureTemplatePool.Projection.RIGID
|
| 58 | )
|
| 59 | );
|
| 60 | }
|
| 61 | }
|
| 62 |
|