I've experienced a similar issue.
I haven't seen your code, but if you enter this inModBlockStateProvider.java,
it should fix the problem you're facing!
I hope your problem gets resolved!
makeCustomFlowerBlock(ModBlocks.CUSTOMFLOWER.get(), "customflower_bottom", "customflower_top");
public void makeCustomflowerBlock(Block block, String lowerModelName, String upperModelName) {
Function<BlockState, ConfiguredModel[]> function = state -> customflowerStates(state, block, lowerModelName, upperModelName);
getVariantBuilder(block).forAllStates(function);
}
private ConfiguredModel[] customflowerStates(BlockState state, Block block, String lowerModelName, String upperModelName) {
DoubleBlockHalf blockHalf = state.getValue(TallFlowerBlock.HALF);
List<ConfiguredModel> models = new ArrayList<>();
if (blockHalf == DoubleBlockHalf.LOWER) {
models.add(new ConfiguredModel(models().cross(lowerModelName,
new ResourceLocation(TutorialMod.MOD_ID, "block/" + lowerModelName)).renderType("cutout")));
} else if (blockHalf == DoubleBlockHalf.UPPER) {
models.add(new ConfiguredModel(models().cross(upperModelName,
new ResourceLocation(TutorialMod.MOD_ID, "block/" + upperModelName)).renderType("cutout")));
}
return models.toArray(new ConfiguredModel[0]);
}
modblocks.java :
public static final RegistryObject<Block> CUSTOMFLOWER = registerBlock("customflower",
() -> new TallFlowerBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY).noOcclusion().noCollission()));