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,11 +249,13 @@ 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);
}
} }
} }
} }