Jump to content

[1.12.2] Multi-texture model problems


CrashDbo

Recommended Posts

Hello I have just used Blockbench online to create a multi-textured model. It works great, until I put it adjacent to a solid block.

Spoiler

BlockTextureIssue1.thumb.PNG.95d291d2f83d5c2bddbe9823f2191aa8.PNG

What causes this?

 

Below is my code for the model.

Spoiler

{
	"credit": "Made with Blockbench",
	"textures": {
		"0": "tinkertime:blocks/block_tinker_crystal",
		"1": "tinkertime:blocks/block_crystal_analyzer",
		"particle": "tinkertime:blocks/block_tinker_crystal"
	},
	"elements": [
		{
			"name": "Top",
			"from": [0, 15, 0],
			"to": [16, 16, 16],
			"faces": {
				"north": {"uv": [0, 0, 16, 1], "texture": "#0"},
				"east": {"uv": [0, 0, 16, 1], "texture": "#0"},
				"south": {"uv": [0, 0, 16, 1], "texture": "#0"},
				"west": {"uv": [0, 0, 16, 1], "texture": "#0"},
				"up": {"uv": [0, 0, 16, 16], "texture": "#0"},
				"down": {"uv": [0, 0, 16, 16], "texture": "#0"}
			}
		},
		{
			"name": "Bottom",
			"from": [0, 0, 0],
			"to": [16, 1, 16],
			"faces": {
				"north": {"uv": [0, 0, 16, 1], "texture": "#0"},
				"east": {"uv": [0, 0, 16, 1], "texture": "#0"},
				"south": {"uv": [0, 0, 16, 1], "texture": "#0"},
				"west": {"uv": [0, 0, 16, 1], "texture": "#0"},
				"up": {"uv": [0, 0, 16, 16], "texture": "#0"},
				"down": {"uv": [0, 0, 16, 16], "texture": "#0"}
			}
		},
		{
			"from": [1, 1, 1],
			"to": [2, 15, 2],
			"faces": {
				"north": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"east": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"south": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"west": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"up": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"down": {"uv": [6, 0, 7, 16], "texture": "#0"}
			}
		},
		{
			"from": [14, 1, 1],
			"to": [15, 15, 2],
			"faces": {
				"north": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"east": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"south": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"west": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"up": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"down": {"uv": [6, 0, 7, 16], "texture": "#0"}
			}
		},
		{
			"from": [14, 1, 14],
			"to": [15, 15, 15],
			"faces": {
				"north": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"east": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"south": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"west": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"up": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"down": {"uv": [6, 0, 7, 16], "texture": "#0"}
			}
		},
		{
			"from": [1, 1, 14],
			"to": [2, 15, 15],
			"faces": {
				"north": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"east": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"south": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"west": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"up": {"uv": [6, 0, 7, 16], "texture": "#0"},
				"down": {"uv": [6, 0, 7, 16], "texture": "#0"}
			}
		},
		{
			"name": "CTop",
			"from": [7, 1, 7],
			"to": [9, 2, 9],
			"faces": {
				"north": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"east": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"south": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"west": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"up": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"down": {"uv": [2, 2, 15, 14], "texture": "#1"}
			}
		},
		{
			"name": "CTop2",
			"from": [6, 13, 6],
			"to": [10, 14, 10],
			"faces": {
				"north": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"east": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"south": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"west": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"up": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"down": {"uv": [2, 2, 15, 14], "texture": "#1"}
			}
		},
		{
			"name": "CTop3",
			"from": [5, 12, 5],
			"to": [11, 13, 11],
			"faces": {
				"north": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"east": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"south": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"west": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"up": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"down": {"uv": [2, 2, 15, 14], "texture": "#1"}
			}
		},
		{
			"name": "CMiddle",
			"from": [4, 4, 4],
			"to": [12, 12, 12],
			"faces": {
				"north": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"east": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"south": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"west": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"up": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"down": {"uv": [2, 2, 15, 14], "texture": "#1"}
			}
		},
		{
			"name": "CBottom3",
			"from": [5, 3, 5],
			"to": [11, 4, 11],
			"faces": {
				"north": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"east": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"south": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"west": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"up": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"down": {"uv": [2, 2, 15, 14], "texture": "#1"}
			}
		},
		{
			"name": "CBottom2",
			"from": [6, 2, 6],
			"to": [10, 3, 10],
			"faces": {
				"north": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"east": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"south": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"west": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"up": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"down": {"uv": [2, 2, 15, 14], "texture": "#1"}
			}
		},
		{
			"name": "CBottom",
			"from": [7, 14, 7],
			"to": [9, 15, 9],
			"faces": {
				"north": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"east": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"south": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"west": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"up": {"uv": [2, 2, 15, 14], "texture": "#1"},
				"down": {"uv": [2, 2, 15, 14], "texture": "#1"}
			}
		}
	],
	"display": {
		"thirdperson_righthand": {
			"rotation": [0, 37, 0],
			"translation": [1, -1.75, -3],
			"scale": [0.5, 0.5, 0.5]
		},
		"thirdperson_lefthand": {
			"rotation": [0, 37, 0],
			"translation": [1, -2, -3],
			"scale": [0.5, 0.5, 0.5]
		},
		"firstperson_righthand": {
			"rotation": [-21, 30, 5],
			"translation": [2.25, 0, 0],
			"scale": [0.32, 0.43, 0.31]
		},
		"firstperson_lefthand": {
			"rotation": [-18, 22, 2],
			"translation": [2.75, 0, 0],
			"scale": [0.31, 0.29, 0.24]
		},
		"ground": {
			"scale": [0.5, 0.5, 0.5]
		},
		"fixed": {
			"rotation": [0, 46, 0],
			"translation": [0, 0, -0.5]
		}
	},
	"groups": [0, 1,
		{
			"name": "Corners",
			"origin": [8, 8, 8],
			"children": [2, 3, 4, 5]
		},
		{
			"name": "Crystal",
			"origin": [8, 8, 8],
			"children": [6, 7, 8, 9, 10, 11, 12]
		}
	]
}

 

Thank you for any advice.

Link to comment
Share on other sites

Minecraft assumes that every block is an opaque cube by default, so it doesn't render the adjacent block faces. Override Block#isOpaqueCube to return false to fix this.

  • Thanks 1

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.

Link to comment
Share on other sites

@Deprecated
    public boolean isOpaqueCube(IBlockState state)
    {
        return true;
    }

This method in the block class is deprecated. 

 

Before I use it is there an equivalent/other way. Also, why do other methods of the block class call a deprecated.

 

    /**
     * Check if the face of a block should block rendering.
     *
     * Faces which are fully opaque should return true, faces with transparency
     * or faces which do not span the full size of the block should return false.
     *
     * @param state The current block state
     * @param world The current world
     * @param pos Block position in world
     * @param face The side to check
     * @return True if the block is opaque on the specified side.
     */
    public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
    {
        return state.isOpaqueCube();
    }

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.