mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 06:18:00 +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.DebugBoundingBoxRenderer;
|
||||||
import com.minelittlepony.client.render.IPonyRenderContext;
|
import com.minelittlepony.client.render.IPonyRenderContext;
|
||||||
import com.minelittlepony.client.render.entity.feature.*;
|
import com.minelittlepony.client.render.entity.feature.*;
|
||||||
|
import com.minelittlepony.client.util.render.RenderLayerUtil;
|
||||||
import com.minelittlepony.client.render.EquineRenderManager;
|
import com.minelittlepony.client.render.EquineRenderManager;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -142,11 +143,14 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen
|
||||||
|
|
||||||
stack.translate(reflect * 0.1F, -0.54F, 0);
|
stack.translate(reflect * 0.1F, -0.54F, 0);
|
||||||
|
|
||||||
|
Identifier texture = getTexture(player);
|
||||||
|
Identifier playerSkin = player.getSkinTexture();
|
||||||
VertexConsumerProvider interceptedContext = layer -> {
|
VertexConsumerProvider interceptedContext = layer -> {
|
||||||
return renderContext.getBuffer(
|
return renderContext.getBuffer(RenderLayerUtil
|
||||||
layer == RenderLayer.getEntitySolid(player.getSkinTexture())
|
.getTexture(layer)
|
||||||
? RenderLayer.getEntityTranslucent(player.getSkinTexture())
|
.filter(playerSkin::equals)
|
||||||
: layer
|
.map(i -> RenderLayer.getEntityTranslucent(texture))
|
||||||
|
.orElse(layer)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue