Jump to content

[SOLVED] - [1.15.2] json model is rendering transparent parts of a texture as black


Recommended Posts

Posted (edited)

Everything related to the mod works perfectly, the problem comes when my added block (which is an extended version of a repeater, and reuses it's textures except for the top) is rendering the transparent parts of the lit redstone torch. I have the same part of the json file, with the correct uv mappings for said torches.

 

2020-03-31_20_21_39.thumb.png.fe975f617eaa1f3b26964a4921cfa720.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The following, is the json file for the vanilla repeater. I will exclude unrelated parts of the model, so that it doesn't become hard to read, and because I don't think the issue is with the json file per se.

{
    "ambientocclusion": false,
    "textures": {
        "particle": "block/repeater_on",
        "slab": "block/smooth_stone",
        "top": "block/repeater_on",
        "lit": "block/redstone_torch"
    },
    "elements": [
        /* ignore the "top" part of the model */ ,
        /* here starts the movable torch (for delay) */
        {   "from": [ 7, 7, 6 ],
            "to": [ 9, 7, 8 ],
            "faces": {
                "up":   { "uv": [ 7, 6, 9, 8 ], "texture": "#lit" }
            }
        },
        {   "from": [ 7, 2, 5 ],
            "to": [ 9, 8, 9 ],
            "faces": {
                "west": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" },
                "east": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" }
            }
        },
        {   "from": [ 6, 2, 6 ],
            "to": [ 10, 8, 8 ],
            "faces": {
                "north": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" },
                "south": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" }
            }
        },
        /* here starts the unmovable torch */
        {   "from": [ 7, 7, 2 ],
            "to": [ 9, 7, 4 ],
            "faces": {
                "up":   { "uv": [ 7, 6, 9, 8 ], "texture": "#lit" }
            }
        },
        {   "from": [ 7, 2, 1 ],
            "to": [ 9, 8, 5 ],
            "faces": {
                "west": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" },
                "east": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" }
            }
        },
        {   "from": [ 6, 2, 2 ],
            "to": [ 10, 8, 4 ],
            "faces": {
                "north": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" },
                "south": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" }
            }
        }
    ]
}

 

And here's my json file:

{
    "ambientocclusion": false,
    "textures": {
        "particle": "block/repeater_on",
        "slab": "block/smooth_stone",
        "top": "extendedrepeaters:blocks/extended_repeater_1min_1max_comparator_on",
        "max": "block/cyan_wool",
        "lit": "block/redstone_torch"
	},
    "elements": [
    	/* mod parts */,
        /* movable torch */
        {   "from": [ 7, 7, 6 ],
            "to": [ 9, 7, 8 ],
            "faces": {
                "up":   { "uv": [ 7, 6, 9, 8 ], "texture": "#lit" }
            }
        },
        {   "from": [ 7, 2, 5 ],
            "to": [ 9, 8, 9 ],
            "faces": {
                "west": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" },
                "east": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" }
            }
        },
        {   "from": [ 6, 2, 6 ],
            "to": [ 10, 8, 8 ],
            "faces": {
                "north": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" },
                "south": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" }
            }
        },
        /* unmovable torch */
        {   "from": [ 7, 7, 2 ],
            "to": [ 9, 7, 4 ],
            "faces": {
                "up":   { "uv": [ 7, 6, 9, 8 ], "texture": "#lit" }
            }
        },
        {   "from": [ 7, 2, 1 ],
            "to": [ 9, 8, 5 ],
            "faces": {
                "west": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" },
                "east": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" }
            }
        },
        {   "from": [ 6, 2, 2 ],
            "to": [ 10, 8, 4 ],
            "faces": {
                "north": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" },
                "south": { "uv": [ 6, 5, 10, 11 ], "texture": "#lit" }
            }
        }
    ]
}

 

Edited by tubi_carrillo
Moved image to the left
Posted
  On 3/31/2020 at 11:38 PM, tubi_carrillo said:

issue is with the json file per se.

Expand  

You would likely be correct. Could you post your code and check out this post.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 3/31/2020 at 11:46 PM, tubi_carrillo said:

I haven't, I'm guessing I should specify it inside when registering the block? or is it inside the block class?

Expand  

Check the link I posted.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.