LibsDisguises/src/main/java/me/libraryaddict/disguise/utilities/DisguiseValues.java

63 lines
1.5 KiB
Java
Raw Normal View History

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