Stop comparing values to classes

This commit is contained in:
Andrew 2013-07-12 08:33:26 +12:00
parent 84919eeea5
commit 590afd86d8

View file

@ -249,14 +249,16 @@ public class Disguise {
HashMap<Integer, Object> entity = Values.getMetaValues(DisguiseType.getType(type)); HashMap<Integer, Object> entity = Values.getMetaValues(DisguiseType.getType(type));
HashMap<Integer, Object> disguise = Values.getMetaValues(getType()); HashMap<Integer, Object> disguise = Values.getMetaValues(getType());
for (int i : entity.keySet()) { for (int i : entity.keySet()) {
if (!disguise.containsKey(i) || entity.get(i) != disguise.get(i) || entity.get(i).getClass() != disguise.get(i)) { if (!disguise.containsKey(i) || entity.get(i) != disguise.get(i)
if (disguise.containsKey(i)) || entity.get(i).getClass() != disguise.get(i).getClass()) {
if (disguise.containsKey(i)) {
watcher.setValue(i, disguise.get(i)); watcher.setValue(i, disguise.get(i));
else } else {
watcher.setValue(i, null); watcher.setValue(i, null);
} }
} }
} }
}
public DisguiseType getType() { public DisguiseType getType() {
return disguiseType; return disguiseType;