tutorial:datagen_model
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
tutorial:datagen_model [2022/10/02 21:04] – nexus-dino | tutorial:datagen_model [2023/02/20 05:19] – [Addin Data Generation For a Directional Block] solidblock | ||
---|---|---|---|
Line 38: | Line 38: | ||
<code java> | <code java> | ||
- | public static Block SIMPLE_BLOCK = Registry.register(Registry.BLOCK, new Identifier(" | + | public static Block SIMPLE_BLOCK = Registry.register(Registries.BLOCK, new Identifier(" |
- | public static BlockItem SIMPLE_BLOCK_ITEM = Registry.register(Registry.ITEM, ..., new BlockItem(SIMPLE_BLOCK, | + | public static BlockItem SIMPLE_BLOCK_ITEM = Registry.register(Registries.ITEM, ..., new BlockItem(SIMPLE_BLOCK, |
// ... | // ... | ||
Line 49: | Line 49: | ||
Since a '' | Since a '' | ||
+ | |||
+ | ==== Strict Validation ==== | ||
+ | By default, data generation will throw an exception if the run did not generate blockstates for all blocks belonging to the processed mods. | ||
+ | Fabric API allows disabling this. To do so, edit your '' | ||
===== Adding Item Models ===== | ===== Adding Item Models ===== | ||
Line 57: | Line 61: | ||
<code java> | <code java> | ||
- | public static Block SIMPLE_BLOCK = Registry.register(Registry.BLOCK, new Identifier(" | + | public static Block SIMPLE_BLOCK = Registry.register(Registries.BLOCK, new Identifier(" |
- | public static BlockItem SIMPLE_BLOCK_ITEM = Registry.register(Registry.ITEM, ..., new BlockItem(SIMPLE_BLOCK, | + | public static BlockItem SIMPLE_BLOCK_ITEM = Registry.register(Registries.ITEM, ..., new BlockItem(SIMPLE_BLOCK, |
// ... | // ... | ||
Line 68: | Line 72: | ||
FIXME //**This is not done yet!!**// | FIXME //**This is not done yet!!**// | ||
- | ==== ADDING DATA GENERATION FOR A DIRECTIONAL BLOCK ==== | + | ==== Addin Data Generation For a Directional Block ==== |
**QUICK WARNING**: This is very complicated as heck!!! | **QUICK WARNING**: This is very complicated as heck!!! | ||
Line 79: | Line 83: | ||
@Override | @Override | ||
- | public void onInitialize() | + | public void onInitialize() { |
- | { | + | Registry.register(Registries.BLOCK, new Identifier(" |
- | Registry.register(Registry.BLOCK, new Identifier(" | + | |
} | } | ||
</ | </ |
tutorial/datagen_model.txt · Last modified: 2023/06/05 17:43 by mcrafterzz