mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Fixed transparency on players' arms in first person
This commit is contained in:
parent
2ad3280cac
commit
f6341208da
1 changed files with 11 additions and 2 deletions
|
@ -27,6 +27,7 @@ import net.minecraft.block.BedBlock;
|
|||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||
import net.minecraft.client.render.Frustum;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||
import net.minecraft.client.render.entity.PlayerEntityRenderer;
|
||||
|
@ -156,10 +157,18 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen
|
|||
|
||||
stack.translate(reflect * 0.1F, -0.54F, 0);
|
||||
|
||||
VertexConsumerProvider interceptedContext = layer -> {
|
||||
return renderContext.getBuffer(
|
||||
layer == RenderLayer.getEntitySolid(player.getSkinTexture())
|
||||
? RenderLayer.getEntityTranslucent(player.getSkinTexture())
|
||||
: layer
|
||||
);
|
||||
};
|
||||
|
||||
if (side == Arm.LEFT) {
|
||||
super.renderLeftArm(stack, renderContext, lightUv, player);
|
||||
super.renderLeftArm(stack, interceptedContext, lightUv, player);
|
||||
} else {
|
||||
super.renderRightArm(stack, renderContext, lightUv, player);
|
||||
super.renderRightArm(stack, interceptedContext, lightUv, player);
|
||||
}
|
||||
|
||||
stack.pop();
|
||||
|
|
Loading…
Reference in a new issue