Skip to content

Commit 316de9c

Browse files
committed
BIG FAT UPDATE
1 parent 12ebe56 commit 316de9c

Some content is hidden

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

47 files changed

+1231
-97
lines changed

build.gradle

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
11
plugins {
2-
id 'fabric-loom' version '1.2-SNAPSHOT'
32
}
43

54
version = project.simpleclient_version
6-
group = "simpleclient"
5+
group = 'simpleclient'
76

87
repositories {
98
}
109

1110
dependencies {
12-
// Minecraft
13-
minecraft "com.mojang:minecraft:${project.minecraft_version}"
14-
mappings loom.officialMojangMappings()
15-
modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}"
16-
// Dependencies
17-
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
1811
}
1912

20-
processResources {
21-
filesMatching('fabric.mod.json') {
22-
expand 'version': version, 'minecraft_version': project.minecraft_version, 'fabric_loader_version': project.fabric_loader_version, 'fabric_api_version': project.fabric_api_version
23-
}
13+
subprojects {
2414
}
2515

26-
tasks.withType(JavaCompile).configureEach {
27-
it.options.release = 17
28-
}
16+
allprojects {
17+
version = rootProject.version
18+
group = rootProject.group
19+
}

gradle.properties

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,5 @@
22
org.gradle.jvmargs=-Xmx1G
33
org.gradle.parallel=true
44

5-
# Minecraft (https://fabricmc.net/develop)
6-
minecraft_version=1.19.4
7-
fabric_loader_version=0.14.21
8-
95
# SimpleClient
10-
simpleclient_version=0.0.1
11-
12-
# Dependencies
13-
fabric_api_version=0.83.0+1.19.4
6+
simpleclient_version=0.0.1-dev

gradle/wrapper/gradle-wrapper.jar

-2.2 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
4-
networkTimeout=10000
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
54
zipStoreBase=GRADLE_USER_HOME
65
zipStorePath=wrapper/dists

gradlew

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,11 +80,14 @@ do
8080
esac
8181
done
8282

83-
# This is normally unused
84-
# shellcheck disable=SC2034
85-
APP_BASE_NAME=${0##*/}
8683
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8784

85+
APP_NAME="Gradle"
86+
APP_BASE_NAME=${0##*/}
87+
88+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90+
8891
# Use the maximum available, or set MAX_FD != -1 to use that value.
8992
MAX_FD=maximum
9093

@@ -140,16 +143,12 @@ fi
140143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
141144
case $MAX_FD in #(
142145
max*)
143-
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
144-
# shellcheck disable=SC3045
145146
MAX_FD=$( ulimit -H -n ) ||
146147
warn "Could not query maximum file descriptor limit"
147148
esac
148149
case $MAX_FD in #(
149150
'' | soft) :;; #(
150151
*)
151-
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
152-
# shellcheck disable=SC3045
153152
ulimit -n "$MAX_FD" ||
154153
warn "Could not set maximum file descriptor limit to $MAX_FD"
155154
esac
@@ -194,10 +193,6 @@ if "$cygwin" || "$msys" ; then
194193
done
195194
fi
196195

197-
198-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
199-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
200-
201196
# Collect all arguments for the java command;
202197
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
203198
# shell script including quotes and variable substitutions, so put them in
@@ -210,12 +205,6 @@ set -- \
210205
org.gradle.wrapper.GradleWrapperMain \
211206
"$@"
212207

213-
# Stop when "xargs" is not available.
214-
if ! command -v xargs >/dev/null 2>&1
215-
then
216-
die "xargs is not available"
217-
fi
218-
219208
# Use "xargs" to parse quoted args.
220209
#
221210
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%"=="" @echo off
17+
@if "%DEBUG%" == "" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,8 +25,7 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%"=="" set DIRNAME=.
29-
@rem This is normally unused
28+
if "%DIRNAME%" == "" set DIRNAME=.
3029
set APP_BASE_NAME=%~n0
3130
set APP_HOME=%DIRNAME%
3231

@@ -41,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4140

4241
set JAVA_EXE=java.exe
4342
%JAVA_EXE% -version >NUL 2>&1
44-
if %ERRORLEVEL% equ 0 goto execute
43+
if "%ERRORLEVEL%" == "0" goto execute
4544

4645
echo.
4746
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -76,15 +75,13 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7675

7776
:end
7877
@rem End local scope for the variables with windows NT shell
79-
if %ERRORLEVEL% equ 0 goto mainEnd
78+
if "%ERRORLEVEL%"=="0" goto mainEnd
8079

8180
:fail
8281
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8382
rem the _cmd.exe /c_ return code!
84-
set EXIT_CODE=%ERRORLEVEL%
85-
if %EXIT_CODE% equ 0 set EXIT_CODE=1
86-
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87-
exit /b %EXIT_CODE%
83+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84+
exit /b 1
8885

8986
:mainEnd
9087
if "%OS%"=="Windows_NT" endlocal

settings.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ pluginManagement {
55
gradlePluginPortal()
66
}
77
}
8-
rootProject.name = 'simpleclient'
8+
rootProject.name = 'simpleclient'
9+
include 'simpleclient-core'
10+
include 'simpleclient-1.19.4'

simpleclient-1.19.4/build.gradle

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
plugins {
2+
id 'java'
3+
id 'fabric-loom' version '1.1-SNAPSHOT'
4+
}
5+
6+
repositories {
7+
}
8+
9+
dependencies {
10+
// Minecraft
11+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
12+
mappings loom.officialMojangMappings()
13+
modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}"
14+
// Core
15+
implementation project(path: ':simpleclient-core')
16+
include project(path: ':simpleclient-core')
17+
// Dependencies
18+
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
19+
}
20+
21+
processResources {
22+
filesMatching('fabric.mod.json') {
23+
expand 'version': version, 'minecraft_version': project.minecraft_version, 'fabric_loader_version': project.fabric_loader_version, 'fabric_api_version': project.fabric_api_version
24+
}
25+
}
26+
27+
tasks.withType(JavaCompile).configureEach {
28+
it.options.release = 17
29+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Minecraft (https://fabricmc.net/develop)
2+
minecraft_version=1.19.4
3+
fabric_loader_version=0.14.19
4+
5+
# Dependencies
6+
fabric_api_version=0.77.0+1.19.4
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package simpleclient;
2+
3+
import net.fabricmc.api.ClientModInitializer;
4+
import net.fabricmc.loader.api.FabricLoader;
5+
import org.slf4j.Logger;
6+
import org.slf4j.LoggerFactory;
7+
import simpleclient.feature.FeatureManager;
8+
9+
public class SimpleClient implements ClientModInitializer {
10+
public static final Logger LOGGER = LoggerFactory.getLogger("simpleclient");
11+
public static String VERSION = "unknown";
12+
13+
@Override
14+
public void onInitializeClient() {
15+
VERSION = loadVersion();
16+
FeatureManager.init();
17+
}
18+
19+
public String loadVersion() {
20+
return FabricLoader.getInstance().getModContainer("simpleclient").get().getMetadata().getVersion().getFriendlyString();
21+
}
22+
}

0 commit comments

Comments
 (0)