Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

Posted

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

5 minutes ago, tubi_carrillo said:

issue is with the json file per se.

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.

  • Author

 

3 minutes ago, MadHatAK said:

What do you have the RenderType set too?

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

Just now, 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?

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.

  • Author
7 minutes ago, Animefan8888 said:

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

How do I get the instance of my block so that I can set the render layer? Should I just instanciate a new one?

4 minutes ago, tubi_carrillo said:

Should I just instanciate a new one?

No you need to use the instance you already registered.

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.

  • Author
Just now, Animefan8888 said:

No you need to use the instance you already registered.

I forgot to use .get() after the instance, and was obviously getting an error. Thank you both for the fast responses!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.