diff --git a/src/main/java/com/minelittlepony/client/model/entity/ModelBreezie.java b/src/main/java/com/minelittlepony/client/model/entity/ModelBreezie.java index 0a7822ab..7eaa18cb 100644 --- a/src/main/java/com/minelittlepony/client/model/entity/ModelBreezie.java +++ b/src/main/java/com/minelittlepony/client/model/entity/ModelBreezie.java @@ -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 extends BipedEntityModel implements MsonModel { +public class ModelBreezie extends MsonBiped 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 extends BipedEntityModel im @Override protected Iterable 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 extends BipedEntityModel 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) { diff --git a/src/main/resources/assets/minelittlepony/models/breezie.json b/src/main/resources/assets/minelittlepony/models/breezie.json index 76ede168..cf4a3bc4 100644 --- a/src/main/resources/assets/minelittlepony/models/breezie.json +++ b/src/main/resources/assets/minelittlepony/models/breezie.json @@ -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": { - "texture": {"u": 32, "v": 0 }, - "rotate": [-57, 41, 212], - "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] } + ], + "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 }, + "center": [-0.5, -1, 1], + "rotate": [-20, 0, 0], + "cubes": [ + {"from": [0, 0, 1], "size": [2, 9, 2] } + ] + } + ] + } ] }, "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] } ] } }