I completely forgot that this was why I added an interpolator in the first place

This commit is contained in:
Sollace 2018-06-11 20:11:21 +02:00
parent a9abab820e
commit 1642614eb4

View file

@ -22,6 +22,7 @@ public class SaddleBags implements IModelPart {
float dropAmount = 0; float dropAmount = 0;
AbstractPonyModel model; AbstractPonyModel model;
public SaddleBags(AbstractPonyModel model) { public SaddleBags(AbstractPonyModel model) {
this.model = model; this.model = model;
@ -93,7 +94,6 @@ public class SaddleBags implements IModelPart {
leftBag.rotateAngleZ = bodySwing; leftBag.rotateAngleZ = bodySwing;
rightBag.rotateAngleZ = -bodySwing; rightBag.rotateAngleZ = -bodySwing;
// TODO: Interpolate
dropAmount = hangLow ? 0.15F : 0; dropAmount = hangLow ? 0.15F : 0;
} }
@ -103,16 +103,16 @@ public class SaddleBags implements IModelPart {
@Override @Override
public void renderPart(float scale) { public void renderPart(float scale) {
if (hangLow) { dropAmount = model.getMetadata().getInterpolator().interpolate("dropAmount", dropAmount, 3);
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
GlStateManager.translate(0, dropAmount, 0); GlStateManager.translate(0, dropAmount, 0);
}
leftBag.render(scale); leftBag.render(scale);
rightBag.render(scale); rightBag.render(scale);
if (hangLow) {
GlStateManager.popMatrix(); GlStateManager.popMatrix();
}
strap.render(scale); strap.render(scale);
} }