Plant Block(植物)
基本信息
| 属性 | 值 |
|---|---|
| 注册名 | Botany:plant |
| TileEntity | 无(extends BlockBush) |
| 硬度 | 源码未调用 setHardness |
| 爆炸抗性 | 源码未调用 setResistance |
功能
BlockPlant(binnie/botany/gardening/BlockPlant.java:24,extends BlockBush),注册于 botany/gardening/ModuleGardening.java:51,物品类为 ItemWeed。构造函数(:26-32)只设 setBlockName("plant")、setCreativeTab、setTickRandomly(true)、setStepSound(Block.soundTypeGrass)。
⚠️ 已订正(重大):原条目的植物种类列表(
Weeds野草 /DeadlyNightshade致命夜影 /WhiteMushroom白蘑菇 /OrangeMushroom橙蘑菇 /Porcini牛肝菌)除Weeds外全部是编造的,源码里没有这四个常量。真实的Type枚举是BlockPlant.java:132-136:
| metadata | 枚举名 | 贴图名 | 说明 |
|---|---|---|---|
| 0 | Weeds |
weeds |
野草(BlockPlant.isWeed() 判定的三种之一) |
| 1 | WeedsLong |
longWeeds |
高野草 |
| 2 | WeedsVeryLong |
veryLongWeeds |
更高野草 |
| 3 | DeadFlower |
deadFlower |
枯萎的花 |
| 4 | DecayingFlower |
decayingFlower |
正在腐坏的花 |
蘑菇类植物在 Binnie 中是独立物品(ItemFood 等),不在本方块里。
杂草判定
public static boolean isWeed(IBlockAccess world, int x, int y, int z) { // BlockPlant.java:34
Type type = Type.get(world.getBlockMetadata(x, y, z));
return type == Type.Weeds || type == Type.WeedsLong || type == Type.WeedsVeryLong;
}
数值
| 数值 | 值 |
|---|---|
| 硬度 | 未调用 setHardness |
| 爆炸抗性 | 未调用 setResistance |
| 掉落 | 无(getDrops 返回空 ArrayList,BlockPlant.java:45-48) |
交互
| 触发 | 行为 |
|---|---|
| 放置 | 需下层方块满足条件(BlockBush 语义) |
| 随机 tick | setTickRandomly(true),驱动蔓延/死亡逻辑 |
| 破坏 | 无掉落(getDrops 返回空列表) |
所属多方块结构
无
相关条目
- Soil - 6 种土壤方块(园艺基底)
- Flower - 花朵方块
- Item Trowel - 把草方块/泥土转成园艺土壤