Allow continued use of most of pathing even if entity tracker fails
The failing entity tracker really only breaks spectator keyframes. This is also very desirable for minimal mode where entity tracker failure is highly likely.
This commit is contained in:
@@ -107,9 +107,7 @@ public class SPTimeline implements PathingRegistry {
|
||||
Validate.isTrue(defaultInterpolatorType != InterpolatorType.DEFAULT, "Must not be DEFAULT");
|
||||
this.defaultInterpolatorType = Validate.notNull(defaultInterpolatorType);
|
||||
|
||||
if (entityTracker != null) {
|
||||
timeline.pushChange(updateInterpolators());
|
||||
}
|
||||
timeline.pushChange(updateInterpolators());
|
||||
}
|
||||
|
||||
public Change setDefaultInterpolator(Interpolator interpolator) {
|
||||
@@ -521,6 +519,9 @@ public class SPTimeline implements PathingRegistry {
|
||||
}
|
||||
|
||||
private Change updateSpectatorPositions() {
|
||||
if (entityTracker == null) {
|
||||
return CombinedChange.create();
|
||||
}
|
||||
List<Change> changes = new ArrayList<>();
|
||||
timePath.updateAll();
|
||||
for (Keyframe keyframe : positionPath.getKeyframes()) {
|
||||
|
||||
Reference in New Issue
Block a user