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/01/08 12:07] lightcolourtutorial:features [2020/01/08 12:18] lightcolour
Line 1: Line 1:
-===== 在您的世界中生成Feature =====+===== Generating Features in your World =====
 Rocks, trees, ores, and ponds are all examples of Features. They are simple generation additions to the world which generate depending on how they are configured. In this tutorial, we'll look at generating a simple stone spiral feature in our world randomly. Rocks, trees, ores, and ponds are all examples of Features. They are simple generation additions to the world which generate depending on how they are configured. In this tutorial, we'll look at generating a simple stone spiral feature in our world randomly.
  
Line 47: Line 47:
 </code> </code>
  
-==== 注册一个Feature ==== +==== Registering a Feature ==== 
-可以像注册游戏中的其他大多数内容一样注册Feature,而且您不必担心任何特殊的构建器或机制。+Features can be registered like most other content in the game, and there aren't any special builders or mechanics you'll have to worry about. 
 <code java> <code java>
 private static final Feature<DefaultFeatureConfig> LAVA_HOLE = Registry.register( private static final Feature<DefaultFeatureConfig> LAVA_HOLE = Registry.register(
Line 57: Line 57:
 </code> </code>
  
-==== 向生物群落添加Feature ==== +==== Adding a Feature to a Biome ==== 
-生物群系有一种称为''addFeature''的方法,用于将特征添加到生物群落的生成过程中。 您可以在每个生物群落类(例如''ForestBiome''''SavannaBiome'')中查看此方法的更详细用法。+Biome has a method called ''addFeature'', which is used to add Features to the biome's generation process. You can view more detailed usage of this method inside each Biome class (such as ''ForestBiome'' or ''SavannaBiome'').
  
-我们可以遍历''Registry.BIOME''以将我们的Feature添加到每个生物群系中。+We can iterate over ''Registry.BIOME'' to add our Feature to every Biome.
 <code java> <code java>
 Registry.BIOME.forEach(biome -> biome.addFeature( Registry.BIOME.forEach(biome -> biome.addFeature(
Line 79: Line 79:
 The Decorator represents how the world chooses to place your Feature. ''CHANCE_HEIGHTMAP'' works by looking at a heightmap, whereas ''NOISE_HEIGHTMAP_32'' works with noise. To choose the correct Decorator, check out vanilla Features with a similar style to your own. The decorator config branches off this; in the case of ''CHANCE_HEIGHTMAP'', you would pass in an instance of ''ChanceHeightmapDecorator'' The Decorator represents how the world chooses to place your Feature. ''CHANCE_HEIGHTMAP'' works by looking at a heightmap, whereas ''NOISE_HEIGHTMAP_32'' works with noise. To choose the correct Decorator, check out vanilla Features with a similar style to your own. The decorator config branches off this; in the case of ''CHANCE_HEIGHTMAP'', you would pass in an instance of ''ChanceHeightmapDecorator''
  
-=== 结果 ===+=== Results ===
 {{https://i.imgur.com/Kr59o0B.png}} {{https://i.imgur.com/Kr59o0B.png}}
tutorial/features.txt · Last modified: 2023/12/18 01:19 by solidblock