mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 12:37:59 +01:00
Use the correct texture in first person mode. Closes #238
This commit is contained in:
parent
ee536cfe6a
commit
b38c8530f8
1 changed files with 8 additions and 4 deletions
|
@ -8,6 +8,7 @@ import com.minelittlepony.client.model.*;
|
|||
import com.minelittlepony.client.render.DebugBoundingBoxRenderer;
|
||||
import com.minelittlepony.client.render.IPonyRenderContext;
|
||||
import com.minelittlepony.client.render.entity.feature.*;
|
||||
import com.minelittlepony.client.util.render.RenderLayerUtil;
|
||||
import com.minelittlepony.client.render.EquineRenderManager;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -142,11 +143,14 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen
|
|||
|
||||
stack.translate(reflect * 0.1F, -0.54F, 0);
|
||||
|
||||
Identifier texture = getTexture(player);
|
||||
Identifier playerSkin = player.getSkinTexture();
|
||||
VertexConsumerProvider interceptedContext = layer -> {
|
||||
return renderContext.getBuffer(
|
||||
layer == RenderLayer.getEntitySolid(player.getSkinTexture())
|
||||
? RenderLayer.getEntityTranslucent(player.getSkinTexture())
|
||||
: layer
|
||||
return renderContext.getBuffer(RenderLayerUtil
|
||||
.getTexture(layer)
|
||||
.filter(playerSkin::equals)
|
||||
.map(i -> RenderLayer.getEntityTranslucent(texture))
|
||||
.orElse(layer)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue