Updating to 1.15-pre1 part 2

This commit is contained in:
Sollace 2019-11-23 20:32:44 +02:00
parent be14188f87
commit 4cc6d03fce
13 changed files with 227 additions and 138 deletions

View file

@ -6,73 +6,35 @@ import net.minecraft.entity.LivingEntity;
import net.minecraft.util.Arm;
import net.minecraft.util.math.MathHelper;
import com.minelittlepony.client.util.render.Part;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.minelittlepony.mson.api.model.MsonPart;
import static com.minelittlepony.model.PonyModelConstants.PI;
public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> {
Part neck;
Part tail;
Part tailStub;
private ModelPart neck;
private ModelPart tail;
private ModelPart tailStub;
Part leftWing;
Part rightWing;
private ModelPart leftWing;
private ModelPart rightWing;
public ModelBreezie() {
textureWidth = 64;
super(1);
textureHeight = 64;
helmet.visible = false;
head = new Part(this)
.child(new Part(this)
.addBox(-3, -6, -3, 6, 6, 6).around(0, 0, -4)
.tex(28, 0).addBox( 2, -7, 1, 1, 1, 1)
.tex(24, 0).addBox(-3, -7, 1, 1, 1, 1)
.tex(24, 9).addBox(-1, -2, -4, 2, 2, 1))
.child(new Part(this)
.tex(28, 2).addBox( 1, -11, -3, 1, 6, 1)
.tex(24, 2).addBox(-2, -11, -3, 1, 6, 1)
.rotate(-0.2617994F, 0, 0));
torso = new Part(this, 2, 12)
.addBox(0, 0, 0, 6, 7, 14).rotate(-0.5235988F, 0, 0).around(-3, 1, -3);
leftArm = new Part(this, 28, 12).addBox(0, 0, 0, 2, 12, 2).around( 1, 8, -5);
rightArm = new Part(this, 36, 12).addBox(0, 0, 0, 2, 12, 2).around(-3, 8, -5);
leftLeg = new Part(this, 8, 12) .addBox(0, 0, 0, 2, 12, 2).around( 1, 12, 3);
rightLeg = new Part(this, 0, 12) .addBox(0, 0, 0, 2, 12, 2).around(-3, 12, 3);
neck = new Part(this, 40, 0)
.addBox(0, 0, 0, 2, 5, 2)
.rotate(0.0872665F, 0, 0).around(-1, -2, -4);
tailStub = new Part(this, 40, 7)
.addBox(0, 0, 0, 1, 1, 3).around(-0.5F, 8, 8);
tail = new Part(this, 32, 0)
.addBox(0, 0, 1, 2, 9, 2).around(-1, 7, 10);
leftWing = new Part(this, 0, 40)
.addBox(0, -12, 0, 24, 24, 0)
.rotate(0, -0.6981317F, 0).around(2, 3, 1);
leftWing.setTextureSize(64, 32);
rightWing = new Part(this, 0, 40)
.addBox(-24, -12, 0, 24, 24, 0, true)
.rotate(0, 0.6981317F, 0).around(-2, 3, 1);
rightWing.setTextureSize(64, 32);
}
@Override
public void render(T entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
super.setAngles(entity, move, swing, ticks, headYaw, headPitch, scale);
neck.render(scale);
tailStub.render(scale);
tail.render(scale);
leftWing.render(scale);
rightWing.render(scale);
public void setVisible(boolean visible) {
super.setVisible(visible);
helmet.visible = false;
}
@Override
protected Iterable<ModelPart> getBodyParts() {
return Iterables.concat(super.getBodyParts(), ImmutableList.of(neck, tailStub, tail, leftWing, rightWing));
}
@Override
@ -84,16 +46,16 @@ public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> {
leftArm.pitch = MathHelper.cos(move * 0.6662F) * swing;
leftArm.roll = 0;
((Part)rightArm).rotate(swing * MathHelper.cos(move * 0.6662F + PI), 0, 0);
((Part)leftLeg) .rotate(swing * MathHelper.cos(move * 0.6662F + PI) * 1.4F, 0, 0);
((Part)rightLeg).rotate(swing * MathHelper.cos(move * 0.6662F) * 1.4F, 0, 0);
((MsonPart)rightArm).rotate(swing * MathHelper.cos(move * 0.6662F + PI), 0, 0);
((MsonPart)leftLeg) .rotate(swing * MathHelper.cos(move * 0.6662F + PI) * 1.4F, 0, 0);
((MsonPart)rightLeg).rotate(swing * MathHelper.cos(move * 0.6662F) * 1.4F, 0, 0);
if (isRiding) {
leftArm.pitch += -PI / 5;
rightArm.pitch += -PI / 5;
rotateLegRiding(((Part)leftLeg), -1);
rotateLegRiding(((Part)rightLeg), 1);
rotateLegRiding((MsonPart)leftLeg, -1);
rotateLegRiding((MsonPart)rightLeg, 1);
}
rotateArm(leftArm, leftArmPose, 1);
@ -119,7 +81,7 @@ public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> {
}
}
protected void rotateLegRiding(Part leg, float factor) {
protected void rotateLegRiding(MsonPart leg, float factor) {
leg.rotate(-1.4137167F, factor * PI / 10, factor * 0.07853982F);
}

View file

@ -2,10 +2,7 @@ package com.minelittlepony.client.model.entities;
import com.minelittlepony.client.model.armour.ModelPonyArmour;
import com.minelittlepony.client.model.armour.ArmourWrapper;
import com.minelittlepony.client.model.components.SeaponyTail;
import com.minelittlepony.client.model.entities.ModelSeapony.Armour;
import com.minelittlepony.client.model.races.ModelUnicorn;
import com.minelittlepony.client.util.render.Part;
import com.minelittlepony.model.BodyPart;
import com.minelittlepony.model.armour.IEquestrianArmour;
import com.minelittlepony.pony.IPony;
@ -17,8 +14,6 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.MathHelper;
import org.lwjgl.opengl.GL11;
public class ModelSeapony<T extends LivingEntity> extends ModelUnicorn<T> {
private ModelPart bodyCenter;
@ -51,50 +46,10 @@ public class ModelSeapony<T extends LivingEntity> extends ModelUnicorn<T> {
}
@Override
protected void ponySleep() {
// noop
}
protected void ponySleep() {}
@Override
protected void ponyRide() {
// noop
}
@Deprecated
protected void initLegs(float yOffset, float stretch) {
super.initLegs(yOffset, stretch);
// hide the back legs
leftLeg.visible = false;
rightLeg.visible = false;
leftPantLeg.visible = false;
rightPantLeg.visible = false;
centerFin = new Part(this, 58, 28)
.rotate(PI / 2 - 0.1F, 0, 0).around(0, 6, 9)
.east(0, -6, 0, 12, 6, stretch);
leftFin = new Part(this, 56, 16)
.rotate(0, FIN_ROT_Y, 0).around(3, -6, 3)
.flipZ().east(0, 0, 0, 12, 8, stretch);
rightFin = new Part(this, 56, 16)
.rotate(0, -FIN_ROT_Y, 0).around(-3, -6, 3)
.west(0, 0, 0, 12, 8, stretch);
}
@Deprecated
protected void initTail(float yOffset, float stretch) {
tail = new SeaponyTail(this);
tail.init(yOffset, stretch);
}
@Deprecated
protected void initBody(float yOffset, float stretch) {
super.initBody(yOffset, stretch);
bodyCenter = new Part(this, 0, 48)
.around(0, 6, 1)
.box(-3, -1, 0, 6, 7, 9, stretch).flip();
}
protected void ponyRide() {}
@Override
public void setAngles(T entity, float move, float swing, float ticks, float headYaw, float headPitch) {

View file

@ -10,8 +10,6 @@ import net.minecraft.util.math.MathHelper;
import net.minecraft.village.VillagerDataContainer;
import net.minecraft.village.VillagerProfession;
import com.minelittlepony.client.model.components.BatWings;
import com.minelittlepony.client.model.components.PonyEars;
import com.minelittlepony.client.model.races.ModelAlicorn;
import com.minelittlepony.client.render.entities.villager.PonyTextures;
import com.minelittlepony.model.IPart;
@ -36,18 +34,6 @@ public class ModelVillagerPony<T extends LivingEntity & VillagerDataContainer> e
return super.getWings();
}
@Override
protected void initWings(float yOffset, float stretch) {
super.initWings(yOffset, stretch);
batWings = new BatWings<>(this, yOffset, stretch);
}
@Override
protected void initEars(Part head, float yOffset, float stretch) {
ears = new PonyEars(head, true);
ears.init(yOffset, stretch);
}
@Override
protected void shakeBody(float move, float swing, float bodySwing, float ticks) {
super.shakeBody(move, swing, bodySwing, ticks);
@ -73,20 +59,6 @@ public class ModelVillagerPony<T extends LivingEntity & VillagerDataContainer> e
//trinket.render(stack, vertices, overlayUv, lightUv, red, green, blue, alpha);
}
@Override
public void init(float yOffset, float stretch) {
super.init(yOffset, stretch);
apron = new Part(this, 56, 16)
.offset(BODY_CENTRE_X, BODY_CENTRE_Y, BODY_CENTRE_Z)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
.south(-4, -4, -9, 8, 10, stretch);
trinket = new Part(this, 0, 3)
.offset(BODY_CENTRE_X, BODY_CENTRE_Y, BODY_CENTRE_Z)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
.south(-2, -4, -9, 4, 5, stretch);
}
@Override
public void setHatVisible(boolean visible) {
}

View file

@ -0,0 +1,102 @@
{
"parent": "mson:biped",
"texture": {
"w": 64, "h": 64
},
"head": {
"children": [
{
"center": [0, 0, -4],
"cubes" [
{"from": [-3, -6, -3], "size": [6, 6, 6] },
{"from": [ 2, -7, 1], "size": [1, 1, 1], "texture": ["u": 28, "v": 0] },
{"from": [-3, -7, 1], "size": [1, 1, 1], "texture": ["u": 24, "v": 0] },
{"from": [-1, -2, -4], "size": [2, 2, 1], "texture": ["u": 24, "v": 9] }
]
},
{
"rotate": [-0.2617994, 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] }
]
}
]
},
"neck": {
"texture": {"u": 40, "v": 0},
"rotate": [0.0872665, 0, 0],
"center": [-1, -2, -4],
"cubes": [
{"from": [0, 0, 0], "size": [2, 5, 2] }
]
},
"torso": {
"texture": {"u": 2, "v": 12},
"rotate": [-0.5235988, 0, 0],
"cubes": [
{"from": [0, 0, 0], "size": [6, 7, 14] }
]
},
"tail": {
"texture": {"u": 32, "v": 0 },
"rotate": [-1, 7, 10]
"cubes": [
{"from": [0, 0, 1], "size": [2, 9, 2] }
]
},
"tail_stub": {
"texture": {"u": 40, "v": 7 },
"rotate": [-0.5, 8, 8]
"cubes": [
{"from": [0, 0, 0], "size": [1, 1, 3] }
]
}
"right_arm": {
"center": [-3, 8, -5],
"texture": { "u": 36, "v": 12 },
"cubes": [
{ "from": [0, 0, 0], "size": [ 2, 12, 2] }
]
},
"left_arm": {
"center": [1, 8, -5],
"texture": { "u": 28, "v": 12 },
"mirror": true,
"cubes": [
{ "from": [0, 0, 0], "size": [ 2, 12, 2] }
]
},
"right_leg": {
"center": [-3, 12, 3],
"texture": { "u": 0, "v": 12 },
"cubes": [
{ "from": [0, 0, 0], "size": [ 2, 12, 2] }
]
},
"left_leg": {
"center": [1, 12, 3],
"texture": { "u": 8, "v": 12 },
"mirror": true,
"cubes": [
{ "from": [0, 0, 0], "size": [ 2, 12, 2] }
]
},
"left_wing": {
"center": [2, 3, 1],
"rotate": [0, -0.6981317, 0],
"texture": { "u": 0, "v": 40 },
"cubes": [
{ "from": [0, -12, 0], "size": [ 24, 24, 0] }
]
},
"right_wing": {
"center": [-2, 3, 1],
"rotate": [0, 0.6981317, 0],
"texture": { "u": 0, "v": 40 },
"mirror": true,
"cubes": [
{ "from": [24, -12, 0], "size": [ 24, 24, 0] }
]
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "minelittlepony:seapony"
}

View file

@ -0,0 +1,3 @@
{
"parent": "minelittlepony:races/alicorn"
}

View file

@ -0,0 +1,3 @@
{
"parent": "minelittlepony:races/changeling"
}

View file

@ -1,5 +1,5 @@
{
"parent": "minelittlepony:races/pegasus",
"parent": "minelittlepony:steve_pony",
"head": {
"offset": [ 0, -1, -2 ],
"center": [ 0, 0, -2 ],
@ -24,7 +24,7 @@
"wings": {
"type": "mson:slot",
"name": "wings",
"implementation": "com.minelittlepony.client.model.components.PegasusWings",
"implementation": "com.minelittlepony.client.model.components.BatWings",
"content: "minelitlepony:components/bat_wings"
}
}

View file

@ -0,0 +1,38 @@
{
"parent": "minelittlepony:races/alicorn",
"left_fin": {
"type": "mson:planar",
"texture": {"u": 56, "v": 16},
"mirror": [false, false, true],
"rotate": [0, 0.52, 0],
"center": [3, -6, 3],
"east": [0, 0, 0, 12, 8]
},
"right_fin": {
"type": "mson:planar",
"texture": {"u": 56, "v": 16},
"rotate": [0, -0.52, 0],
"center": [-3, -6, 3],
"west": [0, 0, 0, 12, 8]
},
"center_fin": {
"type": "mson:planar",
"texture": {"u": 58, "v": 28},
"rotate": [1.47, 0, 0],
"center": [0, 6, 9],
"east": [0, -6, 0, 12, 6]
},
"abdomin": {
"texture": {"u": 0, "v": 48},
"center": [0, 6, 1],
"cubes": [
{ "from": [-3, -1, 0], "size": [6, 7, 9] }
]
},
"tail": {
"type": "mson:slot",
"name": "tail",
"implementation": "com.minelittlepony.client.model.components.SeaponyTail",
"content": "minelittlepony:components/fish_tail"
}
}

View file

@ -0,0 +1,42 @@
{
"parent": "minelittlepony:races/pegasus",
"head": {
"offset": [ 0, -1, -2 ],
"center": [ 0, 0, -2 ],
"cubes": [
{ "from": [-4, -4, -4], "size": [ 8, 8, 8] }
],
"children": [
{
"type": "mson:slot",
"name": "snout",
"implementation": "com.minelittlepony.client.model.components.PonySnout",
"content: "minelitlepony:components/snout"
},
{
"type": "mson:slot",
"name": "ears",
"implementation": "com.minelittlepony.client.model.components.PonyEars",
"content": "minelittlepony:components/bat_ears"
}
]
},
"bat_wings": {
"type": "mson:slot",
"name": "wings",
"implementation": "com.minelittlepony.client.model.components.BatWings",
"content: "minelitlepony:components/bat_wings"
}
"apron": {
"type": "mson:planar",
"texture": {"u": 56, "v": 16},
"offset": [0, 8, 6],
"south": [-4, -4, -9, 8, 10]
},
"trinket": {
"type": "mson:planar",
"texture": {"u": 0, "v": 3},
"offset": [0, 8, 6],
"south": [-2, -4, -9, 4, 5]
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "minelittlepony:races/alicorn"
}

View file

@ -0,0 +1,3 @@
{
"parent": "minelittlepony:races/alicorn"
}

View file

@ -0,0 +1,3 @@
{
"parent": "minelittlepony:villager"
}