你可以帮助我们来翻译此条目,但请勿使用机器翻译。
制作材质包,你首先需要找到minecraft文件夹。在Windows系统里它被称为.minecraft,它一般在应用程序文件夹。在开始菜单的运行里输入%appdata%可以快速找到它。在Mac里它叫做minecraft,用寻找功能可以找到它。按Shift-Command-G然后输入 "~/Library/Application Support/minecraft"最后按回车。在Linux系统里它和Windows一样叫做.minecraft,它就在主目录里面(当然,默认情况下是隐藏的).。你可以在设置相关信息后找到它,然后点击资源包的文件夹...然后你就打开它了。
一旦你打开了Minecraft,打开 resourcepacks 文件夹. 为您的新资源包创建一个新文件夹,将其命名为您想要的资源包。.
pack.mcmeta
你需要做的第一件事是打开 pack.mcmeta 这个文件. 他能够让Minecraft知道这个文件夹里的内容是关于资源包的,它还允许您自定义显示的描述,当你选择使用游戏中的资源包去创建 pack.mcmeta 文件时, 打开一个文本编辑器并粘贴下面的内容:
{
"pack":{
"pack_format":2,
"description":"My Resource Pack"
}
}
对于1.9改变后
你可以把描述留给“My Resource Pack”,或者你可以把它其中的一下东西变的更加有趣.。如果您决定您需要一些特殊的字符,您可以查找代码 这里. 你说你想使用信刺的话: Þ.,你应该把它放在 \u00DE. Just make sure you use a backslash and not a forward slash.
要不要描述你那材质包的性质, 你需要把你写的介绍保存这个pack.mcmeta文件里去. 当然你保存了后,那里面是的描述介绍是纯文本的你可以用一些特殊[表意格式]https://minecraft-zh.gamepedia.com/%E6%A0%B7%E5%BC%8F%E4%BB%A3%E7%A0%81来润色你的文体.
pack.png
如果你想要一张新的图片展示在你的材质包选择中,你可以做一张128×128的.png文件并且重命名为 pack.png. 如果是动态文件就命名为 pack.mcmeta
assets
然后你需要创建个文件名为 assets 之后在其内再创建个文件为 minecraft ; minecraft 在这个里面放置自己做的资源文件,所以确保这个文件的存在的绝对性
现在你可以做可以在里面做个材质包. 以便他们选择,所以你不需要把任何不是默认的物品放在里面因为Minecraft会过滤这个材质包的内容,, 并且通常时候载入材质包是默认的. 所以说里面的物品都是相同的, 除了你想做个紫色的砖块那就与其不一样了. 为着紫色的的贴图材质你需要创建一个新的空图片, 但是你要在元路径里确保自己做的砖块与原版的砖块名字相同. 所以为了做这个砖块你要到你所创 minecraft 文件里然后到里面改资源, 首先创建一个名为 textures的文件.在那里面, 你要创建个blocks 文件, 之后在里面放着你的紫色砖块贴图文件那是png格式的, 如前文所称,文件名为 brick.png.
你可能想知道如何弄清楚名字是什么,文件结构是什么, 如果你只想做一个轻微的改变,而不是从头开始,如何找到原始文件本身. 为此,你必须看两个地方,根据你改变的文件类型。
If you want to make custom icons, music, records, or sounds, go back to the first minecraft folder that contains resourcepacks. Now open up the assets folder (this is a different one from the one you made). You should see folders labeled icons, music, records and sounds. Inside, you'll find the original files for each category. If you want to update an icon, just copy the one you want and then go back to the minecraft folder that you recently created. Create a new icon folder inside, and paste your icon file into it. Now you can open that file and modify it however you like, and it will still have the correct name and file path.
For version 1.8+, you will need to use the following directory structure for sounds. The sounds directory must be created in the minecraft directory, and the music and records directories must be created in the sounds directory. Inside the music directory you will want to create game and menu directories. There are additional directories that you can create as appropriate for additional sound types, but these should get you well on your way. By creating your ogg Vorbis files, renaming them to match existing sound file names, and placing them in the proper directories, you can replace default sounds with your own creations.
To find the files for fonts, languages, texts, and textures, it's a little bit more involved. Go back to the first .minecraft folder that contains resourcepacks and this time, open up the versions folder. Inside you should see a folder that corresponds to the current version (i.e. 1.7.2). Open that to find the 1.7.2.jar file and open that jar file using whatever unzipping program you have. Inside the new folder that it creates, you'll see a whole slew of class files, but somewhere in there you'll find yet another assets folder with yet another minecraft folder inside. Open them up and you'll see folders called font, lang, texts, and textures. Again, you'll find the default files inside and you can copy the ones you want to change and put them into the minecraft folder that's hidden in the depths of your new resourcepack folder.
If that's too confusing, it might be helpful to look at a video tutorial or two. You can also look into downloading a default resource pack that you can just copy and modify, deleting the branches of folders that you don't need. That might be simpler, depending on what you're doing. The folder structure is visible here on the wiki: Resource pack#Folder structure.
Replacing Minecraft Models
Sometimes you may want to change one of Minecraft's models, quick and easy. Here is a way to do it. This uses another block's model to make your own.
You are not allowed to
- Do anything that violates Mojang's terms of use for Minecraft.
- Release Minecraft versions or modifications that allow you to play without having bought Minecraft from Mojang.
- Release the decompiled source code of Minecraft in any way.
Requirements
- A 3D Modelling Editor (I use opls Model Creator [1] because it is easy(ish) to use and can export to .json format)
- Create a resourcepack with the name "Blocks" and with all the folders you need:
| Folder Structure |
|---|
|
Replacing a Block
Because the ladder in Minecraft isn't 3D, you can replace it with your own model. First to get all the ladder's files into this resourcepack:
file-roller ~/.minecraft/versions/1.9/1.9.jar
1. Go into the "assets/minecraft/blockstates" file, then extract ladder.json to Blocks/assets/minecraft/blockstates/
2. Extract assets/minecraft/models/block/ladder.json to Blocks/assets/minecraft/block/
3. Extract assets/minecraft/models/item/ladder.json to Blocks/assets/minecraft/item/
4. Lastly, extract assets/minecraft/textures/blocks/ladder.png Blocks/assets/minecraft/textures/blocks/ladder.png
Now you can either edit the ladder.png and change it there, or you can edit it in Model Creator.
Modelling the Ladder
First to open Model Creator
cd ~/Model\ Creator/ java -jar Model\ Creator.jar
Next, to load the ladder model, press Ctrl-O
In the "File Name" box, write ".minecraft/resourcepacks/Blocks/assets/minecraft/models/block/ladder.json".
You then should be facing a ladder which is on the south side of the box.
1. Press N to create a new block.
2. Resize the model to as small as one of the rungs of the ladder. Then, on the top bar, go to "View - Dialog - Texture Manager"
3. Rename the first box to "texture" and the second to "blocks/ladder" and the last, double click on the "C" and write in the box, ".minecraft/resourcepacks/Blocks/assets/minecraft/textures/blocks/ladder.png"
4. In the next row, write in the first box "particle", then follow the second and the last steps above.
Now we have created the particle when broken and the texture.
To assign a texture to a block, select all its faces and press T to toggle face visibility, then go to "View - Dialog - UV Editor".
Put on the texture. This part is a little bit hard to document, so try to do it yourself.
Finishing off
When you have completed the 3D model of the ladder and saved it, turn Minecraft on.
In Minecraft, go to "Options - Resourcepacks" and enable the resourcepack.
Place the ladder on a wall, and you should see it's replaced model.
Adding Languages
You can add new languages to Minecraft by resource pack. Assume your language code is 'LANG' (might be ISO 639) and country/region code is 'COUNTRY' (might be ISO 3166-1), pack.mcmeta will look like:
{
"pack":{
"pack_format":1,
"description":"Resource pack sample"
},
"language":{
"LANG_COUNTRY":{
"name":"Language name",
"region":"Country/region name",
"bidirectional":false
}
}
}
Then, put LANG_COUNTRY.lang in assets/minecraft/lang. In game, choose your resource pack, open the Language selection screen, and your new language will be there. Please note that pack.mcmeta goes in assets/minecraft, not in assets/minecraft/lang. Also note that the above pack.mcmeta is the same file as the pack.mcmeta file that gives the metadata for your resource pack. If you already have a pack.mcmeta file, you must update it with the information for your new language.
NOTE: As of 1.7, you can choose multiple resource packs at once. If you want to use new language and resource pack for versions 1.6.4 to 1.7, you need to combine them manually because multiple resource packs could not be selected before 1.7.
Animation Properties
{
"animation":{
"width":1,
"height":7,
"interpolate": true,
"frametime":1,
"frames":[{
"index":0,
"time": 0
},
1,2,3,4,5,6,4,2]
}
}
width and height are the size (in pixels) of a single frame.[1] interpolate (true/false) determines whether or not Minecraft should generate more frames in between two frames. frametime is the default delay to use between frames, with each increment being 50 milliseconds. frames is a list of frames indexes (with the first frame being 0), in the order they are to play in. index and time can be used together to specify a frame that should take a different amount of time than the default.
NOTE: All you really need to make a texture animated is the following code, though it will make each frame last only one frame:
{
"animation": {}
}
Save the file as the same name as the texture you want animated (like if you wanted to animate stone.png, you would save it as stone.png.mcmeta). It then needs to be placed in the same folder as your texture (maybe stone.png) is located in.
Texture Properties
{
"texture":{
"blur":false,
"clamp":true
}
}
This optional section can be added to your texture.png.mcmeta to add special properties to its textures. blur will allow the texture to blur when viewed close-up, and clamp will prevent the texture from repeating in situations where it otherwise might (this can most easily be seen when setting clamp to false in shadow.png.mcmeta - multiple shadows will appear under some mobs.)
Fonts
Character sizes in fonts are determined by the last line of pixels that contains pixels which contain a non-zero alpha. This allows additional padding to be added around characters by adding a color with an alpha level of 1, which Minecraft will consider as part of the character.
Packaging Resource Packs with your Maps
For using in single-player worlds, you can package your resource pack as a ZIP file named "resources.zip" inside your world directory [2]. This will then automatically be used when playing the single-player world.
Server Resource Packs
When complete, if administering a server, you may set it as a default resource pack on a multi-player server.
References
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||