Posted February 8, 20169 yr I have a block with facing state and cutom OBJ model, i cannot figure how to rotate the different variants, i tried to put "y"=angle everywhere and its not working, btw my block is not a tile entity. { "forge_marker": 1, "defaults": { "textures": { "#None": "mymodid:blocks/controlpanel" }, "model": "mymodid:controlpanel.obj" }, "variants": { "facing=north": [{"y":180}], "facing=south": [{"y":90}], "facing=east": [{"y":0}], "facing=west": [{"y":270}], "facing=up": [{}], "facing=down": [{}], "normal": [{}], "inventory": [{ "transform": { "translation": [ 0, 0, 0], "scale": 1.0 } }] } } I don t know if there is another method to specify variants rotation ?
February 8, 20169 yr There may be another way but, here is a trimmed down version of what I'm using. @Override protected BlockState createBlockState() { return new ExtendedBlockState(this, new IProperty[] { <Non Facing Properties> }, new IUnlistedProperty[] { OBJModel.OBJProperty.instance }); } @Override public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) { OBJModel.OBJState newState; newState = new OBJModel.OBJState(Lists.newArrayList(OBJModel.Group.ALL), true, new TRSRTransformation(TRSRTransformation.getMatrix(EnumFacing.NORTH))); return ((IExtendedBlockState)state).withProperty(OBJModel.OBJProperty.instance, newState); }
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.