-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
228 changed files
with
4,124 additions
and
687 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain | ||
* text eol=lf | ||
*.bat text eol=crlf | ||
*.patch text eol=lf | ||
*.java text eol=lf | ||
*.gradle text eol=crlf | ||
*.png binary | ||
*.gif binary | ||
*.exe binary | ||
*.dll binary | ||
*.jar binary | ||
*.lzma binary | ||
*.zip binary | ||
*.pyd binary | ||
*.cfg text eol=lf | ||
*.jks binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,168 +1,67 @@ | ||
plugins { | ||
id 'eclipse' | ||
id 'idea' | ||
id 'maven-publish' | ||
id 'net.minecraftforge.gradle' version '[6.0,6.2)' | ||
id 'com.matthewprenger.cursegradle' version '1.4.0' | ||
id 'com.modrinth.minotaur' version "2.+" | ||
id 'fabric-loom' version '1.2-SNAPSHOT' apply(false) | ||
id 'net.minecraftforge.gradle' version '[6.0,6.2)' apply(false) | ||
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' apply(false) | ||
id("org.spongepowered.mixin") version "0.7-SNAPSHOT" apply(false) | ||
id "net.darkhax.curseforgegradle" version "1.1.18" apply(false) | ||
id("com.modrinth.minotaur") version "2.+" apply(false) | ||
} | ||
|
||
version = "${version}" | ||
group = "${mod_group}" | ||
base { | ||
archivesName = "Instrumental-Mobs-${mc_version}" | ||
} | ||
|
||
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. | ||
java.toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
|
||
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" | ||
minecraft { | ||
mappings channel: mapping_channel, version: mapping_version | ||
|
||
//copyIdeResources = true | ||
|
||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') | ||
subprojects { | ||
apply plugin: 'java' | ||
|
||
runs { | ||
client { | ||
workingDirectory project.file('run') | ||
property 'mixin.env.remapRefMap', 'true' | ||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" | ||
java.toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
java.withSourcesJar() | ||
|
||
// Recommended logging data for a userdev environment | ||
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' | ||
property 'forge.logging.markers', 'REGISTRIES' | ||
|
||
// Recommended logging level for the console | ||
property 'forge.logging.console.level', 'debug' | ||
|
||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces. | ||
property 'forge.enabledGameTestNamespaces', "${mod_id}" | ||
|
||
mods { | ||
"${mod_id}" { | ||
source sourceSets.main | ||
} | ||
} | ||
jar { | ||
from(rootProject.file("LICENSE")) { | ||
rename { "${it}_${mod_name}" } | ||
} | ||
|
||
server { | ||
workingDirectory project.file('run') | ||
property 'mixin.env.remapRefMap', 'true' | ||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" | ||
|
||
// Recommended logging data for a userdev environment | ||
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' | ||
property 'forge.logging.markers', 'REGISTRIES' | ||
|
||
// Recommended logging level for the console | ||
property 'forge.logging.console.level', 'debug' | ||
|
||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces. | ||
property 'forge.enabledGameTestNamespaces', "${mod_id}" | ||
|
||
mods { | ||
"${mod_id}" { | ||
source sourceSets.main | ||
} | ||
} | ||
manifest { | ||
attributes([ | ||
'Specification-Title' : mod_name, | ||
'Specification-Vendor' : mod_author, | ||
'Specification-Version' : project.jar.archiveVersion, | ||
'Implementation-Title' : project.name, | ||
'Implementation-Version' : project.jar.archiveVersion, | ||
'Implementation-Vendor' : mod_author, | ||
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), | ||
'Timestamp' : System.currentTimeMillis(), | ||
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})", | ||
'Built-On-Minecraft' : minecraft_version | ||
]) | ||
} | ||
} | ||
|
||
data { | ||
workingDirectory project.file('run') | ||
property 'mixin.env.remapRefMap', 'true' | ||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" | ||
|
||
// Recommended logging data for a userdev environment | ||
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' | ||
property 'forge.logging.markers', 'REGISTRIES' | ||
|
||
// Recommended logging level for the console | ||
property 'forge.logging.console.level', 'debug' | ||
|
||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. | ||
args '--mod', "${mod_id}", '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') | ||
|
||
mods { | ||
"${mod_id}" { | ||
source sourceSets.main | ||
} | ||
} | ||
sourcesJar { | ||
from(rootProject.file("LICENSE")) { | ||
rename { "${it}_${mod_name}" } | ||
} | ||
} | ||
} | ||
|
||
// Include resources generated by data generators. | ||
sourceSets.main.resources { srcDir 'src/generated/resources' } | ||
|
||
repositories { | ||
maven { | ||
url = "https://maven.blamejared.com" | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
name = 'Sponge / Mixin' | ||
url = 'https://repo.spongepowered.org/repository/maven-public/' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}" | ||
|
||
compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") | ||
compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}") | ||
|
||
runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}") | ||
} | ||
|
||
// Example for how to get properties into the manifest for reading at runtime. | ||
jar { | ||
manifest { | ||
attributes([ | ||
"Specification-Title" : "${mod_id}", | ||
"Specification-Vendor" : "Mrbysco", | ||
"Specification-Version" : "1", // We are version 1 of ourselves | ||
"Implementation-Title" : project.name, | ||
"Implementation-Version" : project.jar.archiveVersion, | ||
"Implementation-Vendor" : "Mrbysco", | ||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") | ||
]) | ||
tasks.withType(JavaCompile).configureEach { | ||
it.options.encoding = 'UTF-8' | ||
it.options.getRelease().set(17) | ||
} | ||
} | ||
|
||
// Example configuration to allow publishing using the maven-publish plugin | ||
// This is the preferred method to reobfuscate your jar file | ||
jar.finalizedBy('reobfJar') | ||
// 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 | ||
// publish.dependsOn('reobfJar') | ||
|
||
def reobfFile = file("$buildDir/reobfJar/output.jar") | ||
def reobfArtifact = artifacts.add('default', reobfFile) { | ||
type 'jar' | ||
builtBy 'reobfJar' | ||
} | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifact(reobfArtifact) { | ||
builtBy reobfArtifact | ||
artifactId = archivesBaseName | ||
classifier null | ||
} | ||
processResources { | ||
filesMatching(['pack.mcmeta', 'fabric.mod.json', 'mods.toml', '*.mixins.json']) { | ||
expand project.properties | ||
} | ||
} | ||
repositories { | ||
if (System.getenv().SAP_SECRET) { | ||
maven { | ||
url "https://maven.saps.dev/releases" | ||
credentials { | ||
username = "mrbysco" | ||
password = "${System.getenv().SAP_SECRET}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation | ||
// Disables Gradle's custom module metadata from being published to maven. The | ||
// metadata includes mapped dependencies which are not reasonably consumable by | ||
// other mod developers. | ||
tasks.withType(GenerateModuleMetadata).configureEach { | ||
enabled = false | ||
} | ||
} | ||
|
||
apply from: 'gradle/curseforge.gradle' | ||
apply from: 'gradle/modrinth.gradle' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
* Fix Trumpet skeleton dropping a Xylophone instead of a Trumpet | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
plugins { | ||
id 'idea' | ||
id 'java' | ||
id 'maven-publish' | ||
id 'org.spongepowered.gradle.vanilla' | ||
} | ||
|
||
base { | ||
archivesName = "${mod_name}-common-${minecraft_version}" | ||
} | ||
|
||
minecraft { | ||
version(minecraft_version) | ||
if (file("src/main/resources/${mod_id}.accesswidener").exists()) { | ||
accessWideners(file("src/main/resources/${mod_id}.accesswidener")) | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5' | ||
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1' | ||
} |
14 changes: 14 additions & 0 deletions
14
common/src/main/java/com/mrbysco/instrumentalmobs/CommonClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.mrbysco.instrumentalmobs; | ||
|
||
import com.mrbysco.instrumentalmobs.registration.InstrumentalEntities; | ||
import com.mrbysco.instrumentalmobs.registration.InstrumentalRegistry; | ||
import com.mrbysco.instrumentalmobs.registration.InstrumentalSounds; | ||
|
||
public class CommonClass { | ||
|
||
public static void init() { | ||
InstrumentalSounds.loadClass(); | ||
InstrumentalEntities.loadClass(); | ||
InstrumentalRegistry.loadClass(); | ||
} | ||
} |
9 changes: 6 additions & 3 deletions
9
...m/Mrbysco/InstrumentalMobs/Reference.java → ...m/mrbysco/instrumentalmobs/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.