mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Adjusted changeling wing position and animation.
- Don't open wings if swimming (looks odd) - Don't wear saddlebags (same reason)
This commit is contained in:
parent
341383bd42
commit
837315d008
2 changed files with 19 additions and 4 deletions
|
@ -24,14 +24,14 @@ public class ModelBugWing<T extends AbstractPonyModel & IModelPegasus> extends M
|
|||
.rotateAngleY = r * 3;
|
||||
|
||||
PlaneRenderer primary = new PlaneRenderer(pegasus)
|
||||
.tex(56, 17)
|
||||
.tex(56, 16)
|
||||
.mirror(right)
|
||||
.west(0, 0, -7, 15, 8, scale);
|
||||
.west(r * -0.5F, 0, -7, 16, 8, scale);
|
||||
PlaneRenderer secondary = new PlaneRenderer(pegasus)
|
||||
.tex(56, 32)
|
||||
.rotate(-0.5F, r * 0.3F, r / 3)
|
||||
.mirror(right)
|
||||
.west(0, 0, -7, 15, 8, scale);
|
||||
.west(r, 0, -5, 16, 8, scale);
|
||||
|
||||
extended.child(primary);
|
||||
extended.child(secondary);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.minelittlepony.model.player;
|
||||
|
||||
import com.minelittlepony.pony.data.PonyWearable;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.minelittlepony.model.components.BugWings;
|
||||
|
@ -15,11 +16,25 @@ public class ModelChangeling extends ModelAlicorn {
|
|||
wings = new BugWings<>(this, yOffset, stretch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean wingsAreOpen() {
|
||||
return (isFlying() || isCrouching()) && !isElytraFlying();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getWingRotationFactor(float ticks) {
|
||||
if (isFlying()) {
|
||||
return MathHelper.sin(ticks * 3) + ROTATE_270 + 0.4f;
|
||||
return MathHelper.sin(ticks * 3) + ROTATE_270;
|
||||
}
|
||||
return WING_ROT_Z_SNEAK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWearing(PonyWearable wearable) {
|
||||
if (wearable == PonyWearable.SADDLE_BAGS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return super.isWearing(wearable);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue