User Tools

Site Tools


zh_cn:tutorial:trees

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
zh_cn:tutorial:trees [2021/07/25 10:35] – [Extra settings for your tree] breakicezh_cn:tutorial:trees [2022/08/18 03:40] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +FIXME 本文有一段时间没有更新了,可能对未来版本不起作用。请参考[[tutorial:trees|英文页面]]。
 +
 ===== 添加树木 [1.17](高级) ===== ===== 添加树木 [1.17](高级) =====
 阅读本文之前,建议先学习如何创建一个特征地形。\\ 阅读本文之前,建议先学习如何创建一个特征地形。\\
Line 57: Line 59:
 树苗是生长树木的一类特殊方块,需要 ''SaplingGenerator'' 树苗是生长树木的一类特殊方块,需要 ''SaplingGenerator''
  
-=== 创建SaplingGenerator === +=== 创建 SaplingGenerator === 
-简单的生成器接收树木的''ConfiguredFeature''并将其返回,如下所示:+简单的生成器接收树木的 ''ConfiguredFeature'' 并将其返回,如下所示:
  
 <code java> <code java>
Line 78: Line 80:
 后面会展示高级的''SaplingGenerator''的例子。 后面会展示高级的''SaplingGenerator''的例子。
  
-=== 创建SaplingBlock === +=== 创建 SaplingBlock === 
-创建方块本身需要继承''SaplingBlock''类,而不是直接将其实例化,因为其构造器的访问权限是protected的。+创建方块本身需要继承''SaplingBlock''类,而不是直接将其实例化,因为其构造器的访问权限是 protected 的。
  
 <code java> <code java>
Line 90: Line 92:
  
 === 注册SaplingBlock === === 注册SaplingBlock ===
-要注册树苗,按照注册方块的以下步骤(参见[[zh_cn:tutorial:blocks]]),但传入带有''ConfiguredFeature''的生成器的实例。+要注册树苗,按照注册方块的以下步骤(参见[[zh_cn:tutorial:blocks]]),但传入带有 ''ConfiguredFeature'' 的生成器的实例。
  
 把这个放在用于你的树苗方块的类中: 把这个放在用于你的树苗方块的类中:
Line 442: Line 444:
  
 ==== dirtProvider ==== ==== dirtProvider ====
-Sets the ''BlockStateProvider'' for the block of dirt generated under the tree.+还记得巨型云杉木下面的灰化土吗,它就是用这个做到的。 
 + 
 +设置一下 ''BlockStateProvider'' ,让你的树在周围生成铁块!简直就是五金树不是吗?
  
-Example:+例子:
 <code java> <code java>
 [...] [...]
Line 452: Line 456:
  
 ==== decorators ==== ==== decorators ====
-Used to add ''TreeDecorator''s to your tree. +用来在你的树上添加 ''TreeDecorator'' 
-This was briefly showcased in the ''TreeDecorator'' section of this tutorial. +本教程的 ''TreeDecorator'' 部分简要的展示了这一点。 
-If you want, you can add multiple ''TreeDecorator''s to the same tree using a convenience method like ''Arrays.asList''.+如果你想,你可以使用像 ''Arrays.asList'' 这样的方法方便的在同一棵树上添加多个 ''TreeDecorator''
  
-Example:+例子
  
 <code java> <code java>
Line 469: Line 473:
  
 ==== ignoreVines ==== ==== ignoreVines ====
-Makes the tree generation ignore vines stuck in the way.+使树生长时无视藤蔓。
  
-Example:+例子
  
 <code java> <code java>
Line 480: Line 484:
  
 ==== forceDirt ==== ==== forceDirt ====
-Forces the ''TreeFeature'' to generate the dirt underneath the tree.+强制 ''TreeFeature'' 在树下生成泥土。
  
-Example:+例子:
  
 <code java> <code java>
Line 490: Line 494:
 </code> </code>
  
-===== Creating a BlockStateProvider ===== +===== 创建一个 BlockStateProvider ===== 
-Coming soon.+敬请期待!
  
zh_cn/tutorial/trees.1627209344.txt.gz · Last modified: 2021/07/25 10:35 by breakice