Skip to content

Commit

Permalink
Finally saving a keyframe
Browse files Browse the repository at this point in the history
  • Loading branch information
RLLD576 committed Aug 10, 2024
1 parent 2d611a1 commit 77cca48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/net/rober/mixin/ReplayScreenMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
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.pathing.serialize.TimelineSerialization;
import com.replaymod.replaystudio.replay.ReplayMetaData;
import com.replaymod.replaystudio.replay.ZipReplayFile;
import com.replaymod.replaystudio.studio.ReplayStudio;
Expand Down Expand Up @@ -44,7 +45,8 @@ private void addButtonMixin(Args args) {
SPTimeline spTimeline = new SPTimeline(replayfile.getTimelines(new SPTimeline()).get(""));
spTimeline.addTimeKeyframe(123,123);
replayfile.writeTimelines(spTimeline,new HashMap<>(Map.of("",spTimeline.getTimeline())));
replayfile.write("timelines.json");
TimelineSerialization serializer = new TimelineSerialization(spTimeline,replayfile);
serializer.save(new HashMap<>(Map.of("",spTimeline.getTimeline())));
replayfile.saveTo(new File(entry.file.getPath()+".asd.mcpr"));
} catch (IOException e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit 77cca48

Please sign in to comment.