2016-05-12 13:30:22 +02:00
|
|
|
package me.libraryaddict.disguise.utilities;
|
|
|
|
|
|
|
|
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
|
|
|
|
2018-08-06 11:48:19 +02:00
|
|
|
import java.util.HashMap;
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public class DisguiseValues {
|
2016-05-12 13:30:22 +02:00
|
|
|
|
|
|
|
private static HashMap<DisguiseType, DisguiseValues> values = new HashMap<>();
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public static DisguiseValues getDisguiseValues(DisguiseType type) {
|
2016-05-12 13:30:22 +02:00
|
|
|
return values.get(type);
|
|
|
|
}
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public static Class getNmsEntityClass(DisguiseType type) {
|
2016-05-12 13:30:22 +02:00
|
|
|
return getDisguiseValues(type).getNmsEntityClass();
|
|
|
|
}
|
|
|
|
|
|
|
|
private FakeBoundingBox adultBox;
|
|
|
|
private FakeBoundingBox babyBox;
|
|
|
|
private float[] entitySize;
|
|
|
|
private double maxHealth;
|
|
|
|
private Class nmsEntityClass;
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public DisguiseValues(DisguiseType type, Class classType, int entitySize, double maxHealth) {
|
2016-05-12 13:30:22 +02:00
|
|
|
values.put(type, this);
|
|
|
|
nmsEntityClass = classType;
|
|
|
|
this.maxHealth = maxHealth;
|
|
|
|
}
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public FakeBoundingBox getAdultBox() {
|
2016-05-12 13:30:22 +02:00
|
|
|
return adultBox;
|
|
|
|
}
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public FakeBoundingBox getBabyBox() {
|
2016-05-12 13:30:22 +02:00
|
|
|
return babyBox;
|
|
|
|
}
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public float[] getEntitySize() {
|
2016-05-12 13:30:22 +02:00
|
|
|
return entitySize;
|
|
|
|
}
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public double getMaxHealth() {
|
2016-05-12 13:30:22 +02:00
|
|
|
return maxHealth;
|
|
|
|
}
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public Class getNmsEntityClass() {
|
2016-05-12 13:30:22 +02:00
|
|
|
return nmsEntityClass;
|
|
|
|
}
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public void setAdultBox(FakeBoundingBox newBox) {
|
2016-05-12 13:30:22 +02:00
|
|
|
adultBox = newBox;
|
|
|
|
}
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public void setBabyBox(FakeBoundingBox newBox) {
|
2016-05-12 13:30:22 +02:00
|
|
|
babyBox = newBox;
|
|
|
|
}
|
|
|
|
|
2016-11-26 16:36:57 +01:00
|
|
|
public void setEntitySize(float[] size) {
|
2016-05-12 13:30:22 +02:00
|
|
|
this.entitySize = size;
|
|
|
|
}
|
|
|
|
}
|