NetherPlacements.java
net.minecraft.data.worldgen.placement.NetherPlacements
信息
- 全限定名:net.minecraft.data.worldgen.placement.NetherPlacements
- 类型:public class
- 包:net.minecraft.data.worldgen.placement
- 源码路径:src/main/java/net/minecraft/data/worldgen/placement/NetherPlacements.java
- 起始行号:L26
- 职责:
TODO
字段/常量
-
DELTA- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L27 - 说明:
TODO
- 类型:
-
SMALL_BASALT_COLUMNS- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L28 - 说明:
TODO
- 类型:
-
LARGE_BASALT_COLUMNS- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L29 - 说明:
TODO
- 类型:
-
BASALT_BLOBS- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L30 - 说明:
TODO
- 类型:
-
BLACKSTONE_BLOBS- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L31 - 说明:
TODO
- 类型:
-
GLOWSTONE_EXTRA- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L32 - 说明:
TODO
- 类型:
-
GLOWSTONE- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L33 - 说明:
TODO
- 类型:
-
CRIMSON_FOREST_VEGETATION- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L34 - 说明:
TODO
- 类型:
-
WARPED_FOREST_VEGETATION- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L35 - 说明:
TODO
- 类型:
-
NETHER_SPROUTS- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L36 - 说明:
TODO
- 类型:
-
TWISTING_VINES- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L37 - 说明:
TODO
- 类型:
-
WEEPING_VINES- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L38 - 说明:
TODO
- 类型:
-
PATCH_CRIMSON_ROOTS- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L39 - 说明:
TODO
- 类型:
-
BASALT_PILLAR- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L40 - 说明:
TODO
- 类型:
-
SPRING_DELTA- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L41 - 说明:
TODO
- 类型:
-
SPRING_CLOSED- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L42 - 说明:
TODO
- 类型:
-
SPRING_CLOSED_DOUBLE- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L43 - 说明:
TODO
- 类型:
-
SPRING_OPEN- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L44 - 说明:
TODO
- 类型:
-
PATCH_SOUL_FIRE- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L45 - 说明:
TODO
- 类型:
-
PATCH_FIRE- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L46 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public static void bootstrap(BootstrapContext<PlacedFeature> context) @ L48
- 方法名:bootstrap
- 源码定位:L48
- 返回类型:void
- 修饰符:public static
参数:
- context: BootstrapContext
说明:
TODO
private static List<PlacementModifier> firePlacement(Block onlyOnBlock) @ L133
- 方法名:firePlacement
- 源码定位:L133
- 返回类型:List
- 修饰符:private static
参数:
- onlyOnBlock: Block
说明:
TODO
代码
public class NetherPlacements {
public static final ResourceKey<PlacedFeature> DELTA = PlacementUtils.createKey("delta");
public static final ResourceKey<PlacedFeature> SMALL_BASALT_COLUMNS = PlacementUtils.createKey("small_basalt_columns");
public static final ResourceKey<PlacedFeature> LARGE_BASALT_COLUMNS = PlacementUtils.createKey("large_basalt_columns");
public static final ResourceKey<PlacedFeature> BASALT_BLOBS = PlacementUtils.createKey("basalt_blobs");
public static final ResourceKey<PlacedFeature> BLACKSTONE_BLOBS = PlacementUtils.createKey("blackstone_blobs");
public static final ResourceKey<PlacedFeature> GLOWSTONE_EXTRA = PlacementUtils.createKey("glowstone_extra");
public static final ResourceKey<PlacedFeature> GLOWSTONE = PlacementUtils.createKey("glowstone");
public static final ResourceKey<PlacedFeature> CRIMSON_FOREST_VEGETATION = PlacementUtils.createKey("crimson_forest_vegetation");
public static final ResourceKey<PlacedFeature> WARPED_FOREST_VEGETATION = PlacementUtils.createKey("warped_forest_vegetation");
public static final ResourceKey<PlacedFeature> NETHER_SPROUTS = PlacementUtils.createKey("nether_sprouts");
public static final ResourceKey<PlacedFeature> TWISTING_VINES = PlacementUtils.createKey("twisting_vines");
public static final ResourceKey<PlacedFeature> WEEPING_VINES = PlacementUtils.createKey("weeping_vines");
public static final ResourceKey<PlacedFeature> PATCH_CRIMSON_ROOTS = PlacementUtils.createKey("patch_crimson_roots");
public static final ResourceKey<PlacedFeature> BASALT_PILLAR = PlacementUtils.createKey("basalt_pillar");
public static final ResourceKey<PlacedFeature> SPRING_DELTA = PlacementUtils.createKey("spring_delta");
public static final ResourceKey<PlacedFeature> SPRING_CLOSED = PlacementUtils.createKey("spring_closed");
public static final ResourceKey<PlacedFeature> SPRING_CLOSED_DOUBLE = PlacementUtils.createKey("spring_closed_double");
public static final ResourceKey<PlacedFeature> SPRING_OPEN = PlacementUtils.createKey("spring_open");
public static final ResourceKey<PlacedFeature> PATCH_SOUL_FIRE = PlacementUtils.createKey("patch_soul_fire");
public static final ResourceKey<PlacedFeature> PATCH_FIRE = PlacementUtils.createKey("patch_fire");
public static void bootstrap(BootstrapContext<PlacedFeature> context) {
HolderGetter<ConfiguredFeature<?, ?>> configuredFeatures = context.lookup(Registries.CONFIGURED_FEATURE);
Holder<ConfiguredFeature<?, ?>> delta = configuredFeatures.getOrThrow(NetherFeatures.DELTA);
Holder<ConfiguredFeature<?, ?>> smallBasaltColumns = configuredFeatures.getOrThrow(NetherFeatures.SMALL_BASALT_COLUMNS);
Holder<ConfiguredFeature<?, ?>> largeBasaltColumns = configuredFeatures.getOrThrow(NetherFeatures.LARGE_BASALT_COLUMNS);
Holder<ConfiguredFeature<?, ?>> basaltBlobs = configuredFeatures.getOrThrow(NetherFeatures.BASALT_BLOBS);
Holder<ConfiguredFeature<?, ?>> blackstoneBlobs = configuredFeatures.getOrThrow(NetherFeatures.BLACKSTONE_BLOBS);
Holder<ConfiguredFeature<?, ?>> glowstoneExtra = configuredFeatures.getOrThrow(NetherFeatures.GLOWSTONE_EXTRA);
Holder<ConfiguredFeature<?, ?>> crimsonForestVegetation = configuredFeatures.getOrThrow(NetherFeatures.CRIMSON_FOREST_VEGETATION);
Holder<ConfiguredFeature<?, ?>> warpedForestVegetion = configuredFeatures.getOrThrow(NetherFeatures.WARPED_FOREST_VEGETION);
Holder<ConfiguredFeature<?, ?>> netherSprouts = configuredFeatures.getOrThrow(NetherFeatures.NETHER_SPROUTS);
Holder<ConfiguredFeature<?, ?>> twistingVines = configuredFeatures.getOrThrow(NetherFeatures.TWISTING_VINES);
Holder<ConfiguredFeature<?, ?>> weepingVines = configuredFeatures.getOrThrow(NetherFeatures.WEEPING_VINES);
Holder<ConfiguredFeature<?, ?>> crimsonRoots = configuredFeatures.getOrThrow(NetherFeatures.CRIMSON_ROOTS);
Holder<ConfiguredFeature<?, ?>> basaltPillar = configuredFeatures.getOrThrow(NetherFeatures.BASALT_PILLAR);
Holder<ConfiguredFeature<?, ?>> springLavaNether = configuredFeatures.getOrThrow(NetherFeatures.SPRING_LAVA_NETHER);
Holder<ConfiguredFeature<?, ?>> springNetherClosed = configuredFeatures.getOrThrow(NetherFeatures.SPRING_NETHER_CLOSED);
Holder<ConfiguredFeature<?, ?>> springNetherOpen = configuredFeatures.getOrThrow(NetherFeatures.SPRING_NETHER_OPEN);
Holder<ConfiguredFeature<?, ?>> soulFire = configuredFeatures.getOrThrow(NetherFeatures.SOUL_FIRE);
Holder<ConfiguredFeature<?, ?>> fire = configuredFeatures.getOrThrow(NetherFeatures.FIRE);
PlacementUtils.register(context, DELTA, delta, CountOnEveryLayerPlacement.of(40), BiomeFilter.biome());
PlacementUtils.register(context, SMALL_BASALT_COLUMNS, smallBasaltColumns, CountOnEveryLayerPlacement.of(4), BiomeFilter.biome());
PlacementUtils.register(context, LARGE_BASALT_COLUMNS, largeBasaltColumns, CountOnEveryLayerPlacement.of(2), BiomeFilter.biome());
PlacementUtils.register(
context, BASALT_BLOBS, basaltBlobs, CountPlacement.of(75), InSquarePlacement.spread(), PlacementUtils.FULL_RANGE, BiomeFilter.biome()
);
PlacementUtils.register(
context, BLACKSTONE_BLOBS, blackstoneBlobs, CountPlacement.of(25), InSquarePlacement.spread(), PlacementUtils.FULL_RANGE, BiomeFilter.biome()
);
PlacementUtils.register(
context,
GLOWSTONE_EXTRA,
glowstoneExtra,
CountPlacement.of(BiasedToBottomInt.of(0, 9)),
InSquarePlacement.spread(),
PlacementUtils.RANGE_4_4,
BiomeFilter.biome()
);
PlacementUtils.register(
context, GLOWSTONE, glowstoneExtra, CountPlacement.of(10), InSquarePlacement.spread(), PlacementUtils.FULL_RANGE, BiomeFilter.biome()
);
PlacementUtils.register(context, CRIMSON_FOREST_VEGETATION, crimsonForestVegetation, CountOnEveryLayerPlacement.of(6), BiomeFilter.biome());
PlacementUtils.register(context, WARPED_FOREST_VEGETATION, warpedForestVegetion, CountOnEveryLayerPlacement.of(5), BiomeFilter.biome());
PlacementUtils.register(context, NETHER_SPROUTS, netherSprouts, CountOnEveryLayerPlacement.of(4), BiomeFilter.biome());
PlacementUtils.register(
context, TWISTING_VINES, twistingVines, CountPlacement.of(10), InSquarePlacement.spread(), PlacementUtils.FULL_RANGE, BiomeFilter.biome()
);
PlacementUtils.register(
context, WEEPING_VINES, weepingVines, CountPlacement.of(10), InSquarePlacement.spread(), PlacementUtils.FULL_RANGE, BiomeFilter.biome()
);
PlacementUtils.register(
context,
PATCH_CRIMSON_ROOTS,
crimsonRoots,
PlacementUtils.FULL_RANGE,
BiomeFilter.biome(),
CountPlacement.of(96),
RandomOffsetPlacement.ofTriangle(7, 3),
BlockPredicateFilter.forPredicate(BlockPredicate.ONLY_IN_AIR_PREDICATE)
);
PlacementUtils.register(
context, BASALT_PILLAR, basaltPillar, CountPlacement.of(10), InSquarePlacement.spread(), PlacementUtils.FULL_RANGE, BiomeFilter.biome()
);
PlacementUtils.register(
context, SPRING_DELTA, springLavaNether, CountPlacement.of(16), InSquarePlacement.spread(), PlacementUtils.RANGE_4_4, BiomeFilter.biome()
);
PlacementUtils.register(
context, SPRING_CLOSED, springNetherClosed, CountPlacement.of(16), InSquarePlacement.spread(), PlacementUtils.RANGE_10_10, BiomeFilter.biome()
);
PlacementUtils.register(
context,
SPRING_CLOSED_DOUBLE,
springNetherClosed,
CountPlacement.of(32),
InSquarePlacement.spread(),
PlacementUtils.RANGE_10_10,
BiomeFilter.biome()
);
PlacementUtils.register(
context, SPRING_OPEN, springNetherOpen, CountPlacement.of(8), InSquarePlacement.spread(), PlacementUtils.RANGE_4_4, BiomeFilter.biome()
);
PlacementUtils.register(context, PATCH_SOUL_FIRE, soulFire, firePlacement(Blocks.SOUL_SOIL));
PlacementUtils.register(context, PATCH_FIRE, fire, firePlacement(Blocks.NETHERRACK));
}
private static List<PlacementModifier> firePlacement(Block onlyOnBlock) {
return List.of(
CountPlacement.of(UniformInt.of(0, 5)),
InSquarePlacement.spread(),
PlacementUtils.RANGE_4_4,
BiomeFilter.biome(),
CountPlacement.of(96),
RandomOffsetPlacement.ofTriangle(7, 3),
BlockPredicateFilter.forPredicate(
BlockPredicate.allOf(BlockPredicate.ONLY_IN_AIR_PREDICATE, BlockPredicate.matchesBlocks(Direction.DOWN.getUnitVec3i(), onlyOnBlock))
)
);
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
PlacementUtils.createKey(), PlacementUtils.register()
- 引用位置:
-
- 引用位置:
字段
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
BiasedToBottomInt.of()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
UniformInt.of()
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
BlockPredicate.allOf(), BlockPredicate.matchesBlocks()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
BiomeFilter.biome()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
BlockPredicateFilter.forPredicate()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
CountOnEveryLayerPlacement.of()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
CountPlacement.of()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
InSquarePlacement.spread()
- 引用位置:
-
- 引用位置:
参数/字段
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
RandomOffsetPlacement.ofTriangle()
- 引用位置: