Skip to content

BlockInfos

tremblestarman edited this page Feb 8, 2018 · 5 revisions

方块信息

方块信息记录了一个类别的方块不同版本的所有材质、模型信息,使用Json格式,可被动态读取。

文件名为Class.json,是此类方块的类名。

Class.json

┏┤ (List) A Block Class : 储存了全部方块信息.
┖───┬┤ (List) A BlockInfo List : 方块信息的不同变种.
    └───┬┤ (Compound) A BlockInfo : 储存一个方块的所有信息.
        ├────┤ (Double) VersionFrom : 所适用的起始版本.(值为0表示无需规定起始版本)
        ├────┤ (Double) VersionTo : 所适用的截止版本.(值为0表示无需规定截止版本)
        ├────┤ (String) Id : 方块的Id.(若为原版方块请加上minecraft:前缀)
        ├────┤ (String) Data : 方块的Data.(值为空或'x'表示任意Data,多个Data用','隔开)
        ├───┬┤ (Compound) Size : 模型的大小.(将传参给ModelInfo)
        │   ├────┤ (Double) X : X轴延伸长度.
        │   ├────┤ (Double) Y : Y轴延伸长度.
        │   └────┤ (Double) Z : Z轴延伸长度.
        └───┬┤ (Compound) Model : 定义了这个方块的模型.
            ├────┤ (String) Name : 所引用的ModelInfo.(后缀.json是必要的)
            ├────┤ (String) Params : ModelInfo的条件参数.
            └───┬┤ (Compound) Textures : 模型引用全部的材质.
                └───┬┤ (Compound) A Texture : 材质名.
                    ├────┤ (String) Path : 材质路径.(相对于texture根目录)
                    └────┤ (String) Params : 材质参数.