I was following the tutorial (https://fabricmc.net/wiki/tutorial:datagen_model) to generate block models, but as it says it's incomplete.
In my use case, my block has a block state with a single EnumProperty ("char"), and I have a different texture for each enum. The idea is the block will display a selected character (A-Z, 0-9 or space), I have a texture for each possible character.
Since I will also be making the block directional at some point, and I already have 37 different textures, it seemed best to use the datagen to generate the block state / models rather than do it all manually.
In my FabricModelProvider implementing class, I have this so far generating the block state models:
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
MultipartBlockStateSupplier multiPartBlockStateSupplier = MultipartBlockStateSupplier.create(LargeSignBlock.LARGE_SIGN_BLOCK);
for (LargeSignCharacter character : LargeSignCharacter.values()) {
multiPartBlockStateSupplier = multiPartBlockStateSupplier
.with(When.create().set(LargeSignBlock.CHAR, character),
BlockStateVariant.create().put(
VariantSettings.MODEL,
character.getIdentifier()));
}
blockStateModelGenerator.blockStateCollector.accept(multiPartBlockStateSupplier);
}
This has generated a blockstate file, that looks correct. Here is the start of it:
{
"multipart": [
{
"apply": {
"model": "jordanl2:large_sign_space"
},
"when": {
"char": "space"
}
},
{
"apply": {
"model": "jordanl2:large_sign_a"
},
"when": {
"char": "a"
}
},
However, no models have been generated, and I'm not sure what I'm meant to do next. To start with, I'm fine with just cubes with the selected texture.