mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Fix armor glint rendering and propagate some other glint rendering changes mojang made
This commit is contained in:
parent
3a11a25de2
commit
96c48383e0
3 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue