mojira.dev
MC-73069

Using a sprite(flat cube) in a custom item model applies both textures for both sides of the sprite in third person view

I try to make custom models for items, using sprites in it (in realistic fern model, for example), but in third person view both textures of sprite appear at the same time, which makes it glitchy-looking.

Steps to reproduce:
I variant:
1. /summon Enderman ~ ~ ~ {carried:38s,carriedData:1,NoAI:1b}
2. /gamemode 3 to take a closer look on the model.
II variant:
1. Create a resourcepack.
2. Change any item model, so it will have this part of code (taken from vanilla sunflower model):
"textures": {
"back": "blocks/double_plant_sunflower_back",
"front": "blocks/double_plant_sunflower_front"
},
"elements": [
{
"from": [ 9.6, 15, 1 ],
"to": [ 9.6, 30, 15 ],
"rotation": {
"origin": [ 8, 24, 8 ],
"axis": "z",
"angle": 22.5,
"rescale": false
},
"shade": false,
"faces": {
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#back" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#front" }
}
}
]
3. Get the item with changed model in your hand.
4. Press F5.

Related issues

Attachments

Comments

migrated
[media][media][media][media][media][media][media]
1LotS

In the first person view/inventory everything works perfect. But in the third person view textures just glitch.

migrated

I hope this bug gets to being fixed soon!

marcono1234

Can you please attach a resource pack containing a texture which is affected by this?

migrated

A similar issue was fixed recently. Is this still an issue in 15w45a? If so, please explain the issue in detail and provide steps to reproduce it. Please also update the list of affected versions.

migrated

Comment refers to the lastest images uploaded. Without seeing the pack I cannot confirm this but what I believe it to be is that you are displacing both faces at the same place causing z-fighting. To solve this you'd have to remove on of the faces, I will give an example;

{"elements":[{
"from": [ 0, 0, 0 ],"to": [ 0.0005, 16, 16 ],
"faces": {"west":{ "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },"east":{ "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }}}]}

and change it to

{"elements":[{
"from": [ 0, 0, 0 ],"to": [ 0.0005, 16, 16 ],
"faces": {"west":{ "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }}}]}

That would solve it, if it is what I believe it to be.

1LotS

This also happens with the vanilla models that have sprites in them.

1LotS

Arsenic Shark, yeah, but sometimes I need two different textures to be displayed on both sides (like in sunflower model).

migrated

The solution is easy,

on the model change one of the "9.6" to "9.6005" or something similar to that and it will bring the two faces slightly apart from each other.

I cannot get it to replicate in game on vanilla items so I believe this is an error on your behalf, following my instructions should help.

1LotS

Arsenic Shark, but why doesn't it work like how it works with blocks? You don't need to change anything in the model. It just shows the side you're looking at. And if I remember it right it wasn't a thing in the older versions of minecraft.

wobst.michael

Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.

SunCat

Resolved as a duplicate of MC-114576 in favor of better explanation

1LotS

(Unassigned)

Unconfirmed

block, item, models, rendering

Minecraft 1.8, Minecraft 1.8.1-pre1, Minecraft 1.8.1, Minecraft 1.9.1, Minecraft 1.9.2

Retrieved