tutorial:features
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| tutorial:features [2023/12/18 01:19] – [Adding a configured feature to a biome] update code solidblock | tutorial:features [2024/10/28 17:58] (current) – Fix new identifier vs Identifier.of cassiancc | ||
|---|---|---|---|
| Line 83: | Line 83: | ||
| <code java> | <code java> | ||
| public class ExampleMod implements ModInitializer { | public class ExampleMod implements ModInitializer { | ||
| - | public static final Identifier EXAMPLE_FEATURE_ID = new Identifier(" | + | public static final Identifier EXAMPLE_FEATURE_ID = Identifier.of(" |
| public static final ExampleFeature EXAMPLE_FEATURE = new ExampleFeature(ExampleFeatureConfig.CODEC); | public static final ExampleFeature EXAMPLE_FEATURE = new ExampleFeature(ExampleFeatureConfig.CODEC); | ||
| Line 101: | Line 101: | ||
| public class FeatureExampleMod implements ModInitializer { | public class FeatureExampleMod implements ModInitializer { | ||
| - | public static final Identifier EXAMPLE_FEATURE_ID = new Identifier(" | + | public static final Identifier EXAMPLE_FEATURE_ID = Identifier.of(" |
| public static final ExampleFeature EXAMPLE_FEATURE = new ExampleFeature(ExampleFeatureConfig.CODEC); | public static final ExampleFeature EXAMPLE_FEATURE = new ExampleFeature(ExampleFeatureConfig.CODEC); | ||
| public static final ConfiguredFeature< | public static final ConfiguredFeature< | ||
| EXAMPLE_FEATURE, | EXAMPLE_FEATURE, | ||
| - | new ExampleFeatureConfig(10, | + | new ExampleFeatureConfig(10, |
| ); | ); | ||
| Line 127: | Line 127: | ||
| public class ExampleMod implements ModInitializer { | public class ExampleMod implements ModInitializer { | ||
| - | public static final Identifier EXAMPLE_FEATURE_ID = new Identifier(" | + | public static final Identifier EXAMPLE_FEATURE_ID = Identifier.of(" |
| public static final ExampleFeature EXAMPLE_FEATURE = new ExampleFeature(ExampleFeatureConfig.CODEC); | public static final ExampleFeature EXAMPLE_FEATURE = new ExampleFeature(ExampleFeatureConfig.CODEC); | ||
| public static final ConfiguredFeature< | public static final ConfiguredFeature< | ||
| EXAMPLE_FEATURE, | EXAMPLE_FEATURE, | ||
| - | new ExampleFeatureConfig(10, | + | new ExampleFeatureConfig(10, |
| ); | ); | ||
| // our PlacedFeature. this is what gets passed to the biome modification API to add to the biome. | // our PlacedFeature. this is what gets passed to the biome modification API to add to the biome. | ||
tutorial/features.1702862360.txt.gz · Last modified: 2023/12/18 01:19 by solidblock