Skip to content

Update to Alpha9 #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 78 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
5aa54aa
Things are getting interesting 🤔
Apr 2, 2022
bb220a4
Small fixes
May 7, 2022
f7c763f
Fixing inputs of KTRNG
May 8, 2022
d525c76
Changing next seed location
May 9, 2022
dbe0988
Fixed a somewhat rare crash when loading savestates
May 9, 2022
ed3dffe
Made KTRNG more robust
May 10, 2022
4eb35c8
Crash fixes
May 10, 2022
6779d04
[WIP] ContainerSerialiser updates
May 11, 2022
e89c4a5
TASFile updates
May 13, 2022
256b264
Removed player moved to quickly when loading a savestate
May 15, 2022
2c64bcc
Remove catchup ticks when the server is lagging
May 15, 2022
60a0abc
Added ktrng monitoring
May 16, 2022
c726d91
Fixes #132
May 17, 2022
79f8bc4
Fixes #133
May 17, 2022
491681f
Updated KTRNG
May 21, 2022
d806778
Added changing seed on tick
May 22, 2022
0025bae
Added keybind to stop seedchanging
May 23, 2022
b86509b
Updated ci pipeline
May 30, 2022
9231d00
Fixed mistake
May 30, 2022
0ae1d9d
Another test
May 30, 2022
5d6b3b2
Testing no gradle wrapper
May 30, 2022
8fc0be1
Added dialog when trying to run the jar
Jun 4, 2022
0e3a460
Revert "Added dialog when trying to run the jar"
Jun 4, 2022
1f6fb5f
Updated KillTheRNG integration
ScribbleTAS Sep 27, 2022
f7d5b7f
Make deleting savestates inclusive not exclusive
ScribbleTAS Sep 27, 2022
a7496b4
Implementing ktrng into savestates
ScribbleTAS Sep 29, 2022
bbb26c5
Testing a more strict ticksync implementation
ScribbleTAS Sep 30, 2022
469f422
New ticksync
ScribbleTAS Oct 1, 2022
5134828
Weird ticksync test
ScribbleTAS Oct 1, 2022
5d58c7a
Ticksync madness
ScribbleTAS Oct 3, 2022
f24e176
Fixed bugs with ticksync, implemented ktrng
ScribbleTAS Oct 3, 2022
07d9ba8
Another major server rewrite
ScribbleTAS Oct 3, 2022
e6d53c6
[WIP] Trying to get tickrate 0 and tickadvance to work
ScribbleTAS Oct 5, 2022
b37a712
[WIP] Fix softlock on closing mc
ScribbleTAS Oct 7, 2022
8e98f18
Properly implementing tickrate 0 and tickadvance
ScribbleTAS Oct 8, 2022
5725045
[WIP] New ticksync for multiplayer
ScribbleTAS Oct 8, 2022
b752abf
[WIP] Rewriting the custom server
ScribbleTAS Oct 9, 2022
4a39513
Setbacks and improvements
ScribbleTAS Oct 12, 2022
11912eb
Hacked together stuff
ScribbleTAS Oct 18, 2022
fc216d1
One packet, both directions; Send packets to specific players
ScribbleTAS Oct 22, 2022
71cc6e1
Didn't delete the import
ScribbleTAS Oct 22, 2022
277cc61
Update setup-java workflow to v3
ScribbleTAS Oct 22, 2022
86c222b
Fixed connecting and leaving the server sometimes softlocking
ScribbleTAS Oct 23, 2022
bb2f421
Reorganized some packets
ScribbleTAS Oct 25, 2022
1ce8b90
Disconnecting the client when server dies
ScribbleTAS Oct 30, 2022
f068704
Added if to workflow
ScribbleTAS Nov 4, 2022
8410d2e
Fixes and things
ScribbleTAS Nov 1, 2022
0fad075
Rewrote ContainerState, improved network servers
ScribbleTAS Nov 26, 2022
01e9846
Changed package names
ScribbleTAS Mar 31, 2023
967cdd9
Hopefully fixed workflow
ScribbleTAS Mar 31, 2023
9967743
another one
ScribbleTAS Mar 31, 2023
50a73af
[WIP] Updated savestating to new packets
ScribbleTAS Mar 31, 2023
7d7bf0c
another one2
ScribbleTAS Mar 31, 2023
d3b2d4f
[WIP] More packets
ScribbleTAS Apr 9, 2023
43486c8
[WIP] Fixed crashes when starting and stopping the game
ScribbleTAS Apr 10, 2023
9abf64d
Finished packets
ScribbleTAS Apr 12, 2023
bb1fe6a
[WIP] Added fullrecord
ScribbleTAS Apr 14, 2023
568e012
Testing desyncing
ScribbleTAS Apr 18, 2023
e52ded9
Makes things consistent during the loading screen
ScribbleTAS Apr 23, 2023
80b7b7f
Fixed start seed in fullrecord not matching fullplay
ScribbleTAS Apr 23, 2023
35bf892
Multiplayer fixes, trying to make ktrng more stable
ScribbleTAS Apr 23, 2023
9f84a7f
Moved pausing recording to startLaunchServer
ScribbleTAS Apr 23, 2023
f14ddce
Fix workflow?
ScribbleTAS Apr 23, 2023
f2dd9d3
[WIP] Added playuntil
ScribbleTAS Apr 24, 2023
c031b73
Renamed and moved classes
ScribbleTAS Apr 25, 2023
482ec3a
Split workflow into 2 files
ScribbleTAS Apr 25, 2023
a295585
[WIP] Reworked desync monitoring
ScribbleTAS Apr 25, 2023
6329cf4
Changed tasfileending from .tas to .mctas
ScribbleTAS Apr 25, 2023
1b8560a
Reworked desync monitor
ScribbleTAS Apr 28, 2023
01196c0
Added another if to workflow
ScribbleTAS Apr 28, 2023
acd87d4
DesyncMonitor fixes
ScribbleTAS Apr 29, 2023
905c26d
Retimed tasfile index #158
ScribbleTAS Apr 29, 2023
845073e
Switched to maven for dependencies
ScribbleTAS May 1, 2023
33f3aa7
Updated README
ScribbleTAS May 1, 2023
a4a7010
Bump version
ScribbleTAS May 1, 2023
fcd5cd9
Updated README
ScribbleTAS May 1, 2023
42b055b
Fixed KTRNG-Desync not displaying info
ScribbleTAS May 1, 2023
2de188e
Updated README
ScribbleTAS May 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK 8 for x64
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
architecture: x64
- name: Setup Gradle
uses: gradle/[email protected]
with:
gradle-version: 4.10.3
- name: Build TASmod with Gradle
run: gradle shadowJar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: TASmod-Dev-Build
path: build/libs
36 changes: 36 additions & 0 deletions .github/workflows/buildandupload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build and Upload to Discord

on: [push]

jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'MinecraftTAS/TASmod'
steps:
- uses: actions/[email protected]
- name: Set up JDK 8 for x64
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
architecture: x64
- name: Setup Gradle
uses: gradle/[email protected]
with:
gradle-version: 4.10.3
- name: Build TASmod with Gradle
run: gradle shadowJar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: TASmod-Dev-Build
path: build/libs
- name: Send file to discord channel
uses: sinshutu/upload-to-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: build/libs/TASmod-*.jar
31 changes: 0 additions & 31 deletions .github/workflows/gradle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ build

# other
eclipse
run
run/
logs/
88 changes: 72 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# TASmod
Lets you record and play back tickperfect inputs.

A Tool-Assisted Speedrun-Mod for Minecraft 1.12.2.
Is able to capture inputs and play them back, by pretending to be a keyboard.

To reduce complexity, all aspects of RNG-Manipulation have been externalized to a repository called [KillTheRNG](https://github.com/MinecraftTAS/KillTheRNG). It is now available as an optional dependency and a [standalone mod](https://maven.mgnet.work/#/main/com/minecrafttas/killtherng-full)

This mod is currently only for Forge 1.12.2 and will update/downgrade once 1.12.2 works properly

## Credits
Author of the original mod: tr7zw
Main Author: Scribble
> **New:** There are plans now to switch to Legacy-fabric, for downgrading, see [#101](https://github.com/MinecraftTAS/TASmod/issues/101).

# Credits
Author of the original mod: [tr7zw](https://github.com/tr7zw/MC-TASmod)
Main Mod Author: Scribble

Contributions by: famous1622, Pancake

Expand All @@ -14,14 +19,65 @@ Tickrate 0 idea: [Cubitect](https://github.com/Cubitect/Cubitick)
Savestate idea: [bspkrs, MightyPork](https://github.com/bspkrs-mods/WorldStateCheckpoints), although implementation is totally different now

Special thanks: Darkmoon, The Minecraft TAS Community
## Commands
`/record` Starts to record your input, hit the same command again to stop recording
`/play` Starts to play back a the stored inputs
`/save <filename>` Saves stored inputs to a file
`/load <filename>` Load inputs from file
`/clearinputs` Delete all stored inputs, use this before starting a brand new recording. `/record` will resume the recording and not clear the inputs first.

## Development
To load mixins in eclipse use `--mixin mixins.tasmod.json --tweakClass org.spongepowered.asm.launch.MixinTweaker` in program arguments

You will also find a KillTheRNG.jar (not with -deobf at the end!) in the libs folder. Copy that into `run/mods` to trick Minecraft into loading a second mod.
# Features
## Playback
This mod can record and play back
- The entire keyboard, minus TASmod keybinds (see below).
- Gui-Screens like crafting, the pause menu and the main menu! (Except the keybinding screen)
- Any screen size and window size (No warranties here...)

### Commands
`/record` - Start a recording. This will record inputs to RAM. Closing the game will empty these inputs.
`/play` - Start to play back the stored inputs.
`/save <filename>` - Save stored inputs to a file.
`/load <filename>` - Load inputs from file.
`/clearinputs` - Delete all stored inputs, use this before starting a brand new recording.
`/record` - will resume the recording and not clear the inputs first.
`/playuntil <tickCount>` - Stops the next playback at the specified tick number, then switches to a recording. Run this command then start a playback via `/play`.

`/fullrecord, /fullplay` - Same as record/play however it will quit to the main menu first.
`/restartandplay <filename>` - Quits Minecraft completely. When restarting, the specified file will be loaded and played back, when the menu appears.
### Keybinds
<kbd>F10</kbd> - Stops either a playback or a recording.

## Savestate
### Commands
`/savestate` - Prints a full guide to the savestate command in chat.
### Keybinds
<kbd>J</kbd> - Make a new savestate.
<kbd>K</kbd> - Load the most recent savestate.

## Tickratechanger (Slowdown)
### Commands
`/tickrate <ticks/second>` - Changes the game speed. Default is 20, anthing below will slow the game down, anything above will speed it up.
### Keybinds
<kbd>F8</kbd> - Enter "Tickrate 0". The game is paused but you can still look around.
<kbd>F9</kbd> - While in tickrate 0, advance the tick by 1. By holding keyboardkeys, you can make inputs while tickadvancing.

## Multiplayer support
**Important:** This is **NOT** a clientside mod, a server side installation is required a.k.a This doesn't work on Hypixel, 2b2t etc. These servers will **NEVER** be supported.

Record TASes with friends! Needs operator permissions to run tasmod related commands.
/savestate can be used to manage savestates.

> **Note:** /fullrecord, /fullplay and /restartandplay are not guaranteed to work in multiplayer at this time.

## HUD
When ingame, hitting <kbd>F6</kbd> will show you options for customising your HUD, with monitoring options and more. Even more options are available when KillTheRNG is installed.

# Development
## Setup
1. Clone this repository and put it in your workspace directory (where you open eclipse or idea)
2. Import gradle project
- Use gradle version 4.10.3
- Use [JDK 8](https://adoptium.net/en/temurin/releases/?version=8)
3. Run gradle tasks `setupDecompWorkspace` then `eclipse`.
4. *Optional but recommended:* Run gradle task `downloadKTRNG` (in the "tasmod" category) to download KillTheRNG to the run/mods folder.

## Running
The task `eclipse` should've generated to launch configs: `TASmod_Client.launch` and `TASmod_Server.launch`. Select it, then click the run or debug button in your IDE.

> **Note:** Additional setup is required for the server to actually start, like changing the eula.txt and setting `online-mode` to false in server.properties.

## Building
Build the mod using the gradle task `build` (or alternatively `shadowJar`).
52 changes: 26 additions & 26 deletions TASFile_Dark_Npp_language.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<NotepadPlus>
<UserLang name="TASLang" ext=".tas" udlVersion="2.1">
<UserLang name="TASFile" ext="mctas" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="yes" Keywords7="yes" Keywords8="yes" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03 04</Keywords>
<Keywords name="Comments">00# 00// 00$ 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
Expand Down Expand Up @@ -35,30 +35,30 @@
<Keywords name="Delimiters">00[ 01 02] 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="FFFFFF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="FF8000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="008040" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="0080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="008000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="FF8080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="004080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DEFAULT" fgColor="FFFFFF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="FF8000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="008040" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="0080FF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="008000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="FF8080" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="004080" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
Loading