Natura 木材与树木
基本信息
| 属性 | 值 |
|---|---|
| 树种数 | 13 种(woodTextureNames) |
| 原木方块 | Natura:tree(8 meta)、Natura:redwood、Natura:willow、Natura:bloodwood、Natura:Rare Tree、Natura:Dark Tree |
| 树苗方块 | Natura:florasapling(8 meta)、Natura:Rare Sapling(5 meta) |
| 树叶方块 | Natura:floraleaves、floraleavesnocolor、Rare Leaves、Dark Leaves |
| 木板方块 | Natura:planks(13 meta) |
| 燃料 | 树苗燃烧时间 100 tick |
13 种木材
NContent.woodTextureNames 定义了全部 13 种木材(NContent.java:2017-2018):
public static final String woodTextureNames[] = { "eucalyptus", "sakura", "ghostwood", "redwood", "bloodwood",
"hopseed", "maple", "silverbell", "purpleheart", "tiger", "willow", "darkwood", "fusewood" };
Planks.textureNames 使用同一顺序(blocks/trees/Planks.java:23)。注意 NContent.woodTextureNames 中的 purpleheart 对应配置项与树苗 meta 中的 amaranth(紫心木 / 紫葳木)。
木板 meta 对应表
Planks 的 meta 与上表顺序一致,meta 超出范围时返回岩浆贴图(Planks.java:36:if (meta >= textureNames.length) return Blocks.lava.getIcon(0, 0))。
原木方块
| 方块 | 注册名 | meta 含义 | 备注 |
|---|---|---|---|
| 树 | Natura:tree |
8 种(4 树皮 + 4 树心) | 硬度 1.5,燃烧 5/5 |
| 红杉 | Natura:redwood |
单一 | 燃烧 40/10(更易燃,注释说明「因为它很巨大」) |
| 柳木 | Natura:willow |
单一 | 燃烧 5/5 |
| 血木 | Natura:bloodwood |
LogTwoxTwo(8f, Material.wood),2×2 原木 |
硬度 8.0,轴 2 级 |
| 稀有树 | Natura:Rare Tree |
通配符 | 燃烧 5/5 |
| 暗木 | Natura:Dark Tree |
通配符 | 燃烧 5/5(注释说明下界树不可燃) |
TreeBlock 的 8 张贴图(blocks/trees/TreeBlock.java:25-26):
public String[] textureNames = new String[] { "eucalyptus_bark", "sakura_bark", "ghostwood_bark", "hopseed_bark",
"eucalyptus_heart", "sakura_heart", "ghostwood_heart", "hopseed_heart" };
即 meta 0–3 为树皮、4–7 为树心,木材为桉木、樱花、鬼木、啤酒花(hopseed)。
采集等级
NContent.java:300-304 明确设置:
| 方块 | 采集等级 |
|---|---|
| 树(tree) | 斧 -1(即不可用斧采集) |
| 红杉(redwood) | 斧 -1 |
| 血木(bloodwood) | 斧 2 |
| 暗木(darkTree) | 斧 1(meta 1)、斧 -1(meta 0) |
注释说明:下界树不应可燃,因此设为 -1。
树苗
| 方块 | 注册名 | meta 数 | 种类(textureNames 顺序) |
|---|---|---|---|
| 下界树苗 | Natura:florasapling |
8 | redwood, eucalyptus, hopseed, sakura, ghostwood, bloodwood, darkwood, fusewood |
| 稀有树苗 | Natura:Rare Sapling |
5 | maple, silverbell, purpleheart, tiger, willow |
来源:blocks/trees/NSaplingBlock.java:41-42、blocks/trees/OverworldSapling.java:34。
NSaplingBlock 实现 IFlowerPottable,构造时设硬度 0.0F、脚步声 Block.soundTypeGrass(NSaplingBlock.java:44-50)。
树叶
| 方块 | 注册名 | Item 类 | 燃烧参数 |
|---|---|---|---|
| 有色树叶 | Natura:floraleaves |
NLeavesItem |
30 / 60 |
| 无色树叶 | Natura:floraleavesnocolor |
NoColorLeavesItem |
30 / 60 |
| 稀有树叶 | Natura:Rare Leaves |
OverworldLeavesItem |
30 / 60 |
| 暗色树叶 | Natura:Dark Leaves |
NLeavesDarkItem |
无(注释:下界树不应可燃) |
木制建筑方块
每种木材可生成完整的一套建筑方块,全部由配置开关控制(wood products 分类):
| 方块类型 | 数量 | 开关 |
|---|---|---|
| 楼梯 | 13 种 | Enable Wooden Stairs |
| 活板门 | 13 种 | Enable Wooden Trapdoors |
| 栅栏门 | 13 种 | Enable Wooden Fence Gates |
| 压力板 | 13 种 | Enable Wooden PressurePlates |
| 按钮 | 13 种 | Enable Wooden Buttons |
| 栅栏 | 1 个通用 | Enable Wooden Fences |
| 木板台阶 | 2 个通用(plankSlab1 / plankSlab2) |
Enable Wooden Slabs |
| 工作台 | 1 个 | Enable Wooden Workbenches |
| 书架 | 1 个 | Enable Wooden Bookshevles |
楼梯使用 new NStairs(planks, metaIndex) 形式,meta 索引 0–12 覆盖 13 种木材(NContent.java:343-402)。
门共 7 种(NContent.java:692-704):redwood、eucalyptus、hopseed、sakura、ghostwood、bloodwood、redwoodbark。
物品字典
addOredictSupport(NContent.java:1749-1808)注册:
| 字典名 | 物品 |
|---|---|
logWood |
tree、redwood、willow、bloodwood(meta 0 与 15)、rareTree、darkTree |
treeLeaves |
floraLeaves、floraLeavesNoColor、rareLeaves、darkLeaves(均为通配符 meta) |
treeSapling |
rareSapling meta 0–4、floraSapling meta 0–7 |
plankWood |
planks 全部 meta(0–12) |
stickWood |
stickItem 全部 meta |
crafterWood / craftingTableWood |
alternateWorkbench |
chestWood |
原版箱子(Blocks.chest,Natura 主动注册) |
bowlWood |
原版碗(Items.bowl,Natura 主动注册) |
ExtraTiC 兼容
若检测到 ExtraTiC 已加载,plankWood 与 stickWood 只注册 meta {0, 1, 3, 5, 6, 7, 8, 9, 10}(跳过 2、4、11、12),以避免与 ExtraTiC 的材质冲突(NContent.java:1783-1799)。
燃料
NContent 实现 IFuelHandler(NContent.java:145),getBurnTime 仅对两种树苗返回 100 tick,其余返回 0(NContent.java:2010-2015):
public int getBurnTime(ItemStack fuel) {
if (fuel.getItem() == new ItemStack(floraSapling).getItem()
|| fuel.getItem() == new ItemStack(rareSapling).getItem())
return 100;
return 0;
}
注意:原木与木板不是燃料(本模组未覆写其 ItemBlock.getItemBurnTime)。