Skip to content

Commit 8a0f52a

Browse files
committed
Initial commit
0 parents  commit 8a0f52a

File tree

17 files changed

+1057
-0
lines changed

17 files changed

+1057
-0
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Disable autocrlf on generated files, they always generate with LF
2+
# Add any extra files or paths here to make git stop saying they
3+
# are changed when only line endings change.
4+
src/generated/**/.cache/cache text eol=lf
5+
src/generated/**/*.json text eol=lf

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# eclipse
2+
bin
3+
*.launch
4+
.settings
5+
.metadata
6+
.classpath
7+
.project
8+
9+
# idea
10+
out
11+
*.ipr
12+
*.iws
13+
*.iml
14+
.idea
15+
16+
# gradle
17+
build
18+
.gradle
19+
20+
# other
21+
eclipse
22+
run
23+
24+
# Files from Forge MDK
25+
forge*changelog.txt

build.gradle

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
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+
maven { url = 'https://maven.parchmentmc.org' }
6+
mavenCentral()
7+
}
8+
dependencies {
9+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
10+
classpath 'org.parchmentmc:librarian:1.+'
11+
}
12+
}
13+
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
14+
plugins {
15+
id 'eclipse'
16+
id 'maven-publish'
17+
}
18+
apply plugin: 'net.minecraftforge.gradle'
19+
apply plugin: 'org.parchmentmc.librarian.forgegradle'
20+
21+
version = '0.0.1-1.18.2'
22+
group = 'io.iridium.vaultarhud' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
23+
archivesBaseName = 'vaultarhud'
24+
25+
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
26+
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
27+
28+
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
29+
minecraft {
30+
// The mappings can be changed at any time and must be in the following format.
31+
// Channel: Version:
32+
// official MCVersion Official field/method names from Mojang mapping files
33+
// parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official
34+
//
35+
// You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
36+
// See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
37+
//
38+
// Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
39+
// Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started
40+
//
41+
// Use non-default mappings at your own risk. They may not always work.
42+
// Simply re-run your setup task after changing the mappings to update your workspace.
43+
mappings channel: 'parchment', version: '2022.11.06-1.18.2'
44+
45+
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.
46+
47+
// Default run configurations.
48+
// These can be tweaked, removed, or duplicated as needed.
49+
runs {
50+
client {
51+
workingDirectory project.file('run')
52+
53+
// Recommended logging data for a userdev environment
54+
// The markers can be added/remove as needed separated by commas.
55+
// "SCAN": For mods scan.
56+
// "REGISTRIES": For firing of registry events.
57+
// "REGISTRYDUMP": For getting the contents of all registries.
58+
property 'forge.logging.markers', 'REGISTRIES'
59+
60+
// Recommended logging level for the console
61+
// You can set various levels here.
62+
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
63+
property 'forge.logging.console.level', 'debug'
64+
65+
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
66+
property 'forge.enabledGameTestNamespaces', 'vaultarhud'
67+
68+
mods {
69+
vaultarhud {
70+
source sourceSets.main
71+
}
72+
}
73+
}
74+
75+
server {
76+
workingDirectory project.file('run')
77+
78+
property 'forge.logging.markers', 'REGISTRIES'
79+
80+
property 'forge.logging.console.level', 'debug'
81+
82+
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
83+
property 'forge.enabledGameTestNamespaces', 'vaultarhud'
84+
85+
mods {
86+
vaultarhud {
87+
source sourceSets.main
88+
}
89+
}
90+
}
91+
92+
// This run config launches GameTestServer and runs all registered gametests, then exits.
93+
// By default, the server will crash when no gametests are provided.
94+
// The gametest system is also enabled by default for other run configs under the /test command.
95+
gameTestServer {
96+
workingDirectory project.file('run')
97+
98+
// Recommended logging data for a userdev environment
99+
// The markers can be added/remove as needed separated by commas.
100+
// "SCAN": For mods scan.
101+
// "REGISTRIES": For firing of registry events.
102+
// "REGISTRYDUMP": For getting the contents of all registries.
103+
property 'forge.logging.markers', 'REGISTRIES'
104+
105+
// Recommended logging level for the console
106+
// You can set various levels here.
107+
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
108+
property 'forge.logging.console.level', 'debug'
109+
110+
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
111+
property 'forge.enabledGameTestNamespaces', 'vaultarhud'
112+
113+
mods {
114+
vaultarhud {
115+
source sourceSets.main
116+
}
117+
}
118+
}
119+
120+
data {
121+
workingDirectory project.file('run')
122+
123+
property 'forge.logging.markers', 'REGISTRIES'
124+
125+
property 'forge.logging.console.level', 'debug'
126+
127+
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
128+
args '--mod', 'vaultarhud', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
129+
130+
mods {
131+
vaultarhud {
132+
source sourceSets.main
133+
}
134+
}
135+
}
136+
}
137+
}
138+
139+
// Include resources generated by data generators.
140+
sourceSets.main.resources { srcDir 'src/generated/resources' }
141+
142+
repositories {
143+
// Put repositories for dependencies here
144+
// ForgeGradle automatically adds the Forge maven and Maven Central for you
145+
146+
// If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
147+
flatDir {
148+
dir 'libs'
149+
}
150+
}
151+
152+
dependencies {
153+
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
154+
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
155+
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
156+
minecraft 'net.minecraftforge:forge:1.18.2-40.2.9'
157+
158+
compileOnly name: 'the_vault-1.18.2-3.11.0.3011'
159+
160+
// Real mod deobf dependency examples - these get remapped to your current mappings
161+
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
162+
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
163+
// implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
164+
165+
// Examples using mod jars from ./libs
166+
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
167+
168+
// For more info...
169+
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
170+
// http://www.gradle.org/docs/current/userguide/dependency_management.html
171+
}
172+
173+
// Example for how to get properties into the manifest for reading at runtime.
174+
jar {
175+
manifest {
176+
attributes([
177+
"Specification-Title" : "Close Inventory with Mouse",
178+
"Specification-Vendor" : "Iridium IO",
179+
"Specification-Version" : "1", // We are version 1 of ourselves
180+
"Implementation-Title" : project.name,
181+
"Implementation-Version" : project.jar.archiveVersion,
182+
"Implementation-Vendor" : "Iridium IO",
183+
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
184+
])
185+
}
186+
}
187+
188+
// Example configuration to allow publishing using the maven-publish plugin
189+
// This is the preferred method to reobfuscate your jar file
190+
jar.finalizedBy('reobfJar')
191+
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
192+
// publish.dependsOn('reobfJar')
193+
194+
publishing {
195+
publications {
196+
mavenJava(MavenPublication) {
197+
artifact jar
198+
}
199+
}
200+
repositories {
201+
maven {
202+
url "file://${project.projectDir}/mcmodsrepo"
203+
}
204+
}
205+
}
206+
207+
tasks.withType(JavaCompile).configureEach {
208+
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
209+
}

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
2+
# This is required to provide enough memory for the Minecraft decompilation process.
3+
org.gradle.jvmargs=-Xmx3G
4+
org.gradle.daemon=false

gradle/wrapper/gradle-wrapper.jar

58.1 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)