https://forge.gemwire.uk/index.php?title=Datageneration/States_and_Models&feed=atom&action=historyDatageneration/States and Models - Revision history2024-03-29T09:23:38ZRevision history for this page on the wikiMediaWiki 1.35.0https://forge.gemwire.uk/index.php?title=Datageneration/States_and_Models&diff=3110&oldid=prevChampionAsh5357: Update to 1.182022-01-12T13:50:04Z<p>Update to 1.18</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:50, 12 January 2022</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l13" >Line 13:</td>
<td colspan="2" class="diff-lineno">Line 13:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>There are three main abstract implementations of <code>ModelProvider</code>: <code>ItemModelProvider</code>, <code>BlockModelProvider</code>, and <code>BlockStateProvider</code>.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>There are three main abstract implementations of <code>ModelProvider</code>: <code>ItemModelProvider</code>, <code>BlockModelProvider</code>, and <code>BlockStateProvider</code>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>For items, use <code>ItemModelProvider</code> to define their models: override <code>#<del class="diffchange diffchange-inline">generateModels</del></code> and use the helper methods.</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>For items, use <code>ItemModelProvider</code> to define their models: override <code>#<ins class="diffchange diffchange-inline">registerModels</ins></code> and use the helper methods.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>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.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>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.</div></td></tr>
</table>ChampionAsh5357https://forge.gemwire.uk/index.php?title=Datageneration/States_and_Models&diff=2629&oldid=prevShrimpBot: Categorize with Category:Data Generation by SizableShrimp#07552021-05-19T00:59:29Z<p>Categorize with <a href="/index.php?title=Category:Data_Generation&action=tinymceedit&redlink=1" class="new" title="Category:Data Generation (page does not exist)">Category:Data Generation</a> by SizableShrimp#0755</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:59, 19 May 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l18" >Line 18:</td>
<td colspan="2" class="diff-lineno">Line 18:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Call <code><nowiki>#getVariantBuilder(Block)</nowiki></code> to get a <code><nowiki>VariantBlockStateBuilder</nowiki></code> for building a blockstate with different variants, or <code><nowiki>#getMultipartBuilder(Block)</nowiki></code> to get a <code>MultiPartBlockStateBuilder</code> for building a blockstate using multiparts.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Call <code><nowiki>#getVariantBuilder(Block)</nowiki></code> to get a <code><nowiki>VariantBlockStateBuilder</nowiki></code> for building a blockstate with different variants, or <code><nowiki>#getMultipartBuilder(Block)</nowiki></code> to get a <code>MultiPartBlockStateBuilder</code> for building a blockstate using multiparts.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Data Generation]]</ins></div></td></tr>
</table>ShrimpBothttps://forge.gemwire.uk/index.php?title=Datageneration/States_and_Models&diff=2171&oldid=prevUnbekannt: Inital Import dokuwiki2020-10-25T11:10:56Z<p>Inital Import dokuwiki</p>
<p><b>New page</b></p><div>The model providers are a specific type of data generators for defining models. All model providers are a subclass of <code>ModelProvider</code>.<br />
<br />
<code>ModelProvider</code> provides methods to define models for blocks and items alike: cubes, single textures, doors, slabs, and even custom non-data-generated models as parent models.<br />
<br />
== Existing Files ==<br />
All references to textures or other data files not generated for data generation must reference existing files on the system. This is to ensure that all referenced textures are in the correct places, so typos can be found and corrected.<br />
<br />
<code>ExistingFileHelper</code> is the class responsible for validating the existence of those data files. An instance can be retrieved from <code><nowiki>GatherDataEvent#getExistingFileHelper()</nowiki></code>.<br />
<br />
The <code><nowiki>--existing <folderpath></nowiki></code> argument allows the specified folder and its subfolders to be used when validating the existence of files. By default, only the vanilla datapack and resources are available to the <code>ExistingFileHelper</code>.<br />
<br />
== Implementation ==<br />
There are three main abstract implementations of <code>ModelProvider</code>: <code>ItemModelProvider</code>, <code>BlockModelProvider</code>, and <code>BlockStateProvider</code>.<br />
<br />
For items, use <code>ItemModelProvider</code> to define their models: override <code>#generateModels</code> and use the helper methods.<br />
<br />
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.<br />
<br />
Call <code><nowiki>#getVariantBuilder(Block)</nowiki></code> to get a <code><nowiki>VariantBlockStateBuilder</nowiki></code> for building a blockstate with different variants, or <code><nowiki>#getMultipartBuilder(Block)</nowiki></code> to get a <code>MultiPartBlockStateBuilder</code> for building a blockstate using multiparts.</div>Unbekannt