I have the following startup script snippet:
const block = e
.create(id)
.property(BlockProperties.ROTATION_16)
...
block.modelJson = {
parent: 'kubejs:block/base_ingot_cast',
textures: { base: baseTexture },
}
let variants = {}
for (let rotation = 0; rotation < 16; ++rotation) {
variants[`rotation=${rotation}`] = {
model: 'kubejs:block/base_ingot_cast',
y: (rotation * 360) / 16,
}
}
block.blockstateJson = {
variants: variants,
}
base_ingot_cast.json is a block model with a parameterized texture in it, so I'm using this to autogenerate textures for all the ingot casts that I need with the right texture. I would also like this ingot to be placeable with ROTATION_16, so that means I need the right block state declaration. It seems to me like this should work. In logs though, I'm getting errors that seem to be looking for a different model name:
[03Aug2024 19:00:12.355] [Worker-ResourceReload-16/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'kubejs:blockstates/unfired_ingot_cast.json' missing model for variant: 'kubejs:unfired_ingot_cast#rotation=15'
[03Aug2024 19:00:12.355] [Worker-ResourceReload-16/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'kubejs:blockstates/unfired_ingot_cast.json' missing model for variant: 'kubejs:unfired_ingot_cast#rotation=12'
[03Aug2024 19:00:12.355] [Worker-ResourceReload-16/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'kubejs:blockstates/unfired_ingot_cast.json' missing model for variant: 'kubejs:unfired_ingot_cast#rotation=11'
[03Aug2024 19:00:12.355] [Worker-ResourceReload-16/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'kubejs:blockstates/unfired_ingot_cast.json' missing model for variant: 'kubejs:unfired_ingot_cast#rotation=14'
[03Aug2024 19:00:12.355] [Worker-ResourceReload-16/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'kubejs:blockstates/unfired_ingot_cast.json' missing model for variant: 'kubejs:unfired_ingot_cast#rotation=13'
[03Aug2024 19:00:12.355] [Worker-ResourceReload-16/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'kubejs:blockstates/unfired_ingot_cast.json' missing model for variant: 'kubejs:unfired_ingot_cast#rotation=10'
Is it possible to force it to reference that base model instead (keeping the parameterized texture in the model)?