tutorial:features
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
tutorial:features [2023/12/18 01:12] – [Creating a feature] updat ecode solidblock | tutorial:features [2023/12/18 01:16] – [Creating a feature] solidblock | ||
---|---|---|---|
Line 70: | Line 70: | ||
< | < | ||
public record ExampleFeatureConfig(int number, Identifier blockId) implements FeatureConfig { | public record ExampleFeatureConfig(int number, Identifier blockId) implements FeatureConfig { | ||
- | public static Codec< | + | public static |
instance -> instance.group( | instance -> instance.group( | ||
// you can add as many of these as you want, one for each parameter | // you can add as many of these as you want, one for each parameter | ||
Line 84: | Line 84: | ||
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 = new Identifier(" | ||
- | public static final Feature< | + | public static final ExampleFeature |
@Override | @Override | ||
Line 102: | Line 102: | ||
public static final Identifier EXAMPLE_FEATURE_ID = new Identifier(" | public static final Identifier EXAMPLE_FEATURE_ID = new Identifier(" | ||
- | public static | + | public static |
- | public static ConfiguredFeature< | + | public static |
- | | + | EXAMPLE_FEATURE, |
- | new ExampleFeatureConfig(10, | + | new ExampleFeatureConfig(10, |
); | ); | ||
Line 117: | Line 117: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | FIXME The last line has to be updated | ||
==== Adding a configured feature to a biome ==== | ==== Adding a configured feature to a biome ==== |
tutorial/features.txt · Last modified: 2023/12/18 01:19 by solidblock