Minecraft MOD Add Custom Blocks for 1.10.2

TOP > Tutorial list > Minecraft MOD Add Custom Blocks for 1.10.2


updated 2 May 2018 – posted 23 April 2018

This time is MOD production tutorial for Minecraft JE version 1.10.2.

About the method of adding blocks, I will explain while watching the source of Chinjufu MOD.

There are points to note about the source posted in the link in the article. In order to avoid confusion of explanation, I deleted unnecessary sources.

The source of Chinjufu MOD is released on GitHub. If you are interested please visit there.

 

1. Case of adding a block

First of all, let’s take a tutorial about adding a custom block. I use ‘Empty box’ of Chinjufu MOD as an example.

 

1-1. Classes relationship and link to each source

In ChinjufuMod[1.10.2], the classes for adding blocks are divided for each role. Each classes make relationship like the image like by using reference.

The source is on the links of the image map. Recommend maximize the window.

Case of adding a block 1.10.2

Reference.java ChinjufuMod.java CommonProxy.java ClientProxy.java RecipeHandler.java CraftingCBlocks ChinjufuModBlocks.java BlockEmptyBox.java

Unlike items, blocks have characteristics such as material and sound effects. Therefore, it always have a class (= design drawing of block).

 

1-2. 8 sheets is a results of division for each role

The roles of each class are as follows.

ChinjufuMod.java Create an instance of Mod.
Register Blocks and ItemBlocks.
Reference.java Management of frequently referenced values
CommonProxy.java Processing on server
ClientProxy.java Processing on client. Register rendering of ItemBlocks.
ChinjufuModBlocks.java Manage registration of Blocks and ItemBlocks.
BlockEmptyBox.java Design of individual block
RecipeHandler.java Manage recipes
CraftingCBlocks.java Design of individual recipe

First time Minecraft MOD producer may think that “Do you use 8 sheets?”. Also, if you want to do so, it is also possible to combine it into one sheet.

However, if you think about adding some blocks, it is easier to divide the class for each role.

 

2. Case of adding some blocks

Next, there is a tutorial when there are multiple blocks to be added.

From the state added ‘Empty box’ of Chinjufu MOD, I will continue to add the ‘Steel Block’ of Chinjufu MOD.

 

2-1. Classes relationship and link to each source

When you add some blocks, the relationship of the classes looks like the image in ChinjufuMod[1.10.2].

The source is on the links of the image map. Recommend maximize the window.

Case of adding some Items 1.10.2

Reference.java ChinjufuMod.java CommonProxy.java ClientProxy.java RecipeHandler.java CraftingCBlocks.java ChinjufuModBlocks.java BlockEmptyBox.java BlockSteelBlock.java

If you divide the class for each role in advance, only the 3 classes that changed red when new blocks are added. You do not have to touch others.

On the other hand, If you do not use references, you will need to write duplicate code in each classes.

 

Summary

If you do a test after the tutorial so far, it should be like a image.

Test of adding blocks 1.10.2

It is purple because it does not touch resources (such as texture or block name). However, if blocks can be added, they are displayed like the image.。

For adding blocks in 1.10.2、I think that it is easy to work because it is similar to the addition of items with a class.


このチュートリアルは参考になりましたか? シェアはこちらをご利用ください。
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

¥
Personal Info

Terms

Donation Total: ¥100

MONAで投げ銭をする MONA donations
MONAで投げ銭をする MONA donations. tipmonaとは?

コメントを残す

メールアドレスが公開されることはありません。

コメント

お名前

ウェブサイトURL

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください