Fix bangle being in the wrong place for steve

This commit is contained in:
Sollace 2022-01-06 15:31:10 +02:00
parent ea38a6f1ff
commit 7578b02867
2 changed files with 10 additions and 5 deletions

View file

@ -28,8 +28,8 @@ class BangleGear implements IGear {
private int color; private int color;
private boolean alex; private boolean alex;
private BraceletModel steveModel; private final BraceletModel steveModel;
private BraceletModel alexModel; private final BraceletModel alexModel;
private IModel model; private IModel model;

View file

@ -49,7 +49,6 @@ public class BraceletFeatureRenderer<E extends LivingEntity> implements Accessor
@Override @Override
public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, E entity, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) { public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, E entity, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) {
ItemStack item = entity.getEquippedStack(EquipmentSlot.CHEST); ItemStack item = entity.getEquippedStack(EquipmentSlot.CHEST);
if (item.getItem() instanceof FriendshipBraceletItem) { if (item.getItem() instanceof FriendshipBraceletItem) {
@ -128,8 +127,14 @@ public class BraceletFeatureRenderer<E extends LivingEntity> implements Accessor
ModelData data = new ModelData(); ModelData data = new ModelData();
ModelPartData root = data.getRoot(); ModelPartData root = data.getRoot();
root.addChild(EntityModelPartNames.RIGHT_ARM, ModelPartBuilder.create().uv(0, alex ? 6 : 0).cuboid(-2 + x, 7 + y, -2 + z, alex ? 3 : 4, 2, 4, dilation), ModelTransform.NONE); root.addChild(EntityModelPartNames.RIGHT_ARM,
root.addChild(EntityModelPartNames.LEFT_ARM, ModelPartBuilder.create().mirrored().uv(0, alex ? 6 : 0).cuboid(-1 - x, 7 + y, -2 + z, alex ? 3 : 4, 2, 4, dilation), ModelTransform.NONE); ModelPartBuilder.create()
.uv(0, alex ? 6 : 0)
.cuboid((alex ? -2 : -3) + x, 7 + y, -2 + z, alex ? 3 : 4, 2, 4, dilation), ModelTransform.NONE);
root.addChild(EntityModelPartNames.LEFT_ARM,
ModelPartBuilder.create().mirrored()
.uv(0, alex ? 6 : 0)
.cuboid(-1 - x, 7 + y, -2 + z, alex ? 3 : 4, 2, 4, dilation), ModelTransform.NONE);
return TexturedModelData.of(data, 64, 32); return TexturedModelData.of(data, 64, 32);
} }