Skip to content

[Savestates] Store EntityAI in savestates - #298

Merged
ScribbleTAS merged 28 commits into
MinecraftTAS:develop-beta3from
ScribbleTAS:savestates/entity-ai
Oct 6, 2026
Merged

ScribbleTAS merged 28 commits into
MinecraftTAS:develop-beta3from
ScribbleTAS:savestates/entity-ai

Conversation

@ScribbleTAS

@ScribbleTAS ScribbleTAS commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

A big problem for TASing in general is the fact that entity AI is not stored in the world files... All entities will reset once a world is loaded, which makes savestates around entities very inaccurate. So much so, that the EntityRNG will desync between savestates.

To fix this, I would need to write custom serialisation for ~60 different classes, each doing something slightly different...
Not fancying that, so instead I employed the help of everyones least favourite json library gson!

@github-project-automation github-project-automation Bot moved this to Todo in TASmod Jul 12, 2026
@ScribbleTAS ScribbleTAS self-assigned this Jul 12, 2026
@ScribbleTAS ScribbleTAS moved this from Todo to In Progress in TASmod Jul 12, 2026
@ScribbleTAS ScribbleTAS added this to the Beta3.0 milestone Jul 12, 2026
@ScribbleTAS ScribbleTAS linked an issue Jul 12, 2026 that may be closed by this pull request
@ScribbleTAS
ScribbleTAS force-pushed the savestates/entity-ai branch from ddae918 to 959c0fa Compare July 12, 2026 19:25
…tions

...rather than create new action objects entirely.
This has the benefit of circumnavigating unserializable fields such as Predicates and Lambdas.
@ScribbleTAS
ScribbleTAS force-pushed the savestates/entity-ai branch from bee75b8 to 5947139 Compare August 26, 2026 21:30
@ScribbleTAS
ScribbleTAS force-pushed the savestates/entity-ai branch from 5947139 to 7a1d5f5 Compare August 26, 2026 21:33
@ScribbleTAS
ScribbleTAS force-pushed the savestates/entity-ai branch from 7a72315 to 25bf7b4 Compare October 5, 2026 20:49
@ScribbleTAS
ScribbleTAS marked this pull request as ready for review October 5, 2026 20:50
@ScribbleTAS
ScribbleTAS force-pushed the savestates/entity-ai branch from 25bf7b4 to 730f626 Compare October 5, 2026 20:52
@ScribbleTAS

Copy link
Copy Markdown
Member Author

Alright, I really tried, this is the best solution I could come up with... Custom Gson wrapper with a type adapter generator, so I don't have to type out each classes separately...

RNG is still desyncing on savestates and I will probably have to fix this in the Entity itself, but right now most of the AI tasks should be serialised correctly.

However the Ender Dragon is another can of worms. Let's not talk about the Ender dragon...

@ScribbleTAS
ScribbleTAS requested a review from PancakeTAS October 5, 2026 21:06
@ScribbleTAS

Copy link
Copy Markdown
Member Author

PR open for 3 Months and today I catch a day where actions die... classic... I blame AI
image

@PancakeTAS PancakeTAS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work :3

@ScribbleTAS
ScribbleTAS merged commit 0573bfe into MinecraftTAS:develop-beta3 Oct 6, 2026
1 of 2 checks passed
@ScribbleTAS
ScribbleTAS deleted the savestates/entity-ai branch October 6, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Savestates don't carry over mob aggro

2 participants