mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 23:27:59 +01:00
Fixed bracelet rendering offset on armor stands
This commit is contained in:
parent
c6bb37546d
commit
eaa3c8a2a5
1 changed files with 10 additions and 1 deletions
|
@ -59,11 +59,15 @@ public class BraceletFeatureRenderer<E extends LivingEntity> implements Accessor
|
|||
|
||||
BraceletModel model = alex ? alexModel : steveModel;
|
||||
|
||||
boolean isLeft = entity.getMainArm() == Arm.LEFT;
|
||||
int sigma = isLeft ? 1 : -1;
|
||||
|
||||
if (entity instanceof ArmorStandEntity) {
|
||||
ModelPart arm = entity.getMainArm() == Arm.LEFT ? context.getModel().leftArm : context.getModel().rightArm;
|
||||
ModelPart arm = isLeft ? context.getModel().leftArm : context.getModel().rightArm;
|
||||
arm.visible = true;
|
||||
VertexConsumer consumer = renderContext.getBuffer(context.getModel().getLayer(context.getTexture(entity)));
|
||||
arm.render(stack, consumer, lightUv, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
|
||||
arm.pivotX += sigma;
|
||||
}
|
||||
|
||||
boolean glowing = ((GlowableItem)item.getItem()).isGlowing(item);
|
||||
|
@ -73,6 +77,11 @@ public class BraceletFeatureRenderer<E extends LivingEntity> implements Accessor
|
|||
model.setAngles(context.getModel());
|
||||
model.setVisible(entity.getMainArm());
|
||||
model.render(stack, consumer, glowing ? 0x0F00F0 : lightUv, OverlayTexture.DEFAULT_UV, Color.r(j), Color.g(j), Color.b(j), 1);
|
||||
|
||||
if (entity instanceof ArmorStandEntity) {
|
||||
ModelPart arm = isLeft ? context.getModel().leftArm : context.getModel().rightArm;
|
||||
arm.pivotX -= sigma;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue