Posted May 22, 20223 yr I have a crop that has AGE property that changes from 0 to 29. There are 5 different block models: Stage 0 - AGE from 0 to 5 Stage 1 - AGE from 6 to 11 Stage 2 - AGE from 12 to 17 Stage 3 - AGE from 18 to 23 Stage 4 - AGE from 24 to 29 For every stage there is a different model. My blockstate JSON file looks like this: { "variants":{ "age=0" : { "model" : "experimentalmod:block/fruit_plant_stage_0" }, "age=1" : { "model" : "experimentalmod:block/fruit_plant_stage_0" }, "age=2" : { "model" : "experimentalmod:block/fruit_plant_stage_0" }, "age=3" : { "model" : "experimentalmod:block/fruit_plant_stage_0" }, "age=4" : { "model" : "experimentalmod:block/fruit_plant_stage_0" }, "age=5" : { "model" : "experimentalmod:block/fruit_plant_stage_0" }, "age=6" : { "model" : "experimentalmod:block/fruit_plant_stage_1" }, "age=7" : { "model" : "experimentalmod:block/fruit_plant_stage_1" }, "age=8" : { "model" : "experimentalmod:block/fruit_plant_stage_1" }, "age=9" : { "model" : "experimentalmod:block/fruit_plant_stage_1" }, "age=10" : { "model" : "experimentalmod:block/fruit_plant_stage_1" }, "age=11" : { "model" : "experimentalmod:block/fruit_plant_stage_1" }, ... } } Although this works, I find it terrible from the code quality perspective. I have searched for any clues on how to use same model for different variants but without success. Is there a way to say: For AGE values from 0 to 5 use model fruit_plant_stage_0 For AGE values from 6 to 11 use model fruit_plant_stage_1 ...etc Thanks
May 22, 20223 yr Author @diesieben07 Adding data generator for this is def something I had in plan, but I am not sure if this is most optimized JSON output, regardless if it is manual or auto generated. Can it be improved / regrouped in a way I have envisioned to have multiple variants point to same model?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.