1
- buildscript {
2
- repositories {
3
- // These repositories are only for Gradle plugins, put any other repositories in the repository block further below
4
- maven { url = ' https://maven.minecraftforge.net' }
5
- mavenCentral()
6
- }
7
- dependencies {
8
- classpath group : ' net.minecraftforge.gradle' , name : ' ForgeGradle' , version : ' 5.1.+' , changing : true
9
- }
1
+ plugins {
2
+ id ' eclipse'
3
+ id ' maven-publish'
4
+ id ' net.minecraftforge.gradle' version ' 5.1.+'
10
5
}
11
- apply plugin : ' net.minecraftforge.gradle'
12
- // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
13
- apply plugin : ' eclipse'
14
- apply plugin : ' maven-publish'
15
6
16
- version = ' 1.18.1 -1.1'
7
+ version = ' 1.19 -1.1'
17
8
group = ' com.mydoomsite.statsmod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
18
9
archivesBaseName = ' PlayerStatisticsList'
19
10
20
11
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
21
12
java. toolchain. languageVersion = JavaLanguageVersion . of(17 )
22
13
23
- println ( ' Java: ' + System . getProperty( ' java.version' ) + ' JVM: ' + System . getProperty( ' java.vm.version' ) + ' ( ' + System . getProperty( ' java.vendor' ) + ' ) Arch: ' + System . getProperty( ' os.arch' ))
14
+ println " Java: ${ System.getProperty 'java.version'} , JVM: ${ System.getProperty 'java.vm.version'} ( ${ System.getProperty 'java.vendor'} ), Arch: ${ System.getProperty 'os.arch'} "
24
15
minecraft {
25
16
// The mappings can be changed at any time and must be in the following format.
26
17
// Channel: Version:
27
- // snapshot YYYYMMDD Snapshot are built nightly.
28
- // stable # Stables are built at the discretion of the MCP team.
29
- // official MCVersion Official field/method names from Mojang mapping files
18
+ // official MCVersion Official field/method names from Mojang mapping files
19
+ // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official
30
20
//
31
- // You must be aware of the Mojang license when using the 'official' mappings.
21
+ // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
32
22
// See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
33
23
//
24
+ // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
25
+ // Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started
26
+ //
34
27
// Use non-default mappings at your own risk. They may not always work.
35
28
// Simply re-run your setup task after changing the mappings to update your workspace.
36
- mappings channel : ' official' , version : ' 1.18.1 '
29
+ mappings channel : ' official' , version : ' 1.19 '
37
30
38
31
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.
39
32
@@ -55,8 +48,11 @@ minecraft {
55
48
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
56
49
property ' forge.logging.console.level' , ' debug'
57
50
51
+ // Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
52
+ property ' forge.enabledGameTestNamespaces' , ' mydoomsite_statsmod'
53
+
58
54
mods {
59
- examplemod {
55
+ mydoomsite_statsmod {
60
56
source sourceSets. main
61
57
}
62
58
}
@@ -65,18 +61,31 @@ minecraft {
65
61
server {
66
62
workingDirectory project. file(' run' )
67
63
68
- // Recommended logging data for a userdev environment
69
- // The markers can be added/remove as needed separated by commas.
70
- // "SCAN": For mods scan.
71
- // "REGISTRIES": For firing of registry events.
72
- // "REGISTRYDUMP": For getting the contents of all registries.
73
64
property ' forge.logging.markers' , ' REGISTRIES'
74
65
75
- // Recommended logging level for the console
76
- // You can set various levels here.
77
- // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
78
66
property ' forge.logging.console.level' , ' debug'
79
67
68
+ property ' forge.enabledGameTestNamespaces' , ' mydoomsite_statsmod'
69
+
70
+ mods {
71
+ mydoomsite_statsmod {
72
+ source sourceSets. main
73
+ }
74
+ }
75
+ }
76
+
77
+ // This run config launches GameTestServer and runs all registered gametests, then exits.
78
+ // By default, the server will crash when no gametests are provided.
79
+ // The gametest system is also enabled by default for other run configs under the /test command.
80
+ gameTestServer {
81
+ workingDirectory project. file(' run' )
82
+
83
+ property ' forge.logging.markers' , ' REGISTRIES'
84
+
85
+ property ' forge.logging.console.level' , ' debug'
86
+
87
+ property ' forge.enabledGameTestNamespaces' , ' mydoomsite_statsmod'
88
+
80
89
mods {
81
90
mydoomsite_statsmod {
82
91
source sourceSets. main
@@ -87,16 +96,8 @@ minecraft {
87
96
data {
88
97
workingDirectory project. file(' run' )
89
98
90
- // Recommended logging data for a userdev environment
91
- // The markers can be added/remove as needed separated by commas.
92
- // "SCAN": For mods scan.
93
- // "REGISTRIES": For firing of registry events.
94
- // "REGISTRYDUMP": For getting the contents of all registries.
95
99
property ' forge.logging.markers' , ' REGISTRIES'
96
100
97
- // Recommended logging level for the console
98
- // You can set various levels here.
99
- // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
100
101
property ' forge.logging.console.level' , ' debug'
101
102
102
103
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
@@ -128,7 +129,7 @@ dependencies {
128
129
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
129
130
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
130
131
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
131
- minecraft ' net.minecraftforge:forge:1.18.1-39 .0.10 '
132
+ minecraft ' net.minecraftforge:forge:1.19-41 .0.98 '
132
133
133
134
// Real mod deobf dependency examples - these get remapped to your current mappings
134
135
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
@@ -176,3 +177,7 @@ publishing {
176
177
}
177
178
}
178
179
}
180
+
181
+ tasks. withType(JavaCompile ). configureEach {
182
+ options. encoding = ' UTF-8' // Use the UTF-8 charset for Java compilation
183
+ }
0 commit comments