-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
1 parent
4695e01
commit 4f2f4ca
Showing
44 changed files
with
524 additions
and
29 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
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
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 |
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,26 @@ | ||
# eclipse | ||
bin | ||
*.launch | ||
.settings | ||
.metadata | ||
.classpath | ||
.project | ||
|
||
# idea | ||
out | ||
*.ipr | ||
*.iws | ||
*.iml | ||
.idea | ||
|
||
# gradle | ||
build | ||
.gradle | ||
|
||
# other | ||
eclipse | ||
run | ||
runs | ||
run-data | ||
|
||
repo |
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,155 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'idea' | ||
id 'maven-publish' | ||
id 'net.neoforged.gradle.userdev' version '7.0.5' | ||
id 'net.darkhax.curseforgegradle' version '1.0.14' | ||
id "com.modrinth.minotaur" version "2.+" | ||
} | ||
|
||
version = mod_version | ||
group = mod_group | ||
|
||
repositories { | ||
mavenLocal() | ||
} | ||
|
||
base { | ||
archivesName = "${mod_id}-neoforge-${minecraft_version}" | ||
} | ||
|
||
java.toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
|
||
runs { | ||
configureEach { | ||
// Recommended logging data for a userdev environment | ||
// The markers can be added/remove as needed separated by commas. | ||
// "SCAN": For mods scan. | ||
// "REGISTRIES": For firing of registry events. | ||
// "REGISTRYDUMP": For getting the contents of all registries. | ||
systemProperty 'forge.logging.markers', 'REGISTRIES' | ||
|
||
// Recommended logging level for the console | ||
// You can set various levels here. | ||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels | ||
systemProperty 'forge.logging.console.level', 'debug' | ||
|
||
modSource project.sourceSets.main | ||
} | ||
|
||
client { | ||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces. | ||
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id | ||
} | ||
|
||
server { | ||
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id | ||
programArgument '--nogui' | ||
} | ||
|
||
// This run config launches GameTestServer and runs all registered gametests, then exits. | ||
// By default, the server will crash when no gametests are provided. | ||
// The gametest system is also enabled by default for other run configs under the /test command. | ||
gameTestServer { | ||
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id | ||
} | ||
|
||
data { | ||
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it | ||
// workingDirectory project.file('run-data') | ||
|
||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. | ||
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath() | ||
} | ||
} | ||
|
||
sourceSets.main.resources { srcDir 'src/generated/resources' } | ||
|
||
dependencies { | ||
implementation "net.neoforged:neoforge:${neoforge_version}" | ||
compileOnly project(":shared") | ||
|
||
compileOnly "org.jetbrains:annotations:22.0.0" | ||
|
||
compileOnly "mezz.jei:jei-$jei_minecraft_version-common-api:$jei_version" | ||
if (jei_minecraft_version == minecraft_version) { | ||
runtimeOnly "mezz.jei:jei-$jei_minecraft_version-forge:$jei_version" | ||
} | ||
} | ||
|
||
apply from: 'dependencies.gradle' | ||
|
||
tasks.withType(JavaCompile) { | ||
source(project(":shared").sourceSets.main.allSource) | ||
} | ||
|
||
def resourceTargets = ['META-INF/mods.toml', 'pack.mcmeta'] | ||
def replaceProperties = [ | ||
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range, | ||
neoforge_version: neoforge_version, neoforge_version_range: neoforge_version_range, | ||
neoforge_loader_version_range: neoforge_loader_version_range, | ||
mod_id: mod_id, mod_version: mod_version | ||
] | ||
tasks.withType(ProcessResources).configureEach { | ||
inputs.properties replaceProperties | ||
|
||
filesMatching(resourceTargets) { | ||
expand replaceProperties | ||
} | ||
} | ||
|
||
jar { | ||
from(rootProject.file("LICENSE")) { | ||
rename { "${it}_${mod_id}" } | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifactId = mod_id + "-neoforge" | ||
version = project.version + (!project.version.endsWith("SNAPSHOT") ? "+" + minecraft_version : "") | ||
|
||
from components.java | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
var releasesRepoUrl = "https://maven.twelveiterations.com/repository/maven-releases/" | ||
var snapshotsRepoUrl = "https://maven.twelveiterations.com/repository/maven-snapshots/" | ||
url = uri(version.toString().endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl) | ||
name = "twelveIterationsNexus" | ||
credentials(PasswordCredentials) | ||
} | ||
} | ||
} | ||
|
||
task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { | ||
dependsOn('build') | ||
description = 'Publishes the NeoForge build to CurseForge.' | ||
group = 'publishing' | ||
|
||
apiToken = project.findProperty("curseforge.api_key") ?: System.getenv("CURSEFORGE_TOKEN") ?: "none" | ||
|
||
def mainFile = upload(curseforge_forge_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) | ||
mainFile.changelog = rootProject.file('CHANGELOG.md').text | ||
project.minecraft_versions.split(',').toList().each { mainFile.addGameVersion(it) } | ||
mainFile.releaseType = "release" | ||
} | ||
|
||
modrinth { | ||
token = project.findProperty("modrinth.token") ?: System.getenv("MODRINTH_TOKEN") ?: "none" | ||
projectId = project.modrinth_project_id | ||
versionType = project.modrinth_release_type | ||
versionNumber = project.version + "+neoforge-" + project.minecraft_version | ||
uploadFile = jar | ||
changelog = rootProject.file("CHANGELOG.md").text | ||
gameVersions = project.minecraft_versions.split(',').toList() | ||
syncBodyFrom = rootProject.file("modrinth.md").text | ||
loaders = ['neoforge'] | ||
} |
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,2 @@ | ||
dependencies { | ||
} |
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,27 @@ | ||
modLoader="javafml" | ||
loaderVersion="${neoforge_loader_version_range}" | ||
license="All rights reserved" | ||
issueTrackerURL="https://github.com/TwelveIterationMods/Balm/issues" | ||
[[mods]] | ||
modId="balm" | ||
version="${mod_version}" | ||
displayName="Balm" | ||
displayURL="https://mods.twelveiterations.com/" | ||
logoFile="balm-icon.png" | ||
credits="BlayTheNinth" | ||
authors="BlayTheNinth" | ||
description=''' | ||
Abstraction Layer (but not really)™ for Blay's multiplatform mods | ||
''' | ||
[[dependencies.balm]] | ||
modId="neoforge" | ||
mandatory=true | ||
versionRange="${neoforge_version_range}" | ||
ordering="NONE" | ||
side="BOTH" | ||
[[dependencies.balm]] | ||
modId="minecraft" | ||
mandatory=true | ||
versionRange="${minecraft_version_range}" | ||
ordering="NONE" | ||
side="BOTH" |
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,30 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8", | ||
"package": "net.blay09.mods.balm.mixin", | ||
"compatibilityLevel": "JAVA_17", | ||
"refmap": "balm.refmap.json", | ||
"mixins": [ | ||
"CropBlockMixin", | ||
"StemBlockMixin", | ||
"ReloadableServerResourcesMixin", | ||
"SlotAccessor", | ||
"MinecraftServerMixin", | ||
"EntityMixin" | ||
], | ||
"client": [ | ||
"AbstractContainerScreenAccessor", | ||
"CheckboxAccessor", | ||
"ImageButtonAccessor", | ||
"KeyMappingAccessor", | ||
"KeyMappingMixin", | ||
"MouseHandlerAccessor", | ||
"ScreenAccessor", | ||
"MinecraftMixin", | ||
"LootTableMixin", | ||
"ModelBakeryMixin" | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
neoforge/src/main/resources/data/balm/forge/biome_modifier/balm.json
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,3 @@ | ||
{ | ||
"type": "balm:balm" | ||
} |
10 changes: 10 additions & 0 deletions
10
neoforge/src/main/resources/data/balm/tags/items/black_dyes.json
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,10 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"minecraft:black_dye", | ||
{ | ||
"id": "#forge:dyes/black", | ||
"required": false | ||
} | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
neoforge/src/main/resources/data/balm/tags/items/blue_dyes.json
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,10 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"minecraft:blue_dye", | ||
{ | ||
"id":"#forge:dyes/blue", | ||
"required": false | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
neoforge/src/main/resources/data/balm/tags/items/brown_dyes.json
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,7 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{"id":"#forge:dyes/brown", "required": false}, | ||
"minecraft:brown_dye" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
neoforge/src/main/resources/data/balm/tags/items/cooking_oil.json
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,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{"id":"#forge:cookingoil", "required": false} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
neoforge/src/main/resources/data/balm/tags/items/cyan_dyes.json
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,7 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{"id":"#forge:dyes/cyan", "required": false}, | ||
"minecraft:cyan_dye" | ||
] | ||
} |
Oops, something went wrong.