TOP > Tutorial list > Minecraft MOD Add ItemBlock resources [1.10.2/1.12.2]
posted 2 May 2018

This time is a tutorial for adding ItemBlock resources in Minecraft JE.
Like vanilla Dirt and Brick, ItemBlock is drawn in 3D. This time, I will explain the mechanism.
Usually it is used in ItemBlock, but it can also be applied to common items.
Specifically, vanilla Apple can be 3D by rewriting them to resources using ItemBlock. In ChinjufuMod, there are 3D items such as a Modeled clay_KYUSU and an Egg sandwich.
The source of ChinjufuMod is released on GitHub. If you are interested please visit there.
1. Files relationship in ItemBlock resource
In ItemBlock, the following three files have a relationship.
·.json file used for display as a Block
·.png file used for display as a Block
·.json file used for display as an ItemBlock
Taking a Diorite brick(block_bricks_dio_c) of ChinjufuMod as an example, three files make a relationship like the image.
A class which is a block design is linked by RegistryName or UnlocalizedName. And, it is the .json file in the item package that we call by linking.
2. Basic of drawing ItemBlock
Here, I will do a tutorial, taking as an example a Diorite brick(block_bricks_dio_c) which is a simple model among ChinjufuMod.
2-1. Drawing a Block
It is a premise that ItemBlock has drawing of the block.
For a Diorite brick(block_bricks_dio_c), I use the following .json file.
chinjufumod:block/block_brick_dio_c.json
“parent”: “block/cube_all” calls a cube of vanilla, which puts the same texture on the six faces. Furthermore, using “all”: “chinjufumod:blocks/stonebrick_dio”, I have designated stonebrick_dio.png in ChinjufuMod on all faces.
2-2. Drawing a ItemBlock
Drawing of ItemBlock is done by calling the drawing of the block.
chinjufumod:item/block_brick_dio_c.json
|
“parent”: “chinjufumod: block / block_brick_dio_c” calls block_brick_dio_c.json in the block package of ChinjufuMod.
3. Change size and angle of ItemBlock
Next is a tutorial about “display tag” used to change ItemBlock size and angle.
“display tag” is used in .json file of item package, which instructs display of ItemBlock.
For the display tag, it is possible to change the size and angle for the following matters.
・gui・・・Inventory display
・thirdperson_righthand・・・Right hand holding of third person viewpoint
・thirdperson_lefthand・・・Left hand holding of third person viewpoint
・firstperson_righthand・・・Right hand holding of first person viewpoint
・firstperson_lefthand・・・Left hand holding of first person viewpoint
・head・・・When wore on the head
・ground・・・When dropped
・fixed・・・When decorated on the picture frame
For this time, I will explain about change of size and angle of ItemBlock, taking Curry and rice set menu(block_food_curryset_1) of ChinjufuMod as an example.
chinjufumod:item/block_food_curryset_1.json
|
Curry and rice set menu(block_food_curryset_1) is a thinner block than a Half slab. Therefore, if you just call the model of the block, its ItemBlock will become small like the image.
3-1. Change angle by rotation
By using “rotation tag” you can rotate around [x axis, y axis, z axis].
|
It changes not only to the angle of ItemBlock but also to the size. The reason for this is that the use of the “display tag” has left off the default rule.
3-2. Change display position by translation
By using “translation tag”, you can change the display position to the [x direction, y direction, z direction].
|
The range that can be changed is from -80 to +80. It is also possible to draw ItemBlock out of the inventory.
3-3. Change display size by scale
By using “scale tag”, you can change the size to [x direction, y direction, z direction].
|
For each axis, it is possible to extend the size up to 4.0. You can also change the aspect ratio of ItemBlock.
Summary
As I said at the beginning, the drawing method used in ItemBlock can also be applied to common items. There is no rule such as “the item is a flat type, ItemBlock is a 3D type”.
I prepared a file that overwrites vanilla’s apple.json like the image and tried calling the apple’s 3D model.
About working with the displey tag, I think at first it is hard to image the relationship between numbers and drawing. First, let’s grasp the feeling by trial and error.
このチュートリアルは参考になりましたか? シェアはこちらをご利用ください。
Was this tutorial helpful? Please use here for market share.
当サイトは年間6,480円のサーバー代がかかるため、投げ銭をしてもらえると助かります。
This site costs 6,480 yen per year for server fee. It will be helpful if you make a donation.
Bitcoinで投げ銭をする Bitcoin donations
MONAで投げ銭をする MONA donations
