Posted October 11, 20195 yr Ok, so I've created a custom block model (Using rftools powercell for now, this is for private use only), and there seems to be some rendering problems. I believe the objs. are correct as I copied it from RFTools, but there has to be something in my block class that isn't right. Here is the photos: https://imgur.com/a/TruBHx5 What's wrong here? Block Class (Relevant code) @Override public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { return this.getDefaultState().withProperty(FACING, EnumFacing.getDirectionFromEntityLiving(pos, placer)); } @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, FACING); } @Override public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(FACING, EnumFacing.byIndex(meta & 7)); } @Override public int getMetaFromState(IBlockState state) { return 0; } @Override public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer) { return layer == BlockRenderLayer.TRANSLUCENT; } @Override public boolean isOpaqueCube(IBlockState state) { return false; }
October 11, 20195 yr Author I tried to return getDefaultState() in getStateFromMeta, but it still doesn't work.
October 11, 20195 yr Could you show me the Json file? Also, what version are you using? Fancy 3D Graphing Calculator mod, with many different coordinate systems. Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.
October 11, 20195 yr Author I'm using forge 1.12.2 2838, and here is the .obj file, the json is just the blockstates: # Blender v2.67 (sub 0) OBJ File: 'powercell.blend' # www.blender.org mtllib infinode_receiver.mtl o Cube.001_Cube.000 v 0.100000 0.000000 0.000000 v 0.000000 0.000000 0.000000 v 0.000000 0.100000 0.000000 v 0.099997 0.100000 0.000000 v 0.100000 0.000000 1.000000 v 0.000000 0.000000 1.000000 v 0.099997 0.100000 1.000000 v 0.000000 0.100000 1.000000 v 0.000000 0.900000 1.000000 v 0.099997 0.900000 1.000000 v 0.000000 0.100000 1.000000 v 0.100000 0.100000 1.000000 v 0.099997 0.900000 0.900000 v 0.000000 0.900000 0.900000 v 0.000000 0.100000 0.900000 v 0.100000 0.100000 0.900000 v 1.000000 0.000000 0.000000 v 0.999997 0.100000 0.000000 v 1.000000 0.000000 1.000000 v 0.999997 0.100000 1.000000 v 0.900000 0.000000 0.000000 v 0.899997 0.100000 0.000000 v 0.900000 0.000000 0.100000 v 0.100000 0.000000 0.100000 v 0.899997 0.100000 0.100000 v 0.100000 0.100000 0.100000 v 0.900000 0.000000 0.900000 v 0.100000 0.000000 0.900000 v 0.100000 0.100000 0.900000 v 0.899997 0.100000 0.900000 v 0.900000 0.000000 1.000000 v 0.899997 0.100000 1.000000 v 0.000000 0.900000 0.000000 v 0.000000 1.000000 0.000000 v 0.099997 1.000000 0.000000 v 0.100000 0.900000 1.000000 v 0.000000 0.900000 1.000000 v 0.099997 1.000000 1.000000 v 0.000000 1.000000 1.000000 v 1.000000 0.900000 0.000000 v 0.999997 1.000000 0.000000 v 1.000000 0.900000 1.000000 v 0.999997 1.000000 1.000000 v 0.180000 0.820000 0.820000 v 0.819998 0.820000 0.820000 v 0.180000 0.180000 0.820000 v 0.820000 0.180000 0.820000 v 0.819998 0.820000 0.180000 v 0.180000 0.820000 0.180000 v 0.180000 0.180000 0.180000 v 0.820000 0.180000 0.180000 v 1.000000 0.100000 0.900000 v 0.900000 0.100000 0.900000 v 0.900000 0.900000 0.900000 v 0.999997 0.900000 0.900000 v 1.000000 0.100000 1.000000 v 0.900000 0.100000 1.000000 v 0.999997 0.900000 1.000000 v 0.900000 0.900000 1.000000 v 0.900000 0.900000 0.100000 v 0.900000 0.900000 0.000000 v 0.100000 0.900000 0.000000 v 0.899997 1.000000 0.000000 v 0.999997 0.900000 0.100000 v 0.900000 0.900000 0.100000 v 0.100000 0.900000 0.100000 v 0.899997 1.000000 0.100000 v 0.100000 1.000000 0.100000 v 0.900000 0.100000 0.100000 v 1.000000 0.100000 0.100000 v 0.999997 0.900000 0.000000 v 0.900000 0.900000 0.000000 v 0.900000 0.900000 0.900000 v 0.900000 0.100000 0.000000 v 1.000000 0.100000 0.000000 v 0.100000 0.900000 0.900000 v 0.100000 0.100000 0.000000 v 0.000000 0.100000 0.000000 v 0.000000 0.900000 0.000000 v 0.100000 1.000000 0.900000 v 0.099997 0.900000 0.000000 v 0.100000 0.100000 0.100000 v 0.899997 1.000000 0.900000 v 0.000000 0.100000 0.100000 v 0.900000 0.900000 1.000000 v 0.099997 0.900000 0.100000 v 0.899997 1.000000 1.000000 v 0.000000 0.900000 0.100000 v 0.090000 0.900000 0.950000 v 0.890000 0.900000 0.950000 v 0.090000 0.100000 0.950000 v 0.890000 0.100000 0.950000 v 0.090000 0.900000 0.050000 v 0.890000 0.900000 0.050000 v 0.090000 0.100000 0.050000 v 0.890000 0.100000 0.050000 v 0.950000 0.900000 0.100000 v 0.950000 0.900000 0.900000 v 0.950000 0.100000 0.100000 v 0.950000 0.100000 0.900000 v 0.050000 0.900000 0.100000 v 0.050000 0.900000 0.900000 v 0.050000 0.100000 0.100000 v 0.050000 0.100000 0.900000 v 0.900000 0.950000 0.100000 v 0.900000 0.950000 0.900000 v 0.100000 0.950000 0.100000 v 0.100000 0.950000 0.900000 v 0.900000 0.050000 0.100000 v 0.900000 0.050000 0.900000 v 0.100000 0.050000 0.100000 v 0.100000 0.050000 0.900000 vt 0.898665 0.898665 vt 0.101335 0.898665 vt 0.101335 0.101335 vt 0.898665 0.101335 vt 0.057544 0.923006 vt 0.057544 0.520138 vt 0.007544 0.520138 vt 0.007544 0.923006 vt 0.055700 0.712158 vt 0.055701 0.309290 vt 0.005701 0.309290 vt 0.005701 0.712158 vt 0.340046 0.995224 vt 0.290048 0.995224 vt 0.290048 0.944865 vt 0.340046 0.944865 vt 0.284183 0.993007 vt 0.234185 0.993007 vt 0.234185 0.942648 vt 0.284185 0.942648 vt 0.340048 0.995224 vt 0.340048 0.944865 vt 0.593650 0.997096 vt 0.193652 0.997096 vt 0.193652 0.946737 vt 0.593652 0.946737 vt 0.743105 0.738513 vt 0.741698 0.252015 vt 0.254441 0.250597 vt 0.254441 0.742766 vt 0.859001 0.996529 vt 0.809003 0.996529 vt 0.809003 0.946171 vt 0.859003 0.946171 vt 0.532349 0.994758 vt 0.132350 0.994758 vt 0.132350 0.944399 vt 0.532350 0.944399 vt 0.054075 0.895375 vt 0.054075 0.391790 vt 0.004076 0.391790 vt 0.004075 0.895375 vt 0.055977 0.899981 vt 0.005978 0.899981 vt 0.005978 0.396396 vt 0.055977 0.396396 vt 0.373806 0.994428 vt 0.373807 0.944069 vt 0.323808 0.944069 vt 0.323808 0.994428 vt 0.657381 0.998123 vt 0.657382 0.947765 vt 0.157382 0.947765 vt 0.157382 0.998123 vt 0.613054 0.991585 vt 0.113055 0.991585 vt 0.113055 0.941226 vt 0.613055 0.941226 vt 0.058703 0.882699 vt 0.058703 0.379114 vt 0.008703 0.379114 vt 0.008703 0.882699 vt 0.052187 0.978476 vt 0.002188 0.978476 vt 0.002188 0.474891 vt 0.052188 0.474891 vt 0.291613 0.993825 vt 0.291615 0.943467 vt 0.241615 0.943467 vt 0.241615 0.993825 vt 0.331727 0.994701 vt 0.281729 0.994701 vt 0.281729 0.944342 vt 0.331729 0.944342 vt 0.711535 0.999237 vt 0.711536 0.948879 vt 0.211536 0.948879 vt 0.211536 0.999237 vt 0.622720 0.994876 vt 0.122721 0.994876 vt 0.122721 0.944518 vt 0.622721 0.944518 vt 0.630345 0.994577 vt 0.630345 0.944218 vt 0.230345 0.944218 vt 0.230345 0.994577 vt 0.661294 0.993330 vt 0.261295 0.993330 vt 0.261295 0.942972 vt 0.661295 0.942972 vt 0.557953 0.989635 vt 0.557955 0.939276 vt 0.157955 0.939276 vt 0.157955 0.989635 vt 0.448256 0.996926 vt 0.448256 0.946568 vt 0.048256 0.946568 vt 0.048256 0.996926 vt 0.639103 0.994314 vt 0.239103 0.994314 vt 0.239103 0.943956 vt 0.639103 0.943956 vt 0.530145 0.997972 vt 0.530146 0.947613 vt 0.130146 0.947613 vt 0.130146 0.997972 vt 0.634286 0.992929 vt 0.234288 0.992929 vt 0.234288 0.942571 vt 0.634288 0.942571 vt 0.051524 0.915215 vt 0.051524 0.411630 vt 0.001524 0.411630 vt 0.001524 0.915215 vt 0.055480 0.928587 vt 0.005480 0.928587 vt 0.005480 0.425002 vt 0.055480 0.425002 vt 0.438803 0.995060 vt 0.438804 0.944702 vt 0.388804 0.944702 vt 0.388804 0.995060 vt 0.599642 0.994192 vt 0.599644 0.943834 vt 0.099644 0.943834 vt 0.099644 0.994192 vt 0.657285 0.924003 vt 0.157286 0.924003 vt 0.157286 0.873644 vt 0.657286 0.873644 vt 0.057291 0.714824 vt 0.057291 0.211238 vt 0.007291 0.211238 vt 0.007291 0.714824 vt 0.055957 0.923101 vt 0.005957 0.923101 vt 0.005957 0.419516 vt 0.055957 0.419516 vt 0.624723 0.994582 vt 0.624725 0.944224 vt 0.574725 0.944224 vt 0.574725 0.994582 vt 0.359798 0.995731 vt 0.309799 0.995731 vt 0.309799 0.945372 vt 0.359799 0.945372 vt 0.662274 0.989040 vt 0.662275 0.938682 vt 0.162275 0.938682 vt 0.162275 0.989040 vt 0.640874 0.990731 vt 0.140875 0.990731 vt 0.140875 0.940373 vt 0.640875 0.940373 vt 0.470854 0.990312 vt 0.470854 0.939954 vt 0.070855 0.939954 vt 0.070854 0.990312 vt 0.559298 0.993646 vt 0.159298 0.993646 vt 0.159298 0.943288 vt 0.559298 0.943288 vt 0.593757 0.988930 vt 0.593759 0.938571 vt 0.193759 0.938571 vt 0.193759 0.988930 vt 0.773229 0.992919 vt 0.773231 0.942560 vt 0.723231 0.942560 vt 0.723231 0.992919 vt 0.496895 0.993460 vt 0.496895 0.943101 vt 0.096895 0.943101 vt 0.096895 0.993460 vt 0.587767 0.992605 vt 0.187767 0.992605 vt 0.187767 0.942246 vt 0.587767 0.942246 vt 0.672922 0.993359 vt 0.672924 0.943001 vt 0.272923 0.943001 vt 0.272923 0.993359 vt 0.647741 0.991739 vt 0.247742 0.991739 vt 0.247742 0.941381 vt 0.647742 0.941381 vt 0.743104 0.738513 vt 0.741697 0.252015 usemtl None f 90/1 89/2 91/3 92/4 f 94/1 96/4 95/3 93/2 f 98/1 100/4 99/3 97/2 f 102/1 101/2 103/3 104/4 f 106/1 105/2 107/3 108/4 f 110/1 112/4 111/3 109/2 usemtl moremachines:blocks/infinode_receiver/powercellD.png f 14/5 15/6 11/7 9/8 f 13/9 16/10 15/11 14/12 f 13/13 14/14 9/15 10/16 f 7/17 8/18 6/19 5/20 f 16/21 12/22 11/15 15/14 f 10/9 9/12 11/11 12/10 f 25/23 26/24 24/25 23/26 f 51/27 47/28 46/29 50/30 f 55/5 58/8 56/7 52/6 f 58/9 59/12 57/11 56/10 f 38/31 39/32 37/33 36/34 f 52/21 56/22 57/15 53/14 f 55/13 54/14 59/15 58/16 f 55/9 52/10 53/11 54/12 f 54/5 53/6 57/7 59/8 f 72/5 74/6 69/7 60/8 f 71/9 75/10 74/11 72/12 f 71/13 72/14 60/15 64/16 f 75/21 70/22 69/15 74/14 f 64/9 60/12 69/11 70/10 f 71/5 64/8 70/7 75/6 f 81/5 86/8 82/7 77/6 f 67/35 68/36 66/37 65/38 f 86/9 88/12 84/11 82/10 f 77/21 82/22 84/15 78/14 f 81/13 79/14 88/15 86/16 f 81/9 77/10 78/11 79/12 f 79/5 78/6 84/7 88/8 f 1/39 5/40 6/41 2/42 f 4/43 3/44 8/45 7/46 f 4/47 1/48 2/49 3/50 f 3/51 2/52 6/53 8/54 f 4/55 7/56 5/57 1/58 f 13/5 10/8 12/7 16/6 f 17/59 19/60 31/61 21/62 f 18/63 22/64 32/65 20/66 f 18/67 17/68 21/69 22/70 f 20/71 32/72 31/73 19/74 f 22/75 21/76 31/77 32/78 f 18/79 20/80 19/81 17/82 f 21/83 23/84 24/85 1/86 f 22/87 4/88 26/89 25/90 f 22/91 21/92 1/93 4/94 f 27/95 31/96 5/97 28/98 f 30/99 29/100 7/101 32/102 f 30/103 27/104 28/105 29/106 f 32/107 7/108 5/109 31/110 f 62/111 36/112 37/113 33/114 f 35/115 34/116 39/117 38/118 f 35/119 62/120 33/121 34/122 f 34/123 33/124 37/125 39/126 f 35/127 38/128 36/129 62/130 f 40/131 42/132 85/133 61/134 f 41/135 63/136 87/137 43/138 f 41/139 40/140 61/141 63/142 f 43/143 87/144 85/145 42/146 f 63/147 61/148 85/149 87/150 f 41/151 43/152 42/153 40/154 f 61/155 65/156 66/157 62/158 f 63/159 35/160 68/161 67/162 f 63/163 61/164 62/165 35/166 f 35/167 62/168 66/169 68/170 f 73/171 85/172 36/173 76/174 f 83/175 80/176 38/177 87/178 f 83/179 73/180 76/181 80/182 f 87/183 38/184 36/185 85/186 usemtl moremachines:blocks/infinode_receiver/powercellE.png f 48/27 45/30 47/29 51/28 usemtl moremachines:blocks/infinode_receiver/powercellN.png f 48/187 51/28 50/29 49/30 usemtl moremachines:blocks/infinode_receiver/powercellS.png f 45/187 44/30 46/29 47/28 usemtl moremachines:blocks/infinode_receiver/powercellU.png f 48/187 49/30 44/29 45/188 usemtl moremachines:blocks/infinode_receiver/powercellW.png f 49/27 50/28 46/29 44/30 Note: This can all be found in the RFTools source, it is the 'powercell' block.
October 12, 20195 yr Author I created an issue in RFTools as it also occurs within their block (The powercell)
October 14, 20195 yr Author All right, i give up on this. If anybody has any ideas, please list them down. Thanks.
October 14, 20195 yr On 10/10/2019 at 10:36 PM, TesterTesting135 said: some rendering problems What rendering problems? What about it isnt right I cant see what you are talking about in the pictures. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
October 14, 20195 yr Author 2 hours ago, Animefan8888 said: What rendering problems? What about it isnt right I cant see what you are talking about in the pictures. The corners of the blocks. They disappear and reappear depending on what angle you look at them.
October 14, 20195 yr Assert.IsEqual(worth(picture), worth(thousand_words); 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 14, 20195 yr Author 15 minutes ago, Draco18s said: Assert.IsEqual(worth(picture), worth(thousand_words); The pictures are all the way above (where this issue was started) Also, here is the issue I created for RFTools (As they appear to have this issue as well) https://github.com/McJtyMods/RFTools/issues/1988
October 14, 20195 yr 1 hour ago, TesterTesting135 said: The corners of the blocks. They disappear and reappear depending on what angle you look at them. Sounds like a culling problem...forgive me rendering isnt something I'm the most fluent in. I guess my main question is why is it an obj model and not a json model. I assume its something to do with the model file. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
October 15, 20195 yr Yeah, its a transparency sorting problem. Its going to be difficult to solve. 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 17, 20195 yr 15 minutes ago, TesterTesting135 said: So, does anybody have an idea on how to solve this? I'm afraid I don't know what's at the root of it, really. Having looked at the .obj model, I can tell you that the vertices are in order, so that they shouldn't be triggering weird cullface issues. That said, I've got a block with a similar model, that doesn't have this problem, which uses .json format. Perhaps that's the cause? Here's the model, and you can see if just by swapping them you get any success. If it works, it's something with the .obj. If it doesn't, it's something with your code, and we can compare setups to see what's different. (Unless of course someone else knows the answer off the top of their head) fancy_cube.json Fancy 3D Graphing Calculator mod, with many different coordinate systems. Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.
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.