MC Forge 1.8纹理项目

时间:2015-04-11 19:03:11

标签: textures minecraft-forge

我读了标题为" Minecraft Forge 1.8 - Loading Block Textures"的问题,但是该问题的链接存在的时间更长(错误404)。所以,我很好奇,如何在Minecraft Forge 1.8中加载一个项目的纹理?

1 个答案:

答案 0 :(得分:3)

1.8的修改可能有点棘手,因为有时信息太少。但不要放弃。

阻止& 都有一个链接的* .json模型文件,它包含UV和纹理信息(例如纹理位置)。除此之外,您只需注册项目/块并致电:

GetMC.getRenderItem().getItemModelMesher().register(Item, int, modelResourceLocation);

// Important notes for Items
// If you are not comfortable modelling a new item,
// just copy the model information from another simple item, like the apple.

// texture location should be "{MOD_ID}:textures/items/itemname" (Items)
// texture location should be "{MOD_ID}:textures/blocks/blockname" (Blocks)

// If you would like to make your own models with little 3D experience, I
// recommend BDCraft Cubik Pro for the **items** and **blocks**

对于实体,它们的格式略有不同。 (AFAIK)您需要有一个Render文件和一个Model文件(例如RenderCar.java,ModelCar.java)。 Render类文件应包含渲染信息并扩展Render类。模型文件是实体的3D模型信息。

当然,这些信息特别适用于项目,块和实体的渲染。它们仍然需要正确注册,建模和纹理。

// Important note
// If you have want to try modeling your own entities, I would recommend
// looking into Techne for that, it creates the .java files with less work

上述例子:

// .json model file
{
    "__comment": "this is just a tiny piece of the model ",
    "textures": {
    "particle": "mm:items/browning9mm",
    "texture": "mm:items/browning9mm"
},
"elements": [ 
{
    "__comment": "browning9mmshape x128",
    "from": [ 0.875, 11, 7 ],
    "to": [ 13.875, 13, 9 ],
    "faces": {
        "down":  { "uv": [ 0.875, 5, 13.875, 4.5 ], "texture": "#texture" },
        "up":    { "uv": [ 0.875, 3, 13.875, 3.5 ], "texture": "#texture" },
        "north": { "uv": [ 13.875, 3, 0.875, 5 ], "texture": "#texture" },
        "south": { "uv": [ 0.875, 3, 13.875, 5 ], "texture": "#texture" },
        "west":  { "uv": [ 1.3125, 10.4375, 2.875, 13.625 ], "texture": "#texture" },
        "east":  { "uv": [ 3.8125, 7.0625, 5.5, 10.3125 ], "texture": "#texture"
       }
    }
}
相关问题