mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-21 20:18:01 +01:00
Fixed changeling wing positions
This commit is contained in:
parent
d10debe017
commit
d6d4fc8acc
3 changed files with 18 additions and 1 deletions
|
@ -7,6 +7,7 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.minelittlepony.api.model.*;
|
||||
import com.minelittlepony.api.pony.meta.Race;
|
||||
import com.minelittlepony.api.pony.meta.Wearable;
|
||||
import com.minelittlepony.mson.api.ModelView;
|
||||
import com.minelittlepony.mson.api.MsonModel;
|
||||
|
@ -119,10 +120,18 @@ public class PonyWings<T extends Model & IPegasus> implements IPart, MsonModel {
|
|||
|
||||
public void rotateWalking(float swing) {
|
||||
folded.yaw = swing * walkingRotationSpeed;
|
||||
Race race = pegasus.getMetadata().getRace();
|
||||
if (race == Race.CHANGELING || race == Race.CHANGEDLING) {
|
||||
extended.yaw = folded.yaw;
|
||||
}
|
||||
}
|
||||
|
||||
public void rotateFlying(float roll) {
|
||||
extended.roll = roll;
|
||||
Race race = pegasus.getMetadata().getRace();
|
||||
if (race == Race.CHANGELING || race == Race.CHANGEDLING) {
|
||||
folded.roll = roll;
|
||||
}
|
||||
}
|
||||
|
||||
public void render(MatrixStack stack, VertexConsumer vertices, int overlayUv, int lightUv, float red, float green, float blue, float alpha) {
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
"data": {
|
||||
"wings": {
|
||||
"data": "minelittlepony:components/bug_wings",
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyWings"
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyWings",
|
||||
"locals": {
|
||||
"wing_scale": 1.3,
|
||||
"walking_rotation_speed": 0.05
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,10 @@
|
|||
},
|
||||
"wings": {
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyWings",
|
||||
"locals": {
|
||||
"wing_scale": 1.3,
|
||||
"walking_rotation_speed": 0.05
|
||||
},
|
||||
"data": {
|
||||
"left_wing": {
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyWings$Wing",
|
||||
|
|
Loading…
Reference in a new issue