@@ -7,18 +7,24 @@ buildscript {
77 classpath group : ' net.minecraftforge.gradle' , name : ' ForgeGradle' , version : ' 5.1.+' , changing : true
88 }
99}
10- apply plugin : ' net.minecraftforge.gradle '
10+
1111// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
12- apply plugin : ' eclipse'
13- apply plugin : ' maven-publish'
12+ plugins {
13+ // In case people use the inferior IDE
14+ id ' eclipse'
15+ id ' maven-publish'
16+ }
1417
15- version = ' 0.2.6'
18+ apply plugin : ' net.minecraftforge.gradle'
19+ version = ' 0.3.0'
1620group = ' com.calicraft.vrjester' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
1721archivesBaseName = ' VRJesterAPI'
1822
19- java. toolchain. languageVersion = JavaLanguageVersion . of(8 ) // Mojang ships Java 8 to end users, so your mod should target Java 8.
23+ // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
24+ java. toolchain. languageVersion = JavaLanguageVersion . of(17 )
2025project. logger. lifecycle(" VRJesterAPI-${ project.version} " )
2126project. logger. lifecycle(' Java: ' + System . getProperty(' java.version' ) + ' JVM: ' + System . getProperty(' java.vm.version' ) + ' (' + System . getProperty(' java.vendor' ) + ' ) Arch: ' + System . getProperty(' os.arch' ))
27+
2228minecraft {
2329 // The mappings can be changed at any time, and must be in the following format.
2430 // Channel: Version:
@@ -31,10 +37,10 @@ minecraft {
3137 //
3238 // Use non-default mappings at your own risk. they may not always work.
3339 // Simply re-run your setup task after changing the mappings to update your workspace.
34- mappings channel : ' official' , version : ' 1.16.5 '
40+ mappings channel : ' official' , version : ' 1.19.2 '
3541 // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
36-
37- // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
42+
43+ // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.
3844
3945 // Default run configurations.
4046 // These can be tweaked, removed, or duplicated as needed.
@@ -54,6 +60,9 @@ minecraft {
5460 // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
5561 property ' forge.logging.console.level' , ' debug'
5662
63+ // Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
64+ property ' forge.enabledGameTestNamespaces' , ' vrjesterapi'
65+
5766 mods {
5867 vrjesterapi {
5968 source sourceSets. main
@@ -64,18 +73,31 @@ minecraft {
6473 server {
6574 workingDirectory project. file(' run' )
6675
67- // Recommended logging data for a userdev environment
68- // The markers can be changed as needed.
69- // "SCAN": For mods scan.
70- // "REGISTRIES": For firing of registry events.
71- // "REGISTRYDUMP": For getting the contents of all registries.
7276 property ' forge.logging.markers' , ' REGISTRIES'
7377
74- // Recommended logging level for the console
75- // You can set various levels here.
76- // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
7778 property ' forge.logging.console.level' , ' debug'
7879
80+ property ' forge.enabledGameTestNamespaces' , ' vrjesterapi'
81+
82+ mods {
83+ vrjesterapi {
84+ source sourceSets. main
85+ }
86+ }
87+ }
88+
89+ // This run config launches GameTestServer and runs all registered gametests, then exits.
90+ // By default, the server will crash when no gametests are provided.
91+ // The gametest system is also enabled by default for other run configs under the /test command.
92+ gameTestServer {
93+ workingDirectory project. file(' run' )
94+
95+ property ' forge.logging.markers' , ' REGISTRIES'
96+
97+ property ' forge.logging.console.level' , ' debug'
98+
99+ property ' forge.enabledGameTestNamespaces' , ' vrjesterapi'
100+
79101 mods {
80102 vrjesterapi {
81103 source sourceSets. main
@@ -86,16 +108,8 @@ minecraft {
86108 data {
87109 workingDirectory project. file(' run' )
88110
89- // Recommended logging data for a userdev environment
90- // The markers can be changed as needed.
91- // "SCAN": For mods scan.
92- // "REGISTRIES": For firing of registry events.
93- // "REGISTRYDUMP": For getting the contents of all registries.
94111 property ' forge.logging.markers' , ' REGISTRIES'
95112
96- // Recommended logging level for the console
97- // You can set various levels here.
98- // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
99113 property ' forge.logging.console.level' , ' debug'
100114
101115 // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
@@ -118,39 +132,45 @@ task deobfJar(type: Jar) {
118132 classifier = ' deobf'
119133}
120134
135+ repositories {
136+ // Put repositories for dependencies here
137+ // ForgeGradle automatically adds the Forge maven and Maven Central for you
138+
139+ // If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
140+ // flatDir {
141+ // dir 'lib'
142+ // }
143+ maven {
144+ url = " https://cursemaven.com"
145+ }
146+ mavenCentral()
147+ }
148+
121149dependencies {
122- implementation ' org.jetbrains:annotations:20.1.0'
123150
124151 // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
125152 // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
126153 // The userdev artifact is a special name and will get all sorts of transformations applied to it.
127- minecraft ' net.minecraftforge:forge:1.16.5-36.2.34 '
128- implementation files( ' libs/minecrift-1.16.5-jrbudda-7-6.jar ' )
129- // implementation files('libs/vivecraft-1.19.2-jrbudda-VR-2-b8-forge.jar' )
130- implementation files( ' libs/OptiFine-1.16.5_HD_U_G8.jar ' )
131- implementation group : ' org.json ' , name : ' json ' , version : ' 20220320 '
132- implementation group : ' io.github.classgraph' , name : ' classgraph' , version : ' 4.8.149'
133- compileOnly group : ' com.mojang' , name : ' authlib' , version : ' 1.5.25'
154+ minecraft ' net.minecraftforge:forge:1.19.2-43.1.1 '
155+ compileOnly fg . deobf( " curse.maven:mcvrapi-591092:4073384 " )
156+ runtimeOnly fg . deobf( " curse.maven:mcvrapi-591092:4073384 " )
157+ implementation ' org.jetbrains:annotations:23.0.0 '
158+ implementation files( ' libs/OptiFine_1.19.2_HD_U_H9.jar ' )
159+ // implementation group: 'io.github.classgraph', name: 'classgraph', version: '4.8.149'
160+ // compileOnly group: 'com.mojang', name: 'authlib', version: '1.5.25'
134161
135162
136- // You may put jars on which you depend on in ./libs or you may define them like so..
137- // compile "some.group:artifact:version:classifier"
138- // compile "some.group:artifact:version"
163+ // Real mod deobf dependency examples - these get remapped to your current mappings
164+ // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
165+ // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
166+ // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
139167
140- // Real examples
141- // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
142- // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
143-
144- // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
145- // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
146-
147- // These dependencies get remapped to your current MCP mappings
148- // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
168+ // Examples using mod jars from ./libs
169+ // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
149170
150171 // For more info...
151172 // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
152173 // http://www.gradle.org/docs/current/userguide/dependency_management.html
153-
154174}
155175
156176// Example for how to get properties into the manifest for reading by the runtime..
@@ -193,3 +213,7 @@ publishing {
193213 }
194214 }
195215}
216+
217+ tasks. withType(JavaCompile ). configureEach {
218+ options. encoding = ' UTF-8' // Use the UTF-8 charset for Java compilation
219+ }
0 commit comments