Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Dec 19, 2024
0 parents commit 175932b
Show file tree
Hide file tree
Showing 376 changed files with 43,353 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Disable autocrlf on generated files, they always generate with LF
# Add any extra files or paths here to make git stop saying they
# are changed when only line endings change.
src/generated/**/.cache/cache text eol=lf
src/generated/**/*.json text eol=lf
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# eclipse
bin
*.launch
.settings
.metadata
.classpath
.project

# idea
out
*.ipr
*.iws
*.iml
.idea

# gradle
build
.gradle

# other
eclipse
run
/mcmodsrepo/
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Template for 1.12.2 Cleanroom
Everything but the Java Classes are thanks and are credited to SizeableShrimps ForgeTemplates found [Here](https://github.com/SizableShrimp/ForgeTemplate/tree/1.12.x)

## Setting up
* Open up `gradle.properties` and change all the necessary properties
* Rename the main package to be the same as `mod_base_package` in the properties file, e.g. `io.github.examplemod`
* Uncomment codes in `build.gradle` if you are using coremod or mixin

Finally, import into your IDE of choice.
144 changes: 144 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@

buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public' }
maven { url = 'https://maven.outlands.top/releases' }
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.10.+', changing: true
//classpath "org.spongepowered:mixingradle:0.7.+"
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'java'
//apply plugin: 'org.spongepowered.mixin'

version = "${mod_version}"
group = mod_base_package
archivesBaseName = mod_id



java.toolchain.languageVersion = JavaLanguageVersion.of(21)

minecraft {

mappings channel: mappings_channel, version: mappings_version

// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

legacy {
fixClasspath = true
extractMappings = true
attachMappings = true
}

runs {
client {
workingDirectory project.file('run/client')

property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'

}

server {
workingDirectory project.file('run/server')

property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'

mods {
"${mod_id}" {
source sourceSets.main
}
}
}
}
}

sourceSets {
main {
resources {
srcDir 'src/generated/resources'
}
}
}

//mixin {add sourceSets.main, mod_id + ".mixins.refmap.json"}
repositories {
maven {
name 'Cleanroom Maven'
url 'https://maven.cleanroommc.com/'
}
maven {
url "https://repo.cleanroommc.com/snapshots"
}
maven {
url "https://maven.outlands.top/releases/"
}

mavenCentral()
}

dependencies {
minecraft "com.cleanroommc:cleanroom:${cleanroom_version}"
/*
annotationProcessor 'org.ow2.asm:asm:9.6'
annotationProcessor 'com.google.guava:guava:33.0.0-jre'
annotationProcessor 'com.google.code.gson:gson:2.10.1'
annotationProcessor ('com.cleanroommc:sponge-mixin:0.18.5+mixin.0.8.5')
*/
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}

jar {
manifest {
attributes([
'Specification-Title': mod_id,
'Specification-Vendor': mod_authors,
'Specification-Version': '1', // We are version 1 of ourselves
//'FMLCorePluginContainsFMLMod': true,
//'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
//'FMLCorePlugin': '',
//'ForceLoadAsMod': true
//'FMLAT': '',
'Implementation-Title': project.name,
'Implementation-Version': mod_version,
'Implementation-Vendor': mod_authors,
'Implementation-Timestamp': new Date().format('yyyy-MM-dd\'T\'HH:mm:ssZ')
])
}
}

jar.finalizedBy('reobfJar')

publishing {
repositories {
maven {
name = "outlands"
url = "https://maven.outlands.top/releases"
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
publications {
maven(MavenPublication) {
groupId = "com.cleanroommc"
artifactId = "lwjglxx"
version = mod_version
from components.java
}
}
}
22 changes: 22 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs = -Xmx3G
#-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1081
org.gradle.daemon=false
#org.gradle.java.home=C:/Program Files/Java/jdk-1.8

minecraft_version=1.12.2
minecraft_version_range=[1.12,1.13)
cleanroom_version=0.2.4-alpha
forge_version_range=[23,)
loader_version_range=[23,)
mappings_channel=stable
mappings_version=39-1.12

mod_id=lwjglxx
mod_name=LWJGLXX
mod_main_class=ExampleMod
mod_version=1.0.0
mod_base_package=org.lwjglx
mod_authors=SomeAuthor
mod_description=Example mod description\nNewline characters can be used and will be replaced properly
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 175932b

Please sign in to comment.