Fix armor glint rendering and propagate some other glint rendering changes mojang made

This commit is contained in:
Sollace 2020-06-19 17:03:44 +02:00
parent 3a11a25de2
commit 96c48383e0
3 changed files with 3 additions and 4 deletions

View file

@ -6,7 +6,6 @@ import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.feature.FeatureRenderer;
import net.minecraft.client.render.entity.feature.FeatureRendererContext;
import net.minecraft.client.render.entity.model.BipedEntityModel;
import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.Identifier;
@ -31,7 +30,7 @@ public abstract class AbstractClothingFeature<T extends LivingEntity, M extends
overlayModel.animateModel(entity, limbDistance, limbAngle, tickDelta);
overlayModel.setAngles(entity, limbDistance, limbAngle, age, headYaw, headPitch);
VertexConsumer vertexConsumer = ItemRenderer.getArmorVertexConsumer(renderContext, overlayModel.getLayer(getOverlayTexture()), false, false);
VertexConsumer vertexConsumer = renderContext.getBuffer(overlayModel.getLayer(getOverlayTexture()));
overlayModel.render(stack, vertexConsumer, lightUv, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
}

View file

@ -93,7 +93,7 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & IP
MatrixStack matrices, VertexConsumerProvider provider,
int light, boolean glint, V model, float r, float g, float b, IArmourTextureResolver<T> resolver, ArmourLayer layer, Identifier texture) {
VertexConsumer vertices = ItemRenderer.getArmorVertexConsumer(provider, RenderLayer.getArmorCutoutNoCull(texture), false, glint);
VertexConsumer vertices = ItemRenderer.method_27952(provider, RenderLayer.getArmorCutoutNoCull(texture), false, glint);
model.setVariant(resolver.getArmourVariant(layer, texture));
model.render(matrices, vertices, light, OverlayTexture.DEFAULT_UV, r, g, b, 1);

View file

@ -47,7 +47,7 @@ public class ElytraFeature<T extends LivingEntity, M extends EntityModel<T> & IP
}
elytra.setAngles(entity, limbDistance, limbAngle, age, headYaw, headPitch);
VertexConsumer vertexConsumer = ItemRenderer.getArmorVertexConsumer(renderContext, modelElytra.getLayer(getElytraTexture(entity)), false, itemstack.hasEnchantmentGlint());
VertexConsumer vertexConsumer = ItemRenderer.method_29711(renderContext, modelElytra.getLayer(getElytraTexture(entity)), false, itemstack.hasEnchantmentGlint());
modelElytra.render(stack, vertexConsumer, lightUv, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
stack.pop();