Renamed another method to be deprecated. Sorted them.
This commit is contained in:
@@ -8,14 +8,6 @@ public class DisguiseValues {
|
||||
|
||||
private static HashMap<DisguiseType, DisguiseValues> values = new HashMap<DisguiseType, DisguiseValues>();
|
||||
|
||||
public static Class getNmsEntityClass(DisguiseType type) {
|
||||
return getDisguiseValues(type).getNmsEntityClass();
|
||||
}
|
||||
|
||||
public static HashMap<Integer, Object> getMetaValues(DisguiseType type) {
|
||||
return getDisguiseValues(type).getMetaValues();
|
||||
}
|
||||
|
||||
public static DisguiseValues getDisguiseValues(DisguiseType type) {
|
||||
switch (type) {
|
||||
case DONKEY:
|
||||
@@ -43,9 +35,17 @@ public class DisguiseValues {
|
||||
return values.get(type);
|
||||
}
|
||||
|
||||
private Class nmsEntityClass;
|
||||
public static HashMap<Integer, Object> getMetaValues(DisguiseType type) {
|
||||
return getDisguiseValues(type).getMetaValues();
|
||||
}
|
||||
|
||||
public static Class getNmsEntityClass(DisguiseType type) {
|
||||
return getDisguiseValues(type).getNmsEntityClass();
|
||||
}
|
||||
|
||||
private int enumEntitySize;
|
||||
private HashMap<Integer, Object> metaValues = new HashMap<Integer, Object>();
|
||||
private Class nmsEntityClass;
|
||||
|
||||
public DisguiseValues(DisguiseType type, Class classType, int entitySize) {
|
||||
values.put(type, this);
|
||||
@@ -53,10 +53,6 @@ public class DisguiseValues {
|
||||
nmsEntityClass = classType;
|
||||
}
|
||||
|
||||
public Class getNmsEntityClass() {
|
||||
return nmsEntityClass;
|
||||
}
|
||||
|
||||
public int getEntitySize(double paramDouble) {
|
||||
double d = paramDouble - (((int) Math.floor(paramDouble)) + 0.5D);
|
||||
|
||||
@@ -104,6 +100,10 @@ public class DisguiseValues {
|
||||
return metaValues;
|
||||
}
|
||||
|
||||
public Class getNmsEntityClass() {
|
||||
return nmsEntityClass;
|
||||
}
|
||||
|
||||
public void setMetaValue(int no, Object value) {
|
||||
metaValues.put(no, value);
|
||||
}
|
||||
|
@@ -446,7 +446,7 @@ public class PacketsManager {
|
||||
}
|
||||
Disguise disguise = DisguiseAPI.getDisguise(disguisedEntity);
|
||||
if (disguise != null) {
|
||||
if (disguise.canHearSelfDisguise() || disguisedEntity != event.getPlayer()) {
|
||||
if (disguise.isSelfDisguiseSoundsReplaced() || disguisedEntity != event.getPlayer()) {
|
||||
if (disguise.isSoundsReplaced()) {
|
||||
String sound = null;
|
||||
DisguiseSound dSound = DisguiseSound.getType(disguise.getType().name());
|
||||
@@ -531,7 +531,7 @@ public class PacketsManager {
|
||||
// It made a damage animation
|
||||
Entity entity = event.getPacket().getEntityModifier(observer.getWorld()).read(0);
|
||||
Disguise disguise = DisguiseAPI.getDisguise(entity);
|
||||
if (disguise != null && (disguise.canHearSelfDisguise() || entity != event.getPlayer())) {
|
||||
if (disguise != null && (disguise.isSelfDisguiseSoundsReplaced() || entity != event.getPlayer())) {
|
||||
DisguiseSound disSound = DisguiseSound.getType(entity.getType().name());
|
||||
if (disSound == null)
|
||||
return;
|
||||
@@ -553,8 +553,8 @@ public class PacketsManager {
|
||||
soundType = SoundType.HURT;
|
||||
}
|
||||
if (disSound.getSound(soundType) == null
|
||||
|| (disguise.canHearSelfDisguise() && entity == event.getPlayer())) {
|
||||
if (disguise.canHearSelfDisguise() && entity == event.getPlayer()) {
|
||||
|| (disguise.isSelfDisguiseSoundsReplaced() && entity == event.getPlayer())) {
|
||||
if (disguise.isSelfDisguiseSoundsReplaced() && entity == event.getPlayer()) {
|
||||
cancelSound = !cancelSound;
|
||||
if (cancelSound)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user