Added batpony models

This commit is contained in:
Sollace 2018-08-24 17:19:21 +02:00
parent 96e429930b
commit d20199fffb
4 changed files with 57 additions and 1 deletions

View file

@ -16,6 +16,9 @@ public interface PMAPI {
ModelWrapper pegasus = new ModelWrapper(new ModelPegasus(false)); ModelWrapper pegasus = new ModelWrapper(new ModelPegasus(false));
ModelWrapper pegasusSmall = new ModelWrapper(new ModelPegasus(true)); ModelWrapper pegasusSmall = new ModelWrapper(new ModelPegasus(true));
ModelWrapper bat = new ModelWrapper(new ModelBatpony(false));
ModelWrapper batSmall = new ModelWrapper(new ModelBatpony(true));
ModelWrapper unicorn = new ModelWrapper(new ModelUnicorn(false)); ModelWrapper unicorn = new ModelWrapper(new ModelUnicorn(false));
ModelWrapper unicornSmall = new ModelWrapper(new ModelUnicorn(true)); ModelWrapper unicornSmall = new ModelWrapper(new ModelUnicorn(true));

View file

@ -0,0 +1,52 @@
package com.minelittlepony.model.player;
import com.minelittlepony.model.components.PegasusWings;
import com.minelittlepony.render.PonyRenderer;
import net.minecraft.entity.Entity;
import com.minelittlepony.model.capabilities.IModelPegasus;
public class ModelBatpony extends ModelEarthPony implements IModelPegasus {
public PegasusWings<ModelBatpony> wings;
public ModelBatpony(boolean smallArms) {
super(smallArms);
}
@Override
public void init(float yOffset, float stretch) {
super.init(yOffset, stretch);
wings = new PegasusWings<>(this, yOffset, stretch);
}
@Override
public void setRotationAngles(float move, float swing, float ticks, float headYaw, float headPitch, float scale, Entity entity) {
super.setRotationAngles(move, swing, ticks, headYaw, headPitch, scale, entity);
wings.setRotationAndAngles(rainboom, move, swing, 0, ticks);
saddlebags.sethangingLow(wingsAreOpen());
}
@Override
protected void renderBody(Entity entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
super.renderBody(entity, move, swing, ticks, headYaw, headPitch, scale);
wings.renderPart(scale);
}
@Override
protected void initEars(PonyRenderer head, float yOffset, float stretch) {
head.child()
.rotate(0, 0, -0.1F)
.tex(14, 16).box(-4, -6, 1, 1, 2, 2, stretch) // right ear
.tex(0, 3).box(-4, -6, 2.5F, 1, 1, 1, stretch)
.tex(0, 5).box(-4, -6.7F, 2, 1, 1, 1, stretch);
head.child().flip()
.rotate(0, 0, 0.1F)
.tex(14, 16).box( 3, -6, 1, 1, 2, 2, stretch) // left ear
.tex(0, 3).box( 3, -6, 2.5F, 1, 1, 1, stretch)
.tex(0, 5).box( 3, -6.7F, 2, 1, 1, 1, stretch);
}
}

View file

@ -15,6 +15,7 @@ public enum PlayerModels {
DEFAULT("default", "slim", () -> PMAPI.earthpony, () -> PMAPI.earthponySmall), DEFAULT("default", "slim", () -> PMAPI.earthpony, () -> PMAPI.earthponySmall),
EARTH("earthpony", "slimearthpony", () -> PMAPI.earthpony, () -> PMAPI.earthponySmall), EARTH("earthpony", "slimearthpony", () -> PMAPI.earthpony, () -> PMAPI.earthponySmall),
PEGASUS("pegasus", "slimpegasus", () -> PMAPI.pegasus, () -> PMAPI.pegasusSmall), PEGASUS("pegasus", "slimpegasus", () -> PMAPI.pegasus, () -> PMAPI.pegasusSmall),
BATPONY("batpony", "slimbatpont", () -> PMAPI.bat, () -> PMAPI.batSmall),
UNICORN("unicorn", "slimunicorn", () -> PMAPI.unicorn, () -> PMAPI.unicornSmall), UNICORN("unicorn", "slimunicorn", () -> PMAPI.unicorn, () -> PMAPI.unicornSmall),
ALICORN("alicorn", "slimalicorn", () -> PMAPI.alicorn, () -> PMAPI.alicornSmall), ALICORN("alicorn", "slimalicorn", () -> PMAPI.alicorn, () -> PMAPI.alicornSmall),
ZEBRA("zebra", "slimzebra", () -> PMAPI.zebra, () -> PMAPI.zebraSmall), ZEBRA("zebra", "slimzebra", () -> PMAPI.zebra, () -> PMAPI.zebraSmall),

View file

@ -14,7 +14,7 @@ public enum PonyRace implements ITriggerPixelMapped<PonyRace> {
REFORMED_CHANGELING(0xcaed5a, PlayerModels.ALICORN, true, true), REFORMED_CHANGELING(0xcaed5a, PlayerModels.ALICORN, true, true),
GRIFFIN(0xae9145, PlayerModels.PEGASUS, true, false), GRIFFIN(0xae9145, PlayerModels.PEGASUS, true, false),
HIPPOGRIFF(0xd6ddac, PlayerModels.PEGASUS, true, false), HIPPOGRIFF(0xd6ddac, PlayerModels.PEGASUS, true, false),
BATPONY(0xdddddd, PlayerModels.PEGASUS, true, false), BATPONY(0xdddddd, PlayerModels.BATPONY, true, false),
SEAPONY(0x3655dd, PlayerModels.SEAPONY, false, true); SEAPONY(0x3655dd, PlayerModels.SEAPONY, false, true);
private boolean wings; private boolean wings;