mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 12:37:59 +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 net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
import com.minelittlepony.api.model.*;
|
import com.minelittlepony.api.model.*;
|
||||||
|
import com.minelittlepony.api.pony.meta.Race;
|
||||||
import com.minelittlepony.api.pony.meta.Wearable;
|
import com.minelittlepony.api.pony.meta.Wearable;
|
||||||
import com.minelittlepony.mson.api.ModelView;
|
import com.minelittlepony.mson.api.ModelView;
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
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) {
|
public void rotateWalking(float swing) {
|
||||||
folded.yaw = swing * walkingRotationSpeed;
|
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) {
|
public void rotateFlying(float roll) {
|
||||||
extended.roll = 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) {
|
public void render(MatrixStack stack, VertexConsumer vertices, int overlayUv, int lightUv, float red, float green, float blue, float alpha) {
|
||||||
|
|
|
@ -3,7 +3,11 @@
|
||||||
"data": {
|
"data": {
|
||||||
"wings": {
|
"wings": {
|
||||||
"data": "minelittlepony:components/bug_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": {
|
"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
|
||||||
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"left_wing": {
|
"left_wing": {
|
||||||
"implementation": "com.minelittlepony.client.model.part.PonyWings$Wing",
|
"implementation": "com.minelittlepony.client.model.part.PonyWings$Wing",
|
||||||
|
|
Loading…
Reference in a new issue