Posted June 18, 20169 yr I am trying to update my mod into 1.9 and have sorted through all the errors and now, after getting in game, one of my blocks is not rendering at all. As you can see the block, when placed, is not there. However the item for the block is displaying as intended. blockstates/miningRig.json: { "variants": { "facing=north": { "model": "doge:miningRig" }, "facing=south": { "model": "doge:miningRig", "y": 180 }, "facing=west": { "model": "doge:miningRig", "y": 270 }, "facing=east": { "model": "doge:miningRig", "y": 90 } } } models/block/miningRig.json: { "parent": "block/cube", "textures": { "particle": "doge:blocks/miningRigFrontOff", "up": "doge:blocks/miningRigTopBackOff", "down": "doge:blocks/miningRigBottom", "south": "doge:blocks/miningRigTopBackOff", "north": "doge:blocks/miningRigFrontOff", "east": "doge:blocks/miningRigSideOff", "west": "doge:blocks/miningRigSideOff" } } models/items/miningRig.json: { "parent": "doge:block/miningRig" } models registered with: ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(Doge.miningRig), 0, new ModelResourceLocation(Doge.miningRig.getRegistryName(), "inventory")); The other block I have is working fine although it has no block states and simply uses block/cube_all model full source available here: https://github.com/mmdanggg2/DogeMod/tree/1.9.4 I have a youtube if you care: https://www.youtube.com/c/mmdanggg2
June 18, 20169 yr BlockContainer overrides Block#getRenderType to return EnumBlockRenderType.INVISIBLE , which prevents the standard baked model from being rendered (so the model can be rendered by a TESR ). You could override Block#getRenderType to return EnumBlockRenderType.MODEL (like various vanilla blocks with TileEntities do), but the best way around this is to not extend BlockContainer at all. Instead, override Block#hasTileEntity(IBlockState) and Block#createTileEntity . MiningRig has a getRenderType method returning 3, but this no longer overrides Block#getRenderType in 1.9+. Always annotate override methods with @Override . If this gives you a compilation error, fix the method signature rather than removing the annotation. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
June 18, 20169 yr Author Wonderful, that was it. Thanks for the info! ? I have a youtube if you care: https://www.youtube.com/c/mmdanggg2
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.