PileFeatures.java

net.minecraft.data.worldgen.features.PileFeatures

信息

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

    TODO

字段/常量

  • PILE_HAY

    • 类型: ResourceKey<ConfiguredFeature<?,?>>
    • 修饰符: public static final
    • 源码定位: L16
    • 说明:

      TODO

  • PILE_MELON

    • 类型: ResourceKey<ConfiguredFeature<?,?>>
    • 修饰符: public static final
    • 源码定位: L17
    • 说明:

      TODO

  • PILE_SNOW

    • 类型: ResourceKey<ConfiguredFeature<?,?>>
    • 修饰符: public static final
    • 源码定位: L18
    • 说明:

      TODO

  • PILE_ICE

    • 类型: ResourceKey<ConfiguredFeature<?,?>>
    • 修饰符: public static final
    • 源码定位: L19
    • 说明:

      TODO

  • PILE_PUMPKIN

    • 类型: ResourceKey<ConfiguredFeature<?,?>>
    • 修饰符: public static final
    • 源码定位: L20
    • 说明:

      TODO

内部类/嵌套类型

构造器

方法

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

public static void bootstrap(BootstrapContext<ConfiguredFeature<?,?>> context) @ L22

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

参数:

  • context: BootstrapContext<ConfiguredFeature>

说明:

TODO

代码

public class PileFeatures {
    public static final ResourceKey<ConfiguredFeature<?, ?>> PILE_HAY = FeatureUtils.createKey("pile_hay");
    public static final ResourceKey<ConfiguredFeature<?, ?>> PILE_MELON = FeatureUtils.createKey("pile_melon");
    public static final ResourceKey<ConfiguredFeature<?, ?>> PILE_SNOW = FeatureUtils.createKey("pile_snow");
    public static final ResourceKey<ConfiguredFeature<?, ?>> PILE_ICE = FeatureUtils.createKey("pile_ice");
    public static final ResourceKey<ConfiguredFeature<?, ?>> PILE_PUMPKIN = FeatureUtils.createKey("pile_pumpkin");
 
    public static void bootstrap(BootstrapContext<ConfiguredFeature<?, ?>> context) {
        FeatureUtils.register(context, PILE_HAY, Feature.BLOCK_PILE, new BlockPileConfiguration(new RotatedBlockProvider(Blocks.HAY_BLOCK)));
        FeatureUtils.register(context, PILE_MELON, Feature.BLOCK_PILE, new BlockPileConfiguration(BlockStateProvider.simple(Blocks.MELON)));
        FeatureUtils.register(context, PILE_SNOW, Feature.BLOCK_PILE, new BlockPileConfiguration(BlockStateProvider.simple(Blocks.SNOW)));
        FeatureUtils.register(
            context,
            PILE_ICE,
            Feature.BLOCK_PILE,
            new BlockPileConfiguration(
                new WeightedStateProvider(
                    WeightedList.<BlockState>builder().add(Blocks.BLUE_ICE.defaultBlockState(), 1).add(Blocks.PACKED_ICE.defaultBlockState(), 5)
                )
            )
        );
        FeatureUtils.register(
            context,
            PILE_PUMPKIN,
            Feature.BLOCK_PILE,
            new BlockPileConfiguration(
                new WeightedStateProvider(
                    WeightedList.<BlockState>builder().add(Blocks.PUMPKIN.defaultBlockState(), 19).add(Blocks.JACK_O_LANTERN.defaultBlockState(), 1)
                )
            )
        );
    }
}

引用的其他类