User Tools

Site Tools


tutorial:custom_model

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:custom_model [2020/08/13 23:17] technici4ntutorial:custom_model [2020/08/13 23:21] technici4n
Line 1: Line 1:
-====== Creating a custom block model (DRAFT) ======+====== Creating a custom block model ======
 It is possible to add models to the game using block model JSON files, but it is also possible to render them through Java code. In this tutorial, we will add a four-sided furnace model to the game. It is possible to add models to the game using block model JSON files, but it is also possible to render them through Java code. In this tutorial, we will add a four-sided furnace model to the game.
  
Line 199: Line 199:
 We will re-use the same model class, with a few changes: We will re-use the same model class, with a few changes:
   * We will register the same model instance under a different name, so we'll make sure the model is only baked once.   * We will register the same model instance under a different name, so we'll make sure the model is only baked once.
-  * We will need a `ModelTransformationthat rotates/translates/scales the model depending on its position (in right hand, in left hand, in gui, in item frame, etc...). As we are creating a model for a regular block, we will use the one from "minecraft:block/block" which we will load during model baking.+  * We will need a ''ModelTransformation'' that rotates/translates/scales the model depending on its position (in right hand, in left hand, in gui, in item frame, etc...). As we are creating a model for a regular block, we will use the one from "minecraft:block/block" which we will load during model baking.
  
 We will update our ''FourSidedFurnaceModel'' class as follows: We will update our ''FourSidedFurnaceModel'' class as follows:
Line 270: Line 270:
     }     }
 } }
-</code java>+</code>
  
 ===== Final result ===== ===== Final result =====
 {{:tutorial:four_sided_furnace_render_final.png?nolink&600|}} {{:tutorial:four_sided_furnace_render_final.png?nolink&600|}}
 +
 Et voilà! Enjoy! Et voilà! Enjoy!
tutorial/custom_model.txt · Last modified: 2024/04/27 08:58 by florens