Posted October 27, 20168 yr So I have a submodel that I'm using to represent some TE data and just changed from it being a boolean property to an integer (0-6). I'm perfectly happy copy-pasting the submodel json file 5 times and supplying slight variations on each, however I wanted to ask if it was possible to have variants in the model and just query that instead. My blockstate file looks like this atm: "salt_level": { "6": { "submodel": { "saltblock": { "model": "harderfarming:salt6" } } }, "5": { "submodel": { "saltblock": { "model": "harderfarming:salt5" } } }, "4": { "submodel": { "saltblock": { "model": "harderfarming:salt4" } } }, "3": { "submodel": { "saltblock": { "model": "harderfarming:salt3" } } }, "2": { "submodel": { "saltblock": { "model": "harderfarming:salt2" } } }, "1": { "submodel": { "saltblock": { "model": "harderfarming:salt1" } } }, "0": {} } Where each of those submodels would look like: { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "textures": { "0": "harderfarming:blocks/saltblock" }, "elements": [ { "name": "salt", "from": [ 5.0, 0.0, 5.0 ], "to": [ 11.0, 6.0, 11.0 ], "faces": { "north": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "east": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "south": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "west": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "up": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "down": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] } } } ] } Only that the "to" and UV values will differ slightly. I was just wondering if there was a cleaner/simpler way to do this. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 27, 20168 yr I'm not sure this will work, but maybe you can try to pas arguments to it like you with models. Like for example in a wall: "submodel": {"wall_north": {"model": "wall_side","uvlock": true}} So i would try this: "submodel": {"wall_north": {"model": "wall_side","uvlock": true},"var1":0, "var2":1} If i check this with the jsonlint it doesn't give errors so that's alright. Don't know if it will work. I would try it like this. Try out my new Modpack for MC 1.15.2 https://www.curseforge.com/minecraft/modpacks/terran-civilization
October 27, 20168 yr Author Mmmm....nope. Typed like that the game through a "could not find variant" message caused by "Not a JSON Object: 6.0". Shoving the var1/var2 stuff inside the } just to the left (so it was part of the submodel declaration) threw "Expected to[1] to be a Float, was "#height"" message instead. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 27, 20168 yr If each model has a different "to", then I think you need to stick to separate model files. The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
October 28, 20168 yr Author If each model has a different "to", then I think you need to stick to separate model files. That's what I figured, thought I'd ask. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.