2015-11-17 06:09:04 +01:00
|
|
|
package com.brohoof.minelittlepony.model;
|
2015-08-02 00:36:33 +02:00
|
|
|
|
2015-12-09 04:14:42 +01:00
|
|
|
import com.brohoof.minelittlepony.PonyData;
|
2015-11-17 06:09:04 +01:00
|
|
|
|
2015-08-02 00:36:33 +02:00
|
|
|
public class PlayerModel {
|
|
|
|
|
2015-12-09 04:14:42 +01:00
|
|
|
private final ModelPony model;
|
|
|
|
private ModelArmor armor;
|
|
|
|
private float shadowsize = 0.5F;
|
|
|
|
|
|
|
|
public PlayerModel(ModelPony model) {
|
2015-08-02 00:36:33 +02:00
|
|
|
this.model = model;
|
|
|
|
}
|
|
|
|
|
|
|
|
public PlayerModel setTextureHeight(int height) {
|
2015-12-09 04:14:42 +01:00
|
|
|
getModel().textureHeight = height;
|
2015-08-02 00:36:33 +02:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2015-12-09 04:14:42 +01:00
|
|
|
public ModelPony getModel() {
|
|
|
|
return model;
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
|
|
|
|
2015-12-09 04:14:42 +01:00
|
|
|
public PlayerModel setArmor(ModelArmor armor) {
|
|
|
|
this.armor = armor;
|
2015-08-02 00:36:33 +02:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2015-12-09 04:14:42 +01:00
|
|
|
public PlayerModel setShadowsize(float shadowsize) {
|
|
|
|
this.shadowsize = shadowsize;
|
2015-08-02 00:36:33 +02:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2015-12-09 04:14:42 +01:00
|
|
|
public float getShadowsize() {
|
|
|
|
return shadowsize;
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
|
|
|
|
2015-12-09 04:14:42 +01:00
|
|
|
public void init() {
|
|
|
|
getModel().init(0, 0);
|
|
|
|
getArmor().modelArmorChestplate.init(0.0F, 1.0F);
|
|
|
|
getArmor().modelArmor.init(0.0F, 0.5F);
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
|
|
|
|
2015-12-09 04:14:42 +01:00
|
|
|
public ModelArmor getArmor() {
|
|
|
|
return armor;
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
2015-12-09 04:14:42 +01:00
|
|
|
|
|
|
|
public void apply(PonyData meta) {
|
|
|
|
model.metadata = meta;
|
|
|
|
armor.apply(meta);
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
|
|
|
}
|