mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Unbroked breezies
This commit is contained in:
parent
fb6dd10d9c
commit
facb3e6ab0
2 changed files with 47 additions and 24 deletions
|
@ -1,7 +1,6 @@
|
|||
package com.minelittlepony.client.model.entity;
|
||||
|
||||
import net.minecraft.client.model.ModelPart;
|
||||
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
@ -11,28 +10,25 @@ import com.google.common.collect.Iterables;
|
|||
import com.minelittlepony.mson.api.ModelContext;
|
||||
import com.minelittlepony.mson.api.MsonModel;
|
||||
import com.minelittlepony.mson.api.model.MsonPart;
|
||||
import com.minelittlepony.mson.api.model.biped.MsonBiped;
|
||||
|
||||
import static com.minelittlepony.model.PonyModelConstants.PI;
|
||||
|
||||
public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> implements MsonModel {
|
||||
public class ModelBreezie<T extends LivingEntity> extends MsonBiped<T> implements MsonModel {
|
||||
|
||||
private ModelPart neck;
|
||||
private ModelPart tail;
|
||||
private ModelPart tailStub;
|
||||
|
||||
private ModelPart leftWing;
|
||||
private ModelPart rightWing;
|
||||
|
||||
public ModelBreezie() {
|
||||
super(1);
|
||||
textureHeight = 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(ModelContext context) {
|
||||
super.init(context);
|
||||
neck = context.findByName("neck");
|
||||
tail = context.findByName("tail");
|
||||
tailStub = context.findByName("tail_stub");
|
||||
leftWing = context.findByName("left_wing");
|
||||
rightWing = context.findByName("right_wing");
|
||||
}
|
||||
|
@ -45,7 +41,7 @@ public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> im
|
|||
|
||||
@Override
|
||||
protected Iterable<ModelPart> getBodyParts() {
|
||||
return Iterables.concat(super.getBodyParts(), ImmutableList.of(neck, tailStub, tail, leftWing, rightWing));
|
||||
return Iterables.concat(super.getBodyParts(), ImmutableList.of(neck, leftWing, rightWing));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -85,6 +81,16 @@ public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> im
|
|||
rightArm.pitch += rotX;
|
||||
rightArm.roll += rotZ;
|
||||
|
||||
rotX = MathHelper.sin(ticks * 0.3F) * 0.05F;
|
||||
rotZ = MathHelper.cos(ticks * 0.2F) * 0.05F + 0.05F;
|
||||
|
||||
rotX -= 0.05F;
|
||||
|
||||
leftWing.yaw = rotX * 10;
|
||||
leftWing.pitch = rotZ;
|
||||
rightWing.yaw = -rotX * 10;
|
||||
rightWing.pitch = rotZ;
|
||||
|
||||
if (rightArmPose == ArmPose.BOW_AND_ARROW) {
|
||||
raiseArm(rightArm, leftArm, -1);
|
||||
} else if (leftArmPose == ArmPose.BOW_AND_ARROW) {
|
||||
|
|
|
@ -18,7 +18,17 @@
|
|||
"rotate": [-15, 0, 0],
|
||||
"cubes": [
|
||||
{"from": [ 1, -11, -3], "size": [1, 6, 1], "texture": {"u": 28, "v": 2} },
|
||||
{"from": [-2, -11, -2], "size": [1, 6, 1], "texture": {"u": 24, "v": 2} }
|
||||
{"from": [-2, -11, -3], "size": [1, 6, 1], "texture": {"u": 24, "v": 2} }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"helmet": {
|
||||
"children": [
|
||||
{
|
||||
"center": [0, 0, -4],
|
||||
"cubes": [
|
||||
{"from": [-3, -6, -3], "size": [6, 6, 6] }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -33,23 +43,30 @@
|
|||
},
|
||||
"torso": {
|
||||
"texture": {"u": 2, "v": 12},
|
||||
"center": [-3, 2, -3],
|
||||
"rotate": [-30, 0, 0],
|
||||
"cubes": [
|
||||
{"from": [0, 0, 0], "size": [6, 7, 14] }
|
||||
]
|
||||
},
|
||||
"tail": {
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"texture": {"u": 40, "v": 7 },
|
||||
"center": [3, 0, 13],
|
||||
"rotate": [60, 0, 0],
|
||||
"cubes": [
|
||||
{"from": [0, 0, 0], "size": [1, 1, 3] }
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"texture": {"u": 32, "v": 0 },
|
||||
"rotate": [-57, 41, 212],
|
||||
"center": [-0.5, -1, 1],
|
||||
"rotate": [-20, 0, 0],
|
||||
"cubes": [
|
||||
{"from": [0, 0, 1], "size": [2, 9, 2] }
|
||||
]
|
||||
},
|
||||
"tail_stub": {
|
||||
"texture": {"u": 40, "v": 7 },
|
||||
"rotate": [-28, 98, 98],
|
||||
"cubes": [
|
||||
{"from": [0, 0, 0], "size": [1, 1, 3] }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"right_arm": {
|
||||
|
@ -96,7 +113,7 @@
|
|||
"texture": { "u": 0, "v": 40 },
|
||||
"mirror": true,
|
||||
"cubes": [
|
||||
{ "from": [24, -12, 0], "size": [ 24, 24, 0] }
|
||||
{ "from": [-22, -12, 0], "size": [ 24, 24, 0] }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue