User Tools

Site Tools


tutorial:structures

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:structures [2019/05/26 16:34] – [Creating a Feature] Fix a list jamieswhiteshirttutorial:structures [2020/05/09 20:17] – MyStructureStart constructor yanis48
Line 19: Line 19:
   * shouldStartAt: return true for testing purposes.   * shouldStartAt: return true for testing purposes.
   * getName: name of your structure   * getName: name of your structure
-  * method_14021 [getRadius]: radius of your structure, used for placement +  * getRadius: radius of your structure, used for placement 
-  * method_13774 [getSeed]: a seed to use for generation, put 0 for testing+  * getSeeedModifier
  
 You can pass DefaultFeatureConfig::deserialize into your constructor for testing. You can pass DefaultFeatureConfig::deserialize into your constructor for testing.
Line 28: Line 28:
 <code java [enable_line_numbers="true"]> <code java [enable_line_numbers="true"]>
 public static class MyStructureStart extends StructureStart { public static class MyStructureStart extends StructureStart {
-    public MyStructureStart (StructureFeature<?> structureFeature_1, int int_1, int int_2Biome biome_1, MutableIntBoundingBox mutableIntBoundingBox_1, int int_3, long long_1) { +    public MyStructureStart (StructureFeature<?> feature, int chunkX, int chunkZBlockBox box, int references, long seed) { 
-        super(structureFeature_1, int_1int_2biome_1mutableIntBoundingBox_1int_3long_1);+        super(featurechunkXchunkZboxreferencesseed);
     }     }
     @Override     @Override
Line 174: Line 174:
 for(Biome biome : Registry.BIOME) { for(Biome biome : Registry.BIOME) {
     if(biome.getCategory() != Biome.Category.OCEAN && biome.getCategory() != Biome.Category.RIVER) {     if(biome.getCategory() != Biome.Category.OCEAN && biome.getCategory() != Biome.Category.RIVER) {
-        biome.addStructureFeature(myFeature, new DefaultFeatureConfig()); +        biome.addStructureFeature(myFeature.configure(FeatureConfig.DEFAULT)); 
-        biome.addFeature(GenerationStep.Feature.SURFACE_STRUCTURES, Biome.configureFeature(myFeature, new DefaultFeatureConfig()Decorator.CHANCE_PASSTHROUGHnew ChanceDecoratorConfig(0)));+        biome.addFeature(GenerationStep.Feature.SURFACE_STRUCTURES, myFeature.configure(FeatureConfig.DEFAULT).createDecoratedFeature(Decorator.CHANCE_PASSTHROUGH.configure(new ChanceDecoratorConfig(0))));
     }     }
 } }
tutorial/structures.txt · Last modified: 2022/11/05 12:06 by jab125