mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Extend MsonPlayer instead of PlayerEntityModel
This commit is contained in:
parent
f09d299509
commit
6972aff1b6
4 changed files with 4 additions and 30 deletions
|
@ -8,10 +8,7 @@ import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.IPart;
|
import com.minelittlepony.model.IPart;
|
||||||
import com.minelittlepony.model.armour.IEquestrianArmour;
|
import com.minelittlepony.model.armour.IEquestrianArmour;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
import com.minelittlepony.mson.api.mixin.Extends;
|
|
||||||
import com.minelittlepony.mson.api.mixin.MixedMsonModel;
|
|
||||||
import com.minelittlepony.mson.api.model.MsonPart;
|
import com.minelittlepony.mson.api.model.MsonPart;
|
||||||
import com.minelittlepony.mson.api.model.biped.MsonBiped;
|
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
|
@ -25,9 +22,7 @@ import net.minecraft.util.math.MathHelper;
|
||||||
/**
|
/**
|
||||||
* Foundation class for all types of ponies.
|
* Foundation class for all types of ponies.
|
||||||
*/
|
*/
|
||||||
@Extends(MsonBiped.class)
|
public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPonyModel<T> {
|
||||||
public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPonyModel<T>
|
|
||||||
implements MixedMsonModel {
|
|
||||||
|
|
||||||
protected ModelPart upperTorso;
|
protected ModelPart upperTorso;
|
||||||
protected ModelPart upperTorsoOverlay;
|
protected ModelPart upperTorsoOverlay;
|
||||||
|
@ -38,13 +33,9 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
protected PonySnout snout;
|
protected PonySnout snout;
|
||||||
protected IPart ears;
|
protected IPart ears;
|
||||||
|
|
||||||
public AbstractPonyModel(boolean arms) {
|
|
||||||
super(0, arms);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
MixedMsonModel.super.init(context);
|
super.init(context);
|
||||||
context.findByName("left_sleeve", leftSleeve);
|
context.findByName("left_sleeve", leftSleeve);
|
||||||
context.findByName("right_sleeve", rightSleeve);
|
context.findByName("right_sleeve", rightSleeve);
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@ package com.minelittlepony.client.model;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
||||||
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.util.Arm;
|
import net.minecraft.util.Arm;
|
||||||
|
|
||||||
import com.minelittlepony.client.pony.PonyData;
|
import com.minelittlepony.client.pony.PonyData;
|
||||||
import com.minelittlepony.model.ModelAttributes;
|
import com.minelittlepony.model.ModelAttributes;
|
||||||
|
import com.minelittlepony.mson.api.model.biped.MsonPlayer;
|
||||||
import com.minelittlepony.pony.IPony;
|
import com.minelittlepony.pony.IPony;
|
||||||
import com.minelittlepony.pony.IPonyData;
|
import com.minelittlepony.pony.IPonyData;
|
||||||
import com.minelittlepony.pony.meta.Size;
|
import com.minelittlepony.pony.meta.Size;
|
||||||
|
@ -19,7 +19,7 @@ import com.minelittlepony.pony.meta.Size;
|
||||||
*
|
*
|
||||||
* Modders can extend this class to make their own pony models if they wish.
|
* Modders can extend this class to make their own pony models if they wish.
|
||||||
*/
|
*/
|
||||||
public abstract class ClientPonyModel<T extends LivingEntity> extends PlayerEntityModel<T> implements IPonyModel<T> {
|
public abstract class ClientPonyModel<T extends LivingEntity> extends MsonPlayer<T> implements IPonyModel<T> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The model attributes.
|
* The model attributes.
|
||||||
|
@ -31,10 +31,6 @@ public abstract class ClientPonyModel<T extends LivingEntity> extends PlayerEnti
|
||||||
*/
|
*/
|
||||||
protected IPonyData metadata = new PonyData();
|
protected IPonyData metadata = new PonyData();
|
||||||
|
|
||||||
public ClientPonyModel(float float_1, boolean boolean_1) {
|
|
||||||
super(float_1, boolean_1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateLivingState(T entity, IPony pony) {
|
public void updateLivingState(T entity, IPony pony) {
|
||||||
isChild = entity.isBaby();
|
isChild = entity.isBaby();
|
||||||
|
|
|
@ -22,7 +22,6 @@ public class ModelPonyArmour<T extends LivingEntity> extends AbstractPonyModel<T
|
||||||
private ArmourVariant variant = ArmourVariant.NORMAL;
|
private ArmourVariant variant = ArmourVariant.NORMAL;
|
||||||
|
|
||||||
public ModelPonyArmour() {
|
public ModelPonyArmour() {
|
||||||
super(false);
|
|
||||||
textureHeight = 32;
|
textureHeight = 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,16 @@
|
||||||
package com.minelittlepony.client.model.entity.race;
|
package com.minelittlepony.client.model.entity.race;
|
||||||
|
|
||||||
import com.minelittlepony.client.model.AbstractPonyModel;
|
import com.minelittlepony.client.model.AbstractPonyModel;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
|
||||||
public class ModelEarthPony<T extends LivingEntity> extends AbstractPonyModel<T> {
|
public class ModelEarthPony<T extends LivingEntity> extends AbstractPonyModel<T> {
|
||||||
|
|
||||||
private final boolean smallArms;
|
private final boolean smallArms;
|
||||||
|
|
||||||
private ModelPart cape;
|
|
||||||
|
|
||||||
public ModelEarthPony(boolean smallArms) {
|
public ModelEarthPony(boolean smallArms) {
|
||||||
super(smallArms);
|
|
||||||
this.smallArms = smallArms;
|
this.smallArms = smallArms;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(ModelContext context) {
|
|
||||||
super.init(context);
|
|
||||||
cape = context.findByName("cape");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAngles(T entity, float move, float swing, float ticks, float headYaw, float headPitch) {
|
public void setAngles(T entity, float move, float swing, float ticks, float headYaw, float headPitch) {
|
||||||
super.setAngles(entity, move, swing, ticks, headYaw, headPitch);
|
super.setAngles(entity, move, swing, ticks, headYaw, headPitch);
|
||||||
|
|
Loading…
Reference in a new issue