2016-11-17 05:45:04 +01:00
|
|
|
package com.minelittlepony.model;
|
2015-08-02 00:36:33 +02:00
|
|
|
|
2016-11-17 05:45:04 +01:00
|
|
|
import com.minelittlepony.PonyData;
|
2015-11-17 06:09:04 +01:00
|
|
|
|
2015-08-02 00:36:33 +02:00
|
|
|
public class PlayerModel {
|
|
|
|
|
2015-12-16 05:29:47 +01:00
|
|
|
private final AbstractPonyModel model;
|
|
|
|
private AbstractArmor armor;
|
2015-12-09 04:14:42 +01:00
|
|
|
|
2015-12-16 05:29:47 +01:00
|
|
|
public PlayerModel(AbstractPonyModel model) {
|
2015-08-02 00:36:33 +02:00
|
|
|
this.model = model;
|
|
|
|
}
|
|
|
|
|
2015-12-16 05:29:47 +01:00
|
|
|
public AbstractPonyModel getModel() {
|
2015-12-09 04:14:42 +01:00
|
|
|
return model;
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
|
|
|
|
2015-12-16 05:29:47 +01:00
|
|
|
public PlayerModel setArmor(AbstractArmor armor) {
|
2015-12-09 04:14:42 +01:00
|
|
|
this.armor = armor;
|
2015-12-29 02:52:58 +01:00
|
|
|
this.armor.apply(model.metadata);
|
2015-08-02 00:36:33 +02:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
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-16 05:29:47 +01:00
|
|
|
public AbstractArmor getArmor() {
|
2015-12-09 04:14:42 +01:00
|
|
|
return armor;
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
2016-11-25 05:40:19 +01: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
|
|
|
}
|
|
|
|
}
|