Fix LegacyKeyframeSetAdapter swallowing spectatedEntityID values of non-legacy Keyframes

This commit is contained in:
CrushedPixel
2015-07-26 12:38:41 +02:00
parent ee2b028ed8
commit 4a5f66cab9

View File

@@ -53,7 +53,11 @@ public class LegacyKeyframeSetAdapter extends TypeAdapter<KeyframeSet[]> {
spectatedEntityID = in.nextInt();
}
}
newKeyframe.getValue().setSpectatedEntityID(spectatedEntityID);
if(spectatedEntityID != null) {
newKeyframe.getValue().setSpectatedEntityID(spectatedEntityID);
}
in.endObject();
keyframes.add(newKeyframe);