WIP: custom armor model
This commit is contained in:
parent
04de4d0873
commit
06d54a634c
7 changed files with 61 additions and 17 deletions
|
@ -11,14 +11,19 @@ import net.minecraft.entity.LivingEntity;
|
|||
|
||||
public class CrystaliteLeggingsModel extends BipedEntityModel<LivingEntity> {
|
||||
|
||||
public ModelPart jacket;
|
||||
|
||||
public CrystaliteLeggingsModel(float scale) {
|
||||
super(RenderLayer::getEntityTranslucent, scale, 0.0F, 64, 32);
|
||||
super(RenderLayer::getEntityTranslucent, scale, 0.0F, 64, 48);
|
||||
this.jacket = new ModelPart(this, 16, 16);
|
||||
this.jacket.addCuboid(-4.0F, 0.0F, -2.0F, 8.0F, 12.0F, 4.0F, scale);
|
||||
this.jacket.setPivot(0.0F, 0.0F, 0.0F);
|
||||
this.leftLeg = new ModelPart(this, 0, 32);
|
||||
this.leftLeg.addCuboid(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F, scale);
|
||||
this.leftLeg.setPivot(1.9F, 12.0F, 0.0F);
|
||||
this.rightLeg = new ModelPart(this, 0, 16);
|
||||
this.rightLeg.addCuboid(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F, scale);
|
||||
this.rightLeg.setPivot(-1.9F, 12.0F, 0.0F);
|
||||
this.leftLeg = new ModelPart(this, 0, 16);
|
||||
this.leftLeg.addCuboid(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F, scale);
|
||||
this.leftLeg.setPivot(1.9F, 12.0F, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -28,6 +33,12 @@ public class CrystaliteLeggingsModel extends BipedEntityModel<LivingEntity> {
|
|||
|
||||
@Override
|
||||
protected Iterable<ModelPart> getBodyParts() {
|
||||
return Lists.newArrayList(rightLeg, leftLeg);
|
||||
return Lists.newArrayList(jacket, rightLeg, leftLeg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAngles(LivingEntity livingEntity, float f, float g, float h, float i, float j) {
|
||||
super.setAngles(livingEntity, f, g, h, i, j);
|
||||
this.jacket.copyPositionAndRotation(torso);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue