Fix disguises and stuff
This commit is contained in:
@@ -4,18 +4,15 @@ import java.util.HashMap;
|
||||
|
||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
||||
|
||||
public class DisguiseValues
|
||||
{
|
||||
public class DisguiseValues {
|
||||
|
||||
private static HashMap<DisguiseType, DisguiseValues> values = new HashMap<>();
|
||||
|
||||
public static DisguiseValues getDisguiseValues(DisguiseType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
public static DisguiseValues getDisguiseValues(DisguiseType type) {
|
||||
switch (type) {
|
||||
case DONKEY:
|
||||
case MULE:
|
||||
case UNDEAD_HORSE:
|
||||
case ZOMBIE_HORSE:
|
||||
case SKELETON_HORSE:
|
||||
type = DisguiseType.HORSE;
|
||||
break;
|
||||
@@ -28,6 +25,7 @@ public class DisguiseValues
|
||||
type = DisguiseType.MINECART;
|
||||
break;
|
||||
case WITHER_SKELETON:
|
||||
case STRAY:
|
||||
type = DisguiseType.SKELETON;
|
||||
break;
|
||||
case ZOMBIE_VILLAGER:
|
||||
@@ -39,8 +37,7 @@ public class DisguiseValues
|
||||
return values.get(type);
|
||||
}
|
||||
|
||||
public static Class getNmsEntityClass(DisguiseType type)
|
||||
{
|
||||
public static Class getNmsEntityClass(DisguiseType type) {
|
||||
return getDisguiseValues(type).getNmsEntityClass();
|
||||
}
|
||||
|
||||
@@ -50,50 +47,41 @@ public class DisguiseValues
|
||||
private double maxHealth;
|
||||
private Class nmsEntityClass;
|
||||
|
||||
public DisguiseValues(DisguiseType type, Class classType, int entitySize, double maxHealth)
|
||||
{
|
||||
public DisguiseValues(DisguiseType type, Class classType, int entitySize, double maxHealth) {
|
||||
values.put(type, this);
|
||||
nmsEntityClass = classType;
|
||||
this.maxHealth = maxHealth;
|
||||
}
|
||||
|
||||
public FakeBoundingBox getAdultBox()
|
||||
{
|
||||
public FakeBoundingBox getAdultBox() {
|
||||
return adultBox;
|
||||
}
|
||||
|
||||
public FakeBoundingBox getBabyBox()
|
||||
{
|
||||
public FakeBoundingBox getBabyBox() {
|
||||
return babyBox;
|
||||
}
|
||||
|
||||
public float[] getEntitySize()
|
||||
{
|
||||
public float[] getEntitySize() {
|
||||
return entitySize;
|
||||
}
|
||||
|
||||
public double getMaxHealth()
|
||||
{
|
||||
public double getMaxHealth() {
|
||||
return maxHealth;
|
||||
}
|
||||
|
||||
public Class getNmsEntityClass()
|
||||
{
|
||||
public Class getNmsEntityClass() {
|
||||
return nmsEntityClass;
|
||||
}
|
||||
|
||||
public void setAdultBox(FakeBoundingBox newBox)
|
||||
{
|
||||
public void setAdultBox(FakeBoundingBox newBox) {
|
||||
adultBox = newBox;
|
||||
}
|
||||
|
||||
public void setBabyBox(FakeBoundingBox newBox)
|
||||
{
|
||||
public void setBabyBox(FakeBoundingBox newBox) {
|
||||
babyBox = newBox;
|
||||
}
|
||||
|
||||
public void setEntitySize(float[] size)
|
||||
{
|
||||
public void setEntitySize(float[] size) {
|
||||
this.entitySize = size;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user