Skip to content

Conversation

@ScribbleTAS
Copy link
Member

@ScribbleTAS ScribbleTAS commented Apr 9, 2025

Refactor

Filecommands have some overengineered data sorting built in, when using them in the serilialiser vs. using them during playback.

To better visualise this, I created 2 seperate "containers", unsorted and sorted which are used in serialising and playback respectively.

Additionally, I used an ArrrayList<PlaybackSerialiser> in both containers, but the format in this list is actually different and this lead to a lot of confusion while trying to figure out my own code...
So instead, I added 2 classes that extend ArrrayList<PlaybackSerialiser> called FileCommandsInCommentList and FileCommandsInTickList to better visualize the format and to add documentation... Which should hopefully make this less confusing...

Fixes

@ScribbleTAS ScribbleTAS added the TASFile Issue relates to the playback file used to store inputs label Apr 9, 2025
@ScribbleTAS ScribbleTAS added this to the Beta1.0 milestone Apr 9, 2025
@ScribbleTAS ScribbleTAS self-assigned this Apr 9, 2025
@github-project-automation github-project-automation bot moved this to Todo in TASmod Apr 9, 2025
@ScribbleTAS ScribbleTAS added the Documentation 🚂 Improvements or additions to documentation label Apr 9, 2025
@ScribbleTAS ScribbleTAS force-pushed the refactor/filecommands branch from 4353cb1 to 4b3930b Compare April 9, 2025 20:30
- Split PlaybackFileCommandContainer into SortedFileCommandContainer and UnsortedFileCommandContainer
- Created FileCommandsInCommentList and FileCommandsInTickList instead of List<PlaybackFileCommand> to better point out the difference
- Add sort and unsort for better visibility instead of sorting in the constructor of PlaybackFileCommandContainer
- Added default serialisation fixes
- Fixed MinecraftTAS#231
- Fixed multiple inline FileCommands failing
- Fixed loading FileCommands not clearing the previous FileCommands
@ScribbleTAS ScribbleTAS force-pushed the refactor/filecommands branch from 4b3930b to 4601a2d Compare April 9, 2025 20:34
- Fixed equals not working correctly in SortedFileCommandContainer
@ScribbleTAS ScribbleTAS marked this pull request as ready for review April 11, 2025 20:47
@ScribbleTAS ScribbleTAS requested a review from PancakeTAS April 11, 2025 20:49
@ScribbleTAS ScribbleTAS merged commit 43e19fa into MinecraftTAS:develop Apr 12, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in TASmod Apr 12, 2025
@ScribbleTAS ScribbleTAS deleted the refactor/filecommands branch April 12, 2025 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation 🚂 Improvements or additions to documentation TASFile Issue relates to the playback file used to store inputs

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Saving fails when continuing a recording

2 participants