CavePlacements.java
net.minecraft.data.worldgen.placement.CavePlacements
信息
- 全限定名:net.minecraft.data.worldgen.placement.CavePlacements
- 类型:public class
- 包:net.minecraft.data.worldgen.placement
- 源码路径:src/main/java/net/minecraft/data/worldgen/placement/CavePlacements.java
- 起始行号:L28
- 职责:
TODO
字段/常量
-
MONSTER_ROOM- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L29 - 说明:
TODO
- 类型:
-
MONSTER_ROOM_DEEP- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L30 - 说明:
TODO
- 类型:
-
FOSSIL_UPPER- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L31 - 说明:
TODO
- 类型:
-
FOSSIL_LOWER- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L32 - 说明:
TODO
- 类型:
-
DRIPSTONE_CLUSTER- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L33 - 说明:
TODO
- 类型:
-
LARGE_DRIPSTONE- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L34 - 说明:
TODO
- 类型:
-
POINTED_DRIPSTONE- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L35 - 说明:
TODO
- 类型:
-
UNDERWATER_MAGMA- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L36 - 说明:
TODO
- 类型:
-
GLOW_LICHEN- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L37 - 说明:
TODO
- 类型:
-
ROOTED_AZALEA_TREE- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L38 - 说明:
TODO
- 类型:
-
CAVE_VINES- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L39 - 说明:
TODO
- 类型:
-
LUSH_CAVES_VEGETATION- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L40 - 说明:
TODO
- 类型:
-
LUSH_CAVES_CLAY- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L41 - 说明:
TODO
- 类型:
-
LUSH_CAVES_CEILING_VEGETATION- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L42 - 说明:
TODO
- 类型:
-
SPORE_BLOSSOM- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L43 - 说明:
TODO
- 类型:
-
CLASSIC_VINES- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L44 - 说明:
TODO
- 类型:
-
AMETHYST_GEODE- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L45 - 说明:
TODO
- 类型:
-
SCULK_PATCH_DEEP_DARK- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L46 - 说明:
TODO
- 类型:
-
SCULK_PATCH_ANCIENT_CITY- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L47 - 说明:
TODO
- 类型:
-
SCULK_VEIN- 类型:
ResourceKey<PlacedFeature> - 修饰符:
public static final - 源码定位:
L48 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public static void bootstrap(BootstrapContext<PlacedFeature> context) @ L50
- 方法名:bootstrap
- 源码定位:L50
- 返回类型:void
- 修饰符:public static
参数:
- context: BootstrapContext
说明:
TODO
代码
public class CavePlacements {
public static final ResourceKey<PlacedFeature> MONSTER_ROOM = PlacementUtils.createKey("monster_room");
public static final ResourceKey<PlacedFeature> MONSTER_ROOM_DEEP = PlacementUtils.createKey("monster_room_deep");
public static final ResourceKey<PlacedFeature> FOSSIL_UPPER = PlacementUtils.createKey("fossil_upper");
public static final ResourceKey<PlacedFeature> FOSSIL_LOWER = PlacementUtils.createKey("fossil_lower");
public static final ResourceKey<PlacedFeature> DRIPSTONE_CLUSTER = PlacementUtils.createKey("dripstone_cluster");
public static final ResourceKey<PlacedFeature> LARGE_DRIPSTONE = PlacementUtils.createKey("large_dripstone");
public static final ResourceKey<PlacedFeature> POINTED_DRIPSTONE = PlacementUtils.createKey("pointed_dripstone");
public static final ResourceKey<PlacedFeature> UNDERWATER_MAGMA = PlacementUtils.createKey("underwater_magma");
public static final ResourceKey<PlacedFeature> GLOW_LICHEN = PlacementUtils.createKey("glow_lichen");
public static final ResourceKey<PlacedFeature> ROOTED_AZALEA_TREE = PlacementUtils.createKey("rooted_azalea_tree");
public static final ResourceKey<PlacedFeature> CAVE_VINES = PlacementUtils.createKey("cave_vines");
public static final ResourceKey<PlacedFeature> LUSH_CAVES_VEGETATION = PlacementUtils.createKey("lush_caves_vegetation");
public static final ResourceKey<PlacedFeature> LUSH_CAVES_CLAY = PlacementUtils.createKey("lush_caves_clay");
public static final ResourceKey<PlacedFeature> LUSH_CAVES_CEILING_VEGETATION = PlacementUtils.createKey("lush_caves_ceiling_vegetation");
public static final ResourceKey<PlacedFeature> SPORE_BLOSSOM = PlacementUtils.createKey("spore_blossom");
public static final ResourceKey<PlacedFeature> CLASSIC_VINES = PlacementUtils.createKey("classic_vines_cave_feature");
public static final ResourceKey<PlacedFeature> AMETHYST_GEODE = PlacementUtils.createKey("amethyst_geode");
public static final ResourceKey<PlacedFeature> SCULK_PATCH_DEEP_DARK = PlacementUtils.createKey("sculk_patch_deep_dark");
public static final ResourceKey<PlacedFeature> SCULK_PATCH_ANCIENT_CITY = PlacementUtils.createKey("sculk_patch_ancient_city");
public static final ResourceKey<PlacedFeature> SCULK_VEIN = PlacementUtils.createKey("sculk_vein");
public static void bootstrap(BootstrapContext<PlacedFeature> context) {
HolderGetter<ConfiguredFeature<?, ?>> configuredFeatures = context.lookup(Registries.CONFIGURED_FEATURE);
Holder<ConfiguredFeature<?, ?>> monsterRoom = configuredFeatures.getOrThrow(CaveFeatures.MONSTER_ROOM);
Holder<ConfiguredFeature<?, ?>> fossilCoal = configuredFeatures.getOrThrow(CaveFeatures.FOSSIL_COAL);
Holder<ConfiguredFeature<?, ?>> fossilDiamonds = configuredFeatures.getOrThrow(CaveFeatures.FOSSIL_DIAMONDS);
Holder<ConfiguredFeature<?, ?>> dripstoneCluster = configuredFeatures.getOrThrow(CaveFeatures.DRIPSTONE_CLUSTER);
Holder<ConfiguredFeature<?, ?>> largeDripstone = configuredFeatures.getOrThrow(CaveFeatures.LARGE_DRIPSTONE);
Holder<ConfiguredFeature<?, ?>> pointedDripstone = configuredFeatures.getOrThrow(CaveFeatures.POINTED_DRIPSTONE);
Holder<ConfiguredFeature<?, ?>> underwaterMagma = configuredFeatures.getOrThrow(CaveFeatures.UNDERWATER_MAGMA);
Holder<ConfiguredFeature<?, ?>> glowLichen = configuredFeatures.getOrThrow(CaveFeatures.GLOW_LICHEN);
Holder<ConfiguredFeature<?, ?>> rootedAzaleaTree = configuredFeatures.getOrThrow(CaveFeatures.ROOTED_AZALEA_TREE);
Holder<ConfiguredFeature<?, ?>> caveVine = configuredFeatures.getOrThrow(CaveFeatures.CAVE_VINE);
Holder<ConfiguredFeature<?, ?>> mossPatch = configuredFeatures.getOrThrow(CaveFeatures.MOSS_PATCH);
Holder<ConfiguredFeature<?, ?>> lushCavesClay = configuredFeatures.getOrThrow(CaveFeatures.LUSH_CAVES_CLAY);
Holder<ConfiguredFeature<?, ?>> mossPatchCeiling = configuredFeatures.getOrThrow(CaveFeatures.MOSS_PATCH_CEILING);
Holder<ConfiguredFeature<?, ?>> sporeBlossom = configuredFeatures.getOrThrow(CaveFeatures.SPORE_BLOSSOM);
Holder<ConfiguredFeature<?, ?>> vines = configuredFeatures.getOrThrow(VegetationFeatures.VINES);
Holder<ConfiguredFeature<?, ?>> amethystGeode = configuredFeatures.getOrThrow(CaveFeatures.AMETHYST_GEODE);
Holder<ConfiguredFeature<?, ?>> sculkPatchDeepDark = configuredFeatures.getOrThrow(CaveFeatures.SCULK_PATCH_DEEP_DARK);
Holder<ConfiguredFeature<?, ?>> sculkPatchAncientCity = configuredFeatures.getOrThrow(CaveFeatures.SCULK_PATCH_ANCIENT_CITY);
Holder<ConfiguredFeature<?, ?>> sculkVein = configuredFeatures.getOrThrow(CaveFeatures.SCULK_VEIN);
PlacementUtils.register(
context,
MONSTER_ROOM,
monsterRoom,
CountPlacement.of(10),
InSquarePlacement.spread(),
HeightRangePlacement.uniform(VerticalAnchor.absolute(0), VerticalAnchor.top()),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
MONSTER_ROOM_DEEP,
monsterRoom,
CountPlacement.of(4),
InSquarePlacement.spread(),
HeightRangePlacement.uniform(VerticalAnchor.aboveBottom(6), VerticalAnchor.absolute(-1)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
FOSSIL_UPPER,
fossilCoal,
RarityFilter.onAverageOnceEvery(64),
InSquarePlacement.spread(),
HeightRangePlacement.uniform(VerticalAnchor.absolute(0), VerticalAnchor.top()),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
FOSSIL_LOWER,
fossilDiamonds,
RarityFilter.onAverageOnceEvery(64),
InSquarePlacement.spread(),
HeightRangePlacement.uniform(VerticalAnchor.bottom(), VerticalAnchor.absolute(-8)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
DRIPSTONE_CLUSTER,
dripstoneCluster,
CountPlacement.of(UniformInt.of(48, 96)),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
BiomeFilter.biome()
);
PlacementUtils.register(
context,
LARGE_DRIPSTONE,
largeDripstone,
CountPlacement.of(UniformInt.of(10, 48)),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
BiomeFilter.biome()
);
PlacementUtils.register(
context,
POINTED_DRIPSTONE,
pointedDripstone,
CountPlacement.of(UniformInt.of(192, 256)),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
CountPlacement.of(UniformInt.of(1, 5)),
RandomOffsetPlacement.of(ClampedNormalInt.of(0.0F, 3.0F, -10, 10), ClampedNormalInt.of(0.0F, 0.6F, -2, 2)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
UNDERWATER_MAGMA,
underwaterMagma,
CountPlacement.of(UniformInt.of(44, 52)),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
SurfaceRelativeThresholdFilter.of(Heightmap.Types.OCEAN_FLOOR_WG, Integer.MIN_VALUE, -2),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
GLOW_LICHEN,
glowLichen,
CountPlacement.of(UniformInt.of(104, 157)),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
InSquarePlacement.spread(),
SurfaceRelativeThresholdFilter.of(Heightmap.Types.OCEAN_FLOOR_WG, Integer.MIN_VALUE, -13),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
ROOTED_AZALEA_TREE,
rootedAzaleaTree,
CountPlacement.of(UniformInt.of(1, 2)),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
EnvironmentScanPlacement.scanningFor(Direction.UP, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12),
RandomOffsetPlacement.vertical(ConstantInt.of(-1)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
CAVE_VINES,
caveVine,
CountPlacement.of(188),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
EnvironmentScanPlacement.scanningFor(Direction.UP, BlockPredicate.hasSturdyFace(Direction.DOWN), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12),
RandomOffsetPlacement.vertical(ConstantInt.of(-1)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
LUSH_CAVES_VEGETATION,
mossPatch,
CountPlacement.of(125),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12),
RandomOffsetPlacement.vertical(ConstantInt.of(1)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
LUSH_CAVES_CLAY,
lushCavesClay,
CountPlacement.of(62),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12),
RandomOffsetPlacement.vertical(ConstantInt.of(1)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
LUSH_CAVES_CEILING_VEGETATION,
mossPatchCeiling,
CountPlacement.of(125),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
EnvironmentScanPlacement.scanningFor(Direction.UP, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12),
RandomOffsetPlacement.vertical(ConstantInt.of(-1)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
SPORE_BLOSSOM,
sporeBlossom,
CountPlacement.of(25),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
EnvironmentScanPlacement.scanningFor(Direction.UP, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12),
RandomOffsetPlacement.vertical(ConstantInt.of(-1)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
CLASSIC_VINES,
vines,
CountPlacement.of(256),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
BiomeFilter.biome()
);
PlacementUtils.register(
context,
AMETHYST_GEODE,
amethystGeode,
RarityFilter.onAverageOnceEvery(24),
InSquarePlacement.spread(),
HeightRangePlacement.uniform(VerticalAnchor.aboveBottom(6), VerticalAnchor.absolute(30)),
BiomeFilter.biome()
);
PlacementUtils.register(
context,
SCULK_PATCH_DEEP_DARK,
sculkPatchDeepDark,
CountPlacement.of(ConstantInt.of(256)),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
BiomeFilter.biome()
);
PlacementUtils.register(context, SCULK_PATCH_ANCIENT_CITY, sculkPatchAncientCity);
PlacementUtils.register(
context,
SCULK_VEIN,
sculkVein,
CountPlacement.of(UniformInt.of(204, 250)),
InSquarePlacement.spread(),
PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT,
BiomeFilter.biome()
);
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
PlacementUtils.createKey(), PlacementUtils.register()
- 引用位置:
-
- 引用位置:
字段
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
ClampedNormalInt.of()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
ConstantInt.of()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
UniformInt.of()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
VerticalAnchor.aboveBottom(), VerticalAnchor.absolute(), VerticalAnchor.bottom(), VerticalAnchor.top()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
BlockPredicate.hasSturdyFace(), BlockPredicate.solid()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
BiomeFilter.biome()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
CountPlacement.of()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
EnvironmentScanPlacement.scanningFor()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
HeightRangePlacement.uniform()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
InSquarePlacement.spread()
- 引用位置:
-
- 引用位置:
参数/字段
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
RandomOffsetPlacement.of(), RandomOffsetPlacement.vertical()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
RarityFilter.onAverageOnceEvery()
- 引用位置:
-
SurfaceRelativeThresholdFilter
- 引用位置:
方法调用 - 关联成员:
SurfaceRelativeThresholdFilter.of()
- 引用位置: