Skip to content

Commit 253c83c

Browse files
author
Scribble
authored
Merge pull request #83 from ScribbleLP/1.12.2dev
Updating to Alpha5
2 parents c039094 + 3b8e216 commit 253c83c

File tree

159 files changed

+7744
-3975
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+7744
-3975
lines changed

.github/workflows/gradle.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Java CI with Gradle
5+
6+
on: [push]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up JDK 8 for x64
14+
uses: actions/setup-java@v2
15+
with:
16+
java-version: '8'
17+
distribution: 'adopt'
18+
architecture: x64
19+
- name: Grant execute permission for gradlew
20+
run: chmod +x gradlew
21+
- name: Build TASmod with Gradle
22+
run: ./gradlew shadowJar --no-daemon
23+
- run: find . -type f ! -name "*forge.jar" -delete
24+
- uses: actions/upload-artifact@v2
25+
with:
26+
name: Package
27+
path: build/libs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ build
2020
# other
2121
eclipse
2222
run
23+
logs/

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
# TASmod
2-
Let's you record and play back tickperfect inputs.
1+
# TASmod
2+
Lets you record and play back tickperfect inputs.
3+
4+
This mod is currently only for Forge 1.12.2 and will update/downgrade once 1.12.2 works properly
5+
36
## Credits
47
Author of the original mod: tr7zw
58
Author: ScribbleLP
69

7-
Contributions by: Famous1622, MGW14(MCPfannenkuchenYT)
10+
Contributions by: Famous1622, Pancake (MCPfannkuchenYT)
811

912
Tickratechanger: [Guichaguri](https://github.com/Guichaguri/TickrateChanger)
1013
Tickrate 0 idea: [Cubitect](https://github.com/Cubitect/Cubitick)
11-
Savestate idea: [bspkrs, MightyPork](https://github.com/bspkrs-mods/WorldStateCheckpoints), also used in [TASTools](https://github.com/ScribbleLP/MC-TASTools)
14+
Savestate idea: [bspkrs, MightyPork](https://github.com/bspkrs-mods/WorldStateCheckpoints), although implementation is totally different now
1215

1316
RNG Math: [Admiral_Stapler](https://www.youtube.com/channel/UCB4XuRBJZBOpnoJSWekMohw)
1417

1518
Special thanks: Darkmoon
1619
## Commands
17-
`/record <filename>` Starts to record your input, hit the same command again to stop recording
18-
`/play <filename>` Starts to play back a file
20+
`/record` Starts to record your input, hit the same command again to stop recording
21+
`/play` Starts to play back a the stored inputs
22+
`/save <filename>` Saves stored inputs to a file
23+
`/load <filename>` Load inputs from file
24+
`/clearinputs` Delete all stored inputs, use this before starting a brand new recording. `/record` will resume the recording and not clear the inputs first.
1925

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

TASFile_Dark_Npp_language.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<NotepadPlus>
2+
<UserLang name="TASLang" ext=".tas" udlVersion="2.1">
3+
<Settings>
4+
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
5+
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="yes" Keywords7="yes" Keywords8="yes" />
6+
</Settings>
7+
<KeywordLists>
8+
<Keywords name="Comments">00# 01 02 03 04</Keywords>
9+
<Keywords name="Numbers, prefix1"></Keywords>
10+
<Keywords name="Numbers, prefix2"></Keywords>
11+
<Keywords name="Numbers, extras1"></Keywords>
12+
<Keywords name="Numbers, extras2"></Keywords>
13+
<Keywords name="Numbers, suffix1"></Keywords>
14+
<Keywords name="Numbers, suffix2"></Keywords>
15+
<Keywords name="Numbers, range"></Keywords>
16+
<Keywords name="Operators1">| -&gt;</Keywords>
17+
<Keywords name="Operators2"></Keywords>
18+
<Keywords name="Folders in code1, open"></Keywords>
19+
<Keywords name="Folders in code1, middle"></Keywords>
20+
<Keywords name="Folders in code1, close"></Keywords>
21+
<Keywords name="Folders in code2, open"></Keywords>
22+
<Keywords name="Folders in code2, middle"></Keywords>
23+
<Keywords name="Folders in code2, close"></Keywords>
24+
<Keywords name="Folders in comment, open"></Keywords>
25+
<Keywords name="Folders in comment, middle"></Keywords>
26+
<Keywords name="Folders in comment, close"></Keywords>
27+
<Keywords name="Keywords1">Keyboard:&#x000D;&#x000A;KeyboardState:</Keywords>
28+
<Keywords name="Keywords2">Mouse:&#x000D;&#x000A;</Keywords>
29+
<Keywords name="Keywords3">Camera:</Keywords>
30+
<Keywords name="Keywords4"></Keywords>
31+
<Keywords name="Keywords5">Mouse:</Keywords>
32+
<Keywords name="Keywords6"></Keywords>
33+
<Keywords name="Keywords7"></Keywords>
34+
<Keywords name="Keywords8"></Keywords>
35+
<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>
36+
</KeywordLists>
37+
<Styles>
38+
<WordsStyle name="DEFAULT" fgColor="FFFFFF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
39+
<WordsStyle name="COMMENTS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
40+
<WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
41+
<WordsStyle name="NUMBERS" fgColor="00FFFF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
42+
<WordsStyle name="KEYWORDS1" fgColor="FF8000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
43+
<WordsStyle name="KEYWORDS2" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
44+
<WordsStyle name="KEYWORDS3" fgColor="008040" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
45+
<WordsStyle name="KEYWORDS4" fgColor="FF0000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
46+
<WordsStyle name="KEYWORDS5" fgColor="0080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
47+
<WordsStyle name="KEYWORDS6" fgColor="008000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
48+
<WordsStyle name="KEYWORDS7" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
49+
<WordsStyle name="KEYWORDS8" fgColor="FF8080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
50+
<WordsStyle name="OPERATORS" fgColor="004080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
51+
<WordsStyle name="FOLDER IN CODE1" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
52+
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
53+
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
54+
<WordsStyle name="DELIMITERS1" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
55+
<WordsStyle name="DELIMITERS2" fgColor="00FF00" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
56+
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
57+
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
58+
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
59+
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
60+
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
61+
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
62+
</Styles>
63+
</UserLang>
64+
</NotepadPlus>

build.gradle

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
repositories {
3-
jcenter()
4-
maven { url = "https://files.minecraftforge.net/maven" }
3+
maven { url = "https://sizableshrimp.me/maven" }
4+
maven { url = "https://maven.minecraftforge.net" }
55
maven { url = "https://repo.spongepowered.org/maven" }
66
}
77
dependencies {
@@ -19,7 +19,7 @@ apply plugin: 'org.spongepowered.mixin'
1919
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
2020

2121

22-
version = "Alpha4"
22+
version = "Alpha5"
2323
group = "de.scribble.lp.tastools" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
2424
archivesBaseName = "TASmod-1.12.2"
2525

@@ -28,6 +28,10 @@ compileJava {
2828
sourceCompatibility = targetCompatibility = '1.8'
2929
}
3030

31+
shadowJar {
32+
archiveName = "${archivesBaseName}-${version}-forge.jar"
33+
}
34+
3135
minecraft {
3236
version = "1.12.2-14.23.5.2847"
3337
runDir = "run"
@@ -45,7 +49,7 @@ repositories {
4549
mavenCentral()
4650
maven {
4751
name = 'sponge'
48-
url = 'http://repo.spongepowered.org/maven'
52+
url = 'https://repo.spongepowered.org/maven'
4953
}
5054
}
5155
dependencies {
@@ -62,6 +66,7 @@ dependencies {
6266
}
6367
compile 'org.msgpack:msgpack-core:0.8.16'
6468
compile 'org.msgpack:jackson-dataformat-msgpack:0.8.16'
69+
compile files('libs/BigArrayList-1.3.jar')
6570
// real examples
6671
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
6772
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip

gradlew

Lines changed: 69 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,59 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
2+
3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
218

319
##############################################################################
420
##
521
## Gradle start up script for UN*X
622
##
723
##############################################################################
824

9-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10-
DEFAULT_JVM_OPTS=""
25+
# Attempt to set APP_HOME
26+
# Resolve links: $0 may be a link
27+
PRG="$0"
28+
# Need this for relative symlinks.
29+
while [ -h "$PRG" ] ; do
30+
ls=`ls -ld "$PRG"`
31+
link=`expr "$ls" : '.*-> \(.*\)$'`
32+
if expr "$link" : '/.*' > /dev/null; then
33+
PRG="$link"
34+
else
35+
PRG=`dirname "$PRG"`"/$link"
36+
fi
37+
done
38+
SAVED="`pwd`"
39+
cd "`dirname \"$PRG\"`/" >/dev/null
40+
APP_HOME="`pwd -P`"
41+
cd "$SAVED" >/dev/null
1142

1243
APP_NAME="Gradle"
1344
APP_BASE_NAME=`basename "$0"`
1445

46+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48+
1549
# Use the maximum available, or set MAX_FD != -1 to use that value.
1650
MAX_FD="maximum"
1751

18-
warn ( ) {
52+
warn () {
1953
echo "$*"
2054
}
2155

22-
die ( ) {
56+
die () {
2357
echo
2458
echo "$*"
2559
echo
@@ -30,6 +64,7 @@ die ( ) {
3064
cygwin=false
3165
msys=false
3266
darwin=false
67+
nonstop=false
3368
case "`uname`" in
3469
CYGWIN* )
3570
cygwin=true
@@ -40,33 +75,14 @@ case "`uname`" in
4075
MINGW* )
4176
msys=true
4277
;;
78+
NONSTOP* )
79+
nonstop=true
80+
;;
4381
esac
4482

45-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
46-
if $cygwin ; then
47-
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48-
fi
49-
50-
# Attempt to set APP_HOME
51-
# Resolve links: $0 may be a link
52-
PRG="$0"
53-
# Need this for relative symlinks.
54-
while [ -h "$PRG" ] ; do
55-
ls=`ls -ld "$PRG"`
56-
link=`expr "$ls" : '.*-> \(.*\)$'`
57-
if expr "$link" : '/.*' > /dev/null; then
58-
PRG="$link"
59-
else
60-
PRG=`dirname "$PRG"`"/$link"
61-
fi
62-
done
63-
SAVED="`pwd`"
64-
cd "`dirname \"$PRG\"`/" >&-
65-
APP_HOME="`pwd -P`"
66-
cd "$SAVED" >&-
67-
6883
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6984

85+
7086
# Determine the Java command to use to start the JVM.
7187
if [ -n "$JAVA_HOME" ] ; then
7288
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -90,7 +106,7 @@ location of your Java installation."
90106
fi
91107

92108
# Increase the maximum file descriptors if we can.
93-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
109+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
94110
MAX_FD_LIMIT=`ulimit -H -n`
95111
if [ $? -eq 0 ] ; then
96112
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -110,11 +126,13 @@ if $darwin; then
110126
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111127
fi
112128

113-
# For Cygwin, switch paths to Windows format before running java
114-
if $cygwin ; then
129+
# For Cygwin or MSYS, switch paths to Windows format before running java
130+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
115131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117133

134+
JAVACMD=`cygpath --unix "$JAVACMD"`
135+
118136
# We build the pattern for arguments to be converted via cygpath
119137
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120138
SEP=""
@@ -138,27 +156,30 @@ if $cygwin ; then
138156
else
139157
eval `echo args$i`="\"$arg\""
140158
fi
141-
i=$((i+1))
159+
i=`expr $i + 1`
142160
done
143161
case $i in
144-
(0) set -- ;;
145-
(1) set -- "$args0" ;;
146-
(2) set -- "$args0" "$args1" ;;
147-
(3) set -- "$args0" "$args1" "$args2" ;;
148-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
162+
0) set -- ;;
163+
1) set -- "$args0" ;;
164+
2) set -- "$args0" "$args1" ;;
165+
3) set -- "$args0" "$args1" "$args2" ;;
166+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154172
esac
155173
fi
156174

157-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158-
function splitJvmOpts() {
159-
JVM_OPTS=("$@")
175+
# Escape application args
176+
save () {
177+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178+
echo " "
160179
}
161-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
180+
APP_ARGS=`save "$@"`
181+
182+
# Collect all arguments for the java command, following the shell quoting and substitution rules
183+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
163184

164-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
185+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)