wehttam664 Posted April 2, 2016 Share Posted April 2, 2016 I'm relatively new with using custom BakedQuads, but, rather than make 2^6^16 combinations of block states for rendering, I figured it was an easier method. I cannot, however, get them to render the correct way. No matter what I do to the numbers, the texture is displayed facing downward. I have a the following inside of IBakedModel#getQuads override. TextureAtlasSprite texture = ItemPanel.getTextureOf(panelUp); int color = Color.WHITE.getRGB(); quads.add(new BakedQuad(Ints.concat( vertexToInts(1/16f , 15/16f, 1/16f , color, texture, 0 , 0 ), vertexToInts(15/16f, 15/16f, 1/16f , color, texture, 16, 0 ), vertexToInts(15/16f, 15/16f, 15/16f, color, texture, 16, 16), vertexToInts(1/16f , 15/16f, 15/16f, color, texture, 0 ,16) ), 0, EnumFacing.UP, texture, false, format)); vertexToInts: public static int[] vertexToInts(float x, float y, float z, int color, TextureAtlasSprite texture, float u, float v) { return new int[] { Float.floatToRawIntBits(x), Float.floatToRawIntBits(y), Float.floatToRawIntBits(z), color, Float.floatToRawIntBits(texture.getInterpolatedU(u)), Float.floatToRawIntBits(texture.getInterpolatedV(v)), 0 }; } All other quads come from baked model components and render fine. Why is this texture facing down? It seems the EnumFacing parameter in BakedQuad.<init> does nothing (I tried other values), so what am I doing wrong? EDIT: This issue also happens with EAST- and NORTH-sided panels facing WEST and SOUTH respectively. Quote Link to comment Share on other sites More sharing options...
Draco18s Posted April 2, 2016 Share Posted April 2, 2016 I'm relatively new with using custom BakedQuads, but, rather than make 2^6^16 combinations of block states for rendering, I figured it was an easier Why the hell do you need 22,821,109,907,456 states? That's more baked models than the game even supports. Quote 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. Link to comment Share on other sites More sharing options...
wehttam664 Posted April 2, 2016 Author Share Posted April 2, 2016 I need that many combinations. 2 from the possibility of a side having a panel on or off. 6 from each of the six sides. 16 possible panels (including no panel). I may have done the math wrong, but it's still a ridiculous number of combinations for the block. No matter the number of combinations, I do need this solved... Quote Link to comment Share on other sites More sharing options...
wehttam664 Posted April 2, 2016 Author Share Posted April 2, 2016 That will work a whole lot better, thank you. Question now is can models be parented to these forge blockstate variants, or do I have to do a lot redundant typing? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.