tutorial:features
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:features [2023/12/18 01:19] – [Adding a configured feature to a biome] update code solidblock | tutorial:features [2026/06/18 23:13] (current) – cassiancc | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~REDIRECT> | ||
| + | |||
| ===== Adding Features ===== | ===== Adding Features ===== | ||
| Rocks, trees, ores, and ponds are all examples of features. | Rocks, trees, ores, and ponds are all examples of features. | ||
| Line 83: | Line 85: | ||
| <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 103: | ||
| 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 129: | ||
| 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