User Tools

Site Tools


tutorial:features

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:features [2020/09/05 20:01] – 1.16.2 siglongtutorial:features [2020/09/05 20:29] – minor improvement siglong
Line 57: Line 57:
  
 ==== Configuring a feature ==== ==== Configuring a feature ====
-We need to give a configuration to a feature.+We need to give a configuration to a feature. Make sure to register configured feature as well as feature.
  
 <code java> <code java>
Line 66: Line 66:
   @Override   @Override
   public void onInitialize() {   public void onInitialize() {
 +    [...]
 +    
     Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier("tutorial", "stone_spiral"), STONE_SPIRAL_CONFIGURED);     Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier("tutorial", "stone_spiral"), STONE_SPIRAL_CONFIGURED);
   }   }
Line 82: Line 84:
 public class DefaultBiomeFeaturesMixin { public class DefaultBiomeFeaturesMixin {
   @Inject(method = "addPlainsFeatures(Lnet/minecraft/world/biome/GenerationSettings$Builder;)V", at = @At("TAIL"))   @Inject(method = "addPlainsFeatures(Lnet/minecraft/world/biome/GenerationSettings$Builder;)V", at = @At("TAIL"))
-  private static void addPlainsFeaturs(GenerationSettings.Builder builder, CallbackInfo ci) {+  private static void addPlainsFeatures(GenerationSettings.Builder builder, CallbackInfo ci) {
     builder.feature(GenerationStep.Feature.TOP_LAYER_MODIFICATION, ExampleMod.STONE_SPIRAL_CONFIGURED);     builder.feature(GenerationStep.Feature.TOP_LAYER_MODIFICATION, ExampleMod.STONE_SPIRAL_CONFIGURED);
   }   }
tutorial/features.txt · Last modified: 2023/12/18 01:19 by solidblock