Posted January 21, 201510 yr Hello! I am trying to make a custom block that is smaller then a normal block, it's supposed to be 13px high instead of 16px, and it kinda works. I am able to make the side of the blocks stop rendering at 13px, but then the top of the block goes all black, and when I stand on it the sky turns black as well??? Oh and I have changed the hitbox so that it's 0.8f instead of 1.0f in the code. Here is the .json code that i'm using: The parent json: { "textures": { "particle": "#all" }, "elements": [ { "from": [0, 0, 0], "to": [16, 13, 16], "faces": { "down": {"uv": [0, 0, 16, 13], "texture": "#all"}, "up": {"uv": [0, 0, 16, 13], "texture": "#all"}, "north": {"uv": [0, 0, 16, 13], "texture": "#all"}, "south": {"uv": [0, 0, 16, 13], "texture": "#all"}, "west": {"uv": [0, 0, 16, 13], "texture": "#all"}, "east": {"uv": [0, 0, 16, 13], "texture": "#all"} } } ] } the block json: { "parent": "mymodid:block/parentjson", "textures": { "all": "mymodid:blocks/myblock" } } Can anyone tell what the h i'm doing wrong?
January 21, 201510 yr hi Have you overridden Block.isOpaqueCube and .isFullCube? // used by the renderer to control lighting and visibility of other blocks. // set to false because this block doesn't fill the entire 1x1x1 space @Override public boolean isOpaqueCube() { return false; } // used by the renderer to control lighting and visibility of other blocks, also by // (eg) wall or fence to control whether the fence joins itself to this block // set to false because this block doesn't fill the entire 1x1x1 space @Override public boolean isFullCube() { return false; } -TGG
January 21, 201510 yr Author hi Have you overridden Block.isOpaqueCube and .isOpaqueCube? // used by the renderer to control lighting and visibility of other blocks. // set to false because this block doesn't fill the entire 1x1x1 space @Override public boolean isOpaqueCube() { return false; } // used by the renderer to control lighting and visibility of other blocks, also by // (eg) wall or fence to control whether the fence joins itself to this block // set to false because this block doesn't fill the entire 1x1x1 space @Override public boolean isFullCube() { return false; } -TGG No I didn't override the isOpaqueCube method, but I did override the isFullCube, thank you!
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.