Posted July 7, 20196 yr Hello, I have been searching everywhere for info on how to do this, I've tried several things similar to this in my blocks blockstate json Spoiler { "variants": { "facing=north": { "model": "modid:model" }, "facing=south": { "model": "modid:model", "y": 180 }, "facing=west": { "model": "modid:model", "y": 270 }, "facing=east": { "model": "modid:model", "y": 90 } } } Several posts have suggested looking at the Minecraft source code but I really have only had one idea on how to do that, it being that "It's a library in eclipse". I've tried my best looking for it but can't find it. Another thing I've tried is adding this override to my block's code: Spoiler @Override public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) { return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand).withProperty(FACING, placer.getHorizontalFacing()); } But could not get FACING to work. I later found this when trying to fix the facing issue: Spoiler protected BlockState createBlockState() { return new BlockState(this, new IProperty[]{FACING}); } But none of this has worked, so I've come here to ask for help.
July 7, 20196 yr 1 hour ago, 8-Bit KitKat said: Several posts have suggested looking at the Minecraft source code but I really have only had one idea on how to do that, it being that "It's a library in eclipse". I've tried my best looking for it but can't find it. Controlling how blocks face are configured in blockstates and model [JSON] files, In the Eclipse "Package Explorer" view, look for Referenced Libraries -> Forge Src 1.12 ... -> assets.minecraft.blockstates --> 'birch_log.json' for an Example (Birch Logs) The models listed can be found in assets.minecraft.models.block The base Class for logs is in net.minecraft.block.BlockLog . which you can probably use natively or extend to get the effect you are after. Basic concepts are covered here: https://mcforge.readthedocs.io/en/latest/blocks/states/
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.