Changes

Update to 1.18
Line 13: Line 13:  
There are three main abstract implementations of <code>ModelProvider</code>: <code>ItemModelProvider</code>, <code>BlockModelProvider</code>, and <code>BlockStateProvider</code>.
 
There are three main abstract implementations of <code>ModelProvider</code>: <code>ItemModelProvider</code>, <code>BlockModelProvider</code>, and <code>BlockStateProvider</code>.
   −
For items, use <code>ItemModelProvider</code> to define their models: override <code>#generateModels</code> and use the helper methods.
+
For items, use <code>ItemModelProvider</code> to define their models: override <code>#registerModels</code> and use the helper methods.
    
For blocks, it is recommended to use <code>BlockStateProvider</code> to define the blockstates, models, and their item models in a single class. It contains an instance of both <code>BlockModelProvider</code> and <code>ItemModelProvider</code>, which can be accessed through <code>#models()</code> and <code><nowiki>#itemModels()</nowiki></code>. <code>BlockModelProvider</code> is used to define only block models.
 
For blocks, it is recommended to use <code>BlockStateProvider</code> to define the blockstates, models, and their item models in a single class. It contains an instance of both <code>BlockModelProvider</code> and <code>ItemModelProvider</code>, which can be accessed through <code>#models()</code> and <code><nowiki>#itemModels()</nowiki></code>. <code>BlockModelProvider</code> is used to define only block models.