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 revisionBoth sides next revision
tutorial:features [2020/01/08 12:13] lightcolourtutorial:features [2020/01/08 12:17] lightcolour
Line 72: Line 72:
 </code> </code>
  
-The first argument of ''addFeature'' helps determine when the structure is generated. For above-ground houses you may go with ''SURFACE_STRUCTURES'', and for caves, you might go with ''RAW_GENERATION''.+''addFeature''的第一个参数有助于确定何时生成结构。 对于地上的房屋,您可以使用''SURFACE_STRUCTURES'',对于洞穴,您可以使用'' RAW_GENERATION''
  
-The second argument of ''addFeature'' is a ConfiguredFeature, which you can create through ''Biome.configureFeature''. The latter takes in an instance of your feature, an instance of your feature'config class, a decorator, and a decorator config.+''addFeature''的第二个参数是ConfiguredFeature,可以通过''Biome.configureFeature''创建。 后者接收功能的实例,功能的config类,装饰器和装饰器配置的实例。
  
-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''+装饰器代表世界如何选择放置要素。 ''CHANCE_HEIGHTMAP''可通过查看高度图来工作,而''NOISE_HEIGHTMAP_32''可使用噪声来工作。 要选择正确的装饰器,请签出与您自己风格相似的香草功能。 装饰器配置将分支此分支; 对于''CHANCE_HEIGHTMAP'',您将传入''ChanceHeightmapDecorator的实例。
  
 === 结果 === === 结果 ===
 {{https://i.imgur.com/Kr59o0B.png}} {{https://i.imgur.com/Kr59o0B.png}}
tutorial/features.txt · Last modified: 2023/12/18 01:19 by solidblock