Jump to content

[Solved] Transparent texture parts rendered as non-transparent


zskamljic

Recommended Posts

I was trying to implement a component similar to redstone comparator, but I'm having issues with the model when powered, but it displays as following: 

NQnJT4S.png

The model is specified as following:

Spoiler
{
	"textures": {
		"slab": "minecraft:block/smooth_stone",
		"or": "mymod:block/or_on",
		"lit": "minecraft:block/redstone_torch"
	},
	"elements": [
		{
			"name": "slab",
			"from": [0, 0, 0],
			"to": [16, 2, 16],
			"faces": {
				"north": {"uv": [0, 14, 16, 16], "texture": "slab", "cullface": "north" },
				"east": {"uv": [0, 14, 16, 16], "texture": "slab", "cullface": "east" },
				"south": {"uv": [0, 14, 16, 16], "texture": "slab", "cullface": "south" },
				"west": {"uv": [0, 14, 16, 16], "texture": "slab", "cullface": "west" },
				"up": {"uv": [0, 0, 16, 16], "texture": "or"},
				"down": {"uv": [0, 0, 16, 16], "texture": "slab", "cullface": "down" }
			}
		},
		{
			"from": [7, 7, 7],
			"to": [9, 7, 9],
			"faces": {
				"up": {"uv": [7, 6, 9, 8], "texture": "lit"}
			}
		},
		{
			"from": [7, 2, 6],
			"to": [9, 8, 10],
			"faces": {
				"east": {"uv": [6, 5, 10, 11], "texture": "lit"},
				"west": {"uv": [6, 5, 10, 11], "texture": "lit"}
			}
		},
		{
			"from": [6, 2, 7],
			"to": [10, 8, 9],
			"faces": {
				"north": {"uv": [6, 5, 10, 11], "texture": "lit"},
				"south": {"uv": [6, 5, 10, 11], "texture": "lit"}
			}
		},
		{
			"from": [7, 5, 2],
			"to": [9, 5, 4],
			"faces": {
				"up": {"uv": [7, 6, 9, 8], "texture": "lit"}
			}
		},
		{
			"from": [7, 2, 1],
			"to": [9, 6, 5],
			"faces": {
				"east": {"uv": [6, 5, 10, 9], "texture": "lit"},
				"west": {"uv": [6, 5, 10, 9], "texture": "lit"}
			}
		},
		{
			"from": [6, 2, 2],
			"to": [10, 6, 4],
			"faces": {
				"north": {"uv": [6, 5, 10, 9], "texture": "lit"},
				"south": {"uv": [6, 5, 10, 9], "texture": "lit"}
			}
		}
	]
}

 

Which is the same as what I've found the redstone repeater use, but for that, it is rendered correctly. Adding ambiendocclusion causes the whole top of the block to appear dark, aside from there I can not spot a difference. How do I solve this?

Edited by zskamljic
Mark thread as solved
Link to comment
Share on other sites

https://minecraft.fandom.com/wiki/JSON

It's render_type with an e.

if you don't show your code we really can't help you. You asserting you did things correctly helps nobody.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

@warjort please see the spoiler in the original post for my model file. You were right, I had a typo that I have missed. 

I am familiar with JSON, but the wiki, including the link provided, and the link to models page has little to offer in terms of properties that can be used, the values that can be used and so on. For example I didn't find a documentation on faces, there's "front" but no "back", so I used "north" and "south", but that took time to find as well.

Link to comment
Share on other sites

5 minutes ago, zskamljic said:

I am familiar with JSON, but the wiki, including the link provided, and the link to models page has little to offer in terms of properties that can be used, the values that can be used and so on.

Here is the specific link with the JSON format: https://minecraft.fandom.com/wiki/Tutorials/Models

As for the render_type information, that is specifically added by forge so you would need to look in the source to know about it.

  • Like 1
Link to comment
Share on other sites

Your spoiler is the code from before you asked the question.

The best way to ask a question is to put your code on github where we can see the full context and keep it up-to-date as you fix things.

The texture ids like "front" or "all" are pure convention. They are variable names. Usually created in a parent/template model then consumed/defined in your real model.

Only the 6 faces from the minecraft Direction class have any fixed meaning.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

  • zskamljic changed the title to [Solved] Transparent texture parts rendered as non-transparent

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.



×
×
  • Create New...

Important Information

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