Jump to content

Black parts on the transparent parts of my block 1.19.2


Liuxss

Recommended Posts

Hi, I had a problem creating a block with transparent parts and I don't know how to fix it or what is causing it, I already tried looking for solutions but none of them work for me, could someone help me?

jJskiTi.png

Edited by Liuxss
No image
Link to comment
Share on other sites

 

declare the blocks with the no occlusion thing 

	public static final RegistryObject<Block> DIRT_PATH_SLAB = register_slab("dirt_path_slab",
	() -> new slab(Block.Properties.copy(Blocks.DIRT).noOcclusion() ) );
	

 

also in the json model for the block adds the render type to cutout 

	{   "parent": "block/block",
        "ambientocclusion": "true",
        "render_type": "cutout",   
        
    "elements": [
        {   "from": [ 0, 0, 0 ],
            "to": [ 16, 7, 16 ],
            "faces": {
                "down":  { "uv": [ 0, 0, 16, 16 ], "texture": "#bottom", "cullface": "down" },
                "up":    { "uv": [ 0, 0, 16, 16 ], "texture": "#top",    "cullface": "up", "tintindex": 0 },
                "north": { "uv": [ 0, 1, 16, 8  ], "texture": "#side",   "cullface": "north" },
                "south": { "uv": [ 0, 1, 16, 8  ], "texture": "#side",   "cullface": "south" },
                "west":  { "uv": [ 0, 1, 16, 8  ], "texture": "#side",   "cullface": "west" },
                "east":  { "uv": [ 0, 1, 16, 8  ], "texture": "#side",   "cullface": "east" }
            }
        },
        {   "from": [ 0, 0, 0 ],
            "to": [ 16, 7, 16 ],
            "faces": {
                "north": { "uv": [ 0, 1, 16, 8 ], "texture": "#overlay", "tintindex": 0, "cullface": "north" },
                "south": { "uv": [ 0, 1, 16, 8 ], "texture": "#overlay", "tintindex": 0, "cullface": "south" },
                "west":  { "uv": [ 0, 1, 16, 8 ], "texture": "#overlay", "tintindex": 0, "cullface": "west" },
                "east":  { "uv": [ 0, 1, 16, 8 ], "texture": "#overlay", "tintindex": 0, "cullface": "east" }
            }
        }
    ]
}
	

 

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.