your current location:首页 > news>Resource package production tutorial and its common problems #1 block and item articles [MC] My world's original (M

Resource package production tutorial and its common problems #1 block and item articles [MC] My world's original (M

2024-12-10 17:53:14|Myriagame |source:minecraft skins

This tutorial is set by the author's setting without permission.

Reminder

This tutorial is suitable for Minecraft 1.20.1, and it is not guaranteed to be completely applicable in other versions.

This tutorial only introduces the production of blocks related to items.

Preparation

If you need to change or draw texture, there is a software that can edit PNG files.It is recommended to use Photoshop, Aseprint, or Paint.net.

*Note: Aseprint can build or go to Steam by going to github or go to STEAM, or you can use it: libresprite.

If the model needs to be changed, the state when the block is selected, the location of the item, etc., you need a software that can edit the JSON file and edit JSON for modeling.It is recommended to use Visual Studio Code and Blockbench.

If you need to pack the resource package into a compressed file or observe its file structure or obtain texture by decompressing the original JAR file, a software that can compress the file is required.It is recommended to use bandzip.

File structure & Create Resource Package

By decomposing the original JAR file, we can find that there is a folder called Minecraft in the ASSETS folder, which is the name space of the original MC.It contains the texture, model and other documents in most games.

If the texture or model of the block and items need to be changed, we usually only need to keep the following folders:

Blockstates Father model folder (block state mapping folder), determine the model used by blocks (such as Chao) in different states;

Models model folder, determine the model or texture used by items or blocks;

Textures texture folder determines the texture of the item or block.

Next, we started creating a new resource package.

First, open the resource package folder (ResourcePacks) in the version of the folder, or open it through the option> resource package> open the resource package folder to open it.

Create a new folder and name it at will.

The resource package folder is generally composed of 2 to 3 files. The structure is as follows:

Pack.mcmeta: Resource package description file, including the introduction of the resource package in the resource package selection interface, the compatible version of the resource package, etc.

pack.png: Optional, cover the cover of the resource package.

Assets: The folder introduced above contains the texture, model and other files in most games.

Next, we open the ASSETS folder and create a new folder called Minecraft. This is the naming space in the original MC. It can be understood as the name of the items that contain the file.Research.

Create or paste the three folders (BLOCKSTATES, Models, TEXTURES) by the original JAR pasted,

Check whether it is correct, and the specific structure is shown below:

pack.mcmeta

pack.png (optional)

assets

Minecraft

blockStates (optional)

Models (optional)

Textures (optional)

pack.mcmeta file

This article only introduces how to fill in the common functions such as the introduction and version number. If you want to understand its deeper usage, please go to Minecraft Chinese Wiki.

template:

 {{

"PACK": {

"PACK_FORMAT": 1,

"Description": "test"

}

}

*Since the code format is not JSON in the MCMOD, the format is filled with JavaSript, but the actual format is JSON.

Among them, "PACK_FORMAT" is the applicable version (that is, the resource package version number) set by the set resource package.

Here are some commonly used resource package version numbers:

1.16.5: 6;

1.17: 7;

1.18.2: 8;

1.19.2: 9;

1.19.4: 13;

1.20.1: 15; 1.20.4: 22;

1.21.1: 34.

Note: If the resource package version number is different from the actual play version, a warning will be issued. This warning is just a reminder, which is generally ignored.

"Description" is the description of the resource package in the resource package list. It can use formatting text, and the resource package list shows up to two lines.

pack.png file

That is the resource package icon displayed in the resource package list.

Optional, if it is not added, the original version of the default icon is displayed.

If you add, it is best to be square.

The working principle of the model and texture of the block and the item

Before modifying the model of the items and blocks, we still need to understand how they work.

Blockstates folder

First, open the Blockstates folder, it is responsible for determining the model used in different states of each block (block state mapping)

Note: This article only introduces the Variants of BlockStates. If you want to know another type of block state mapping (Multipart), please go to Minecraft Chinese Wiki to check.

Take an anvil as an example: (located in ASSETS/MINECRAFT/BLOCKSTATES/Anvil.json))

Note: Do not use special characters such as Chinese in JSON files, otherwise it will cause the problem that the game cannot recognize after packing.It is recommended to use a lowercase English letters and the next line.

 {{

"Variants": {

"Facing = East": {

"Model": "Minecraft: Block/Anvil",

"Y": 270

},

"FACING = NORTH": {

"Model": "Minecraft: Block/Anvil",

"Y": 180

},

"FACING = SOUTH": {{

"Model": "Minecraft: Block/Anvil"

},

"FACING = WEST": {

"Model": "Minecraft: Block/Anvil",

"Y": 90

}

}

}

"Variants" is a block state mapping directly specifically specifying the block state.

In addition, "Variants" also contains multiple FACING (Iville Direction). This is the state of an avil. You can find it in F3:

It can be seen that at this time, the Facing of the Ivillery was south.

Re -view the clock status code code of the Ivic. The model used when "FACING = SOUTH" (that is, the candidate model) is "Model": "Minecraft: Block/Anvil".Looking at other states of the Ivillery in the code, we can see that they have an additional "Y": , at this time the model will rotate by the Y -axis (must be a multiples of 90 °).

Models folder

Next, open the Models folder, which is responsible for determining the model used by items or blocks.

There are 2 folders:

item: The model used to determine the item (directly by the game);

Block: The model used to determine the block (being called in BlockStates).

Next, we use BlockBench to open the Model (JSON) file (JSON) file (located in Assets/Minecraft/Item/ACACIA_BOAT.JSON)

*Note: It is just recommended to edit the use of blockbench. Of course, if you want to rub the JSON file in hand, it is not impossible.

We can observe the texture of the call in the lower left corner.

Texture folder

Open the Texture folder, it is responsible for the texture called by the storage model.

It contains multiple folders, we only introduce parts:

Block: Contains the texture of all blocks;

Entity: The texture of most entities and block entities;

Environment: contains the texture of the sun, the moon;

FONT: Contains the original font texture;

GUI: Contains the original GUI texture;

item: contains all items texture;

MAP: Including texture such as the interface of the map;

MISC: Including the mask texture after bringing the pumpkin head, etc.;

MOB Effect: The texture of the effect icon;

Models: The texture of the armor;

Painting: The texture of the painting;

Particle: The texture of the particle effect.

The texture file is png format.

Note: Do not use special characters such as Chinese in PNG files, otherwise it will cause the problem that the game cannot recognize after packing.It is recommended to use a lowercase English letters and the next line.

Packing and distribution

Resource packages can be identified by game folders in various ways. Two common methods:

ZIP compression file: The compression software can be used to compress the folder to the ZIP compression file.

Note: If the folder name contains special characters such as Chinese, it will cause compression to ZIP files that cannot be recognized.

Folder: The resource package can be stored directly in the form of a folder.

Of course, we can also put some words or protocol information in the folder in the same level as ASSETS:

pack.mcmeta

pack.png (optional)

assets

What you want to say .md or readme.txt, etc. (optional)