Merge branch '1.8.9' into 1.9.4
24c58cbMerge branch '1.8' into 1.8.91ffeb01Update jGuic122d30Merge branch '1.8-path-segments' into 1.827fd25aFix crash when server responds with garbage to language query (fixes #51)db6b0ffFix / by 0 when two spectator keyframes are closer than 50ms (fixes #60)d61d0acFix hand of invisible spectated player being visible (fixes #59)f7460f9Re-enable time path after path playback (fixes #55)bdbffd5Add Catmull-Rom spline interpolator to simplepathing5cbfd28Generate interpolator settings from InterpolatorType enum6095aefFix loading and storing of default interpolator with settings3f52336Revert "Fix AbstractMethodError caused by FG2.0 not supporting lambdas (fixes #58)"c6293bcUpdate to FG2.2c8126edMerge '1.8' into 1.8.964898ceFix NPE when saving recorded resource pack70e3e54Fix AbstractMethodError caused by FG2.0 not supporting lambdas (fixes #58)3f2b3d6Fix replacing source file in Replay Editor (fixes #57)d2def94Fix duration of replays corrupted because of JVM/OS crash2c64030Refactor simple pathing timeline logic into dedicated class with unit tests Fix logic for user-set interpolators4deb374Enable validation on focus change for all number input fields5302bcaFix id and text of Replay Editor button in docs057edccManually inject root cert for cross-signed LetsEncrypt cert in requestscd16211Register new Property to imply that the path segment following a keyframe has a user-set interpolator instead of the default Modified Keyframe GUI to allow for custom Path interpolator
This commit is contained in:
@@ -9,10 +9,10 @@ import com.replaymod.replaystudio.pathing.interpolation.Interpolator;
|
||||
import com.replaymod.replaystudio.pathing.path.Keyframe;
|
||||
import com.replaymod.replaystudio.pathing.path.Path;
|
||||
import com.replaymod.replaystudio.pathing.path.PathSegment;
|
||||
import com.replaymod.replaystudio.pathing.path.Timeline;
|
||||
import com.replaymod.replaystudio.util.EntityPositionTracker;
|
||||
import com.replaymod.replaystudio.util.Location;
|
||||
import com.replaymod.simplepathing.ReplayModSimplePathing;
|
||||
import com.replaymod.simplepathing.SPTimeline;
|
||||
import com.replaymod.simplepathing.gui.GuiPathing;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -68,11 +68,11 @@ public class PathPreviewRenderer {
|
||||
if (guiPathing == null) return;
|
||||
EntityPositionTracker entityTracker = guiPathing.getEntityTracker();
|
||||
|
||||
Timeline timeline = mod.getCurrentTimeline();
|
||||
SPTimeline timeline = mod.getCurrentTimeline();
|
||||
if (timeline == null) return;
|
||||
Path path = timeline.getPaths().get(GuiPathing.POSITION_PATH);
|
||||
Path path = timeline.getPositionPath();
|
||||
if (path.getKeyframes().isEmpty()) return;
|
||||
Path timePath = timeline.getPaths().get(GuiPathing.TIME_PATH);
|
||||
Path timePath = timeline.getTimePath();
|
||||
|
||||
path.update();
|
||||
|
||||
@@ -97,8 +97,8 @@ public class PathPreviewRenderer {
|
||||
if (spectator && entityTracker == null) {
|
||||
continue; // Cannot render spectator positions when entity tracker is not yet loaded
|
||||
}
|
||||
// Spectator segments have 20 lines per second whereas normal segments have a fixed 100
|
||||
long steps = spectator ? diff / 50 : 100;
|
||||
// Spectator segments have 20 lines per second (at least 10) whereas normal segments have a fixed 100
|
||||
long steps = spectator ? Math.max(diff / 50, 10) : 100;
|
||||
Triple<Double, Double, Double> prevPos = null;
|
||||
for (int i = 0; i <= steps; i++) {
|
||||
long time = start.getTime() + diff * i / steps;
|
||||
@@ -240,7 +240,7 @@ public class PathPreviewRenderer {
|
||||
float posY = 0f;
|
||||
float size = 10f / ReplayMod.TEXTURE_SIZE;
|
||||
|
||||
if (keyframe == mod.getSelectedKeyframe()) {
|
||||
if (mod.isSelected(keyframe)) {
|
||||
posY += size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user