你可以帮助我们扩充关于该主题的更多信息。
你可以帮助我们来翻译此条目,但请勿使用机器翻译。
资源包(Resource pack)系统为材质包系统的API代替物,允许玩家更深度地自定义自己的Minecraft体验[1][2]。资源包系统首先在13w24a加入,允许玩家自定义音乐、音效[3]、语言文件、离开末路之地的显示文本[4]和字体[5][6][7]。最终,每个Mod或插件都会有自己的资源包。原版游戏也会有自己的资源包,玩家可以同时应用多个资源包。这意味着所有材质包将不再兼容,但可以用Minecraft Texture Ender将1.5格式的材质包转换为资源包。
材质包
在1.6后所有的材质包都会被纳入到资源包,所有的材质包需要转换后才能用于游戏。用Mojang工具Minecraft Texture Ender可以手动将材质包转为资源包(兼容1.5)。1.5之前的材质包要用Unstitcher先转换,游戏加载时,转换后的充当材质包。
附加功能
资源包包括新的元数据格式,允许插件开发者(包括Mojang自己)可以轻松地在游戏中添加全新的一套资源,像是音效、语言文件、音乐等。新的格式也能使Minecraft能更容易识别出过时的资源包,且仍旧可以去加载它们。资源包使用的全部额外文件都在Minecraft根目录下和“1.6.jar”(新启动器中的新格式),还包括pack.mcmeta(用来关联资源包,就像1.6.1之前版本的pack.txt一样)和pack.png(资源包的图片,就像材质包一样)。
设计资源包
想要制作资源包,请使用可以打开后缀为.jar的解压工具打开minecraft.jar(从.minecraft文件夹里的“versions”文件夹以及你想要的版本)后,请复制assets文件夹后粘帖到有pack.png以及pack.mcmeta文件的目录。To change the texture of something,请到(资源包目录)>assets>minecraft>textures>后 and find the folder with the right textures in, then open one of the PNG files with a painting program with support for transparency. When you are done painting, save the file.
To rename items themselves, just go into (resource pack directory)>assets>minecraft>lang> and edit the language you want to edit. For instance, if you wanted to rename Raw Porkchop to Bacon, just locate where it says "Raw Porkchop" and change it to "Raw Bacon" or whatever you want.
pack.mcmeta
pack.mcmeta的基础将会像是这个:
{
"pack":{
"pack_format":1,
"description":"Resource pack sample"
}
}
你可以改变你想要的介绍,不过这个文件必须要以US-ASCII格式填写,所以不属于ASCII的字体都needed to be escaped in '\uxxxx'。介绍会显示在资源包选项。
你可以通过资源包为Minecraft添加新语言。假设语言代号(可能是[639])是'LANG'以及国家/地区代号是'COUNTRY'(可能是[3166-1]),pack.mcmeta将会是这样的:
{
"pack":{
"pack_format":1,
"description":"Resource pack sample"
},
"language":{
"LANG_COUNTRY":{
"name":"Language name",
"region":"Country/region name",
"bidirectional":false
}
}
}
然后,把LANG_COUNTRY.lang文件放到assets/minecraft/lang文件夹里。选项你的资源包后到语言选项,你的新语言将会在里面。
NOTE: As of 1.6, you cannot choose multiple resource packs at once. If you want to use new language and texture pack, you need to combine them manually.
.mcmeta Animation example
{
"animation":{
"frametime":1,
"frames":[{
"index":0,
"time": 0
}
1,2,3,4,5,6,4,2]
}
}
NOTE: all you really need to make a texture animated is:
{
"animation": {}
}
Saved as the file you want animated (like stone).png.mcmeta. It then need to be placed in the same folder as your texture (stone).png is located in.
注意:动画是由0开始计算,第一帧为0,第二帧为1,依此类推.Texture Ender不会对此作转换,可能导致材质丢失,必须手动修改
用途
对于冒险地图来说此功能十分有用。你可以改变游戏的音乐、使结束画面更人性化。你还可以改变生存模式里各个项目的名称,比如把桦木叫做斑马木——这样你就能创造一个独一无二的故事背景。 当然就像利用以前的材质包,你还可以改变死亡画面、标题画面设置等等。
它会为你带来无尽的可能。
文件夹结构
|
历史
| r | |||||
|---|---|---|---|---|---|
| 1.6 | 13w24a | 加入资源包 | |||
| 1.6.2pre | 修复使用高清字体时字形扭曲的问题 | ||||
参考
- ↑ http://mojang.com/2013/05/snapshot-13w21a
- ↑ https://twitter.com/Dinnerbone/status/340070269198680064
- ↑ https://twitter.com/Dinnerbone/status/340078601703673856
- ↑ https://twitter.com/Dinnerbone/status/340087833899446272
- ↑ https://gist.github.com/Dinnerbone/5662824
- ↑ https://twitter.com/Dinnerbone/status/340086702091673600
- ↑ https://gist.github.com/Dinnerbone/5662824