Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# Auto detect text files and perform LF normalization
* text=auto
* 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
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

14 changes: 6 additions & 8 deletions .github/workflows/PUBLISH.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Publish on GitHub, Modrinth, CurseForge

on: [ workflow_dispatch ]
on: [workflow_dispatch]

env:
MINECRAFT_VERSION: 1.20.1
JAVA_VERSION: 17
MINECRAFT_VERSION: 1.21.1
JAVA_VERSION: 21
VERSION: 0.2.4
VERSION_TYPE: release
PUBLISH_GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}
Expand Down Expand Up @@ -55,17 +55,15 @@ jobs:
curseforge-id: 1000148
curseforge-token: "${{env.PUBLISH_CURSEFORGE_TOKEN}}"

name: "Create: Addon Compatibility - v${{env.VERSION}} - ${{env.MINECRAFT_VERSION}} - (neo)forge"
name: "Create: Addon Compatibility - v${{env.VERSION}} - Neoforge - ${{env.MINECRAFT_VERSION}}"
version: "${{env.VERSION}}"
version-type: "${{env.VERSION_TYPE}}"
changelog-file: LATEST_CHANGELOG.md
game-version-filter: releases

loaders: |
forge
neoforge
loaders: neoforge

files: "build/libs/createaddoncompatibility-${{env.VERSION}}.jar"
files: "neoforge/build/libs/createaddoncompatibility-neoforge-${{env.MINECRAFT_VERSION}}-${{env.VERSION}}.jar"

dependencies: |
create(required){modrinth:create}{curseforge:328085}#(ignore:github)
Expand Down
14 changes: 4 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,15 @@ out
*.ipr
*.iws
*.iml
.idea
.idea/*
!.idea/scopes

# gradle
build
.gradle

# other
.cache
eclipse
run
run-data
.cache
*.vscode
*.zip
*.mrpack
*.exe

# Files from Forge MDK
forge*changelog.txt
runs
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Create: Connected takes priority, recipes have been unified, Create Utilities's

Mods: [Immersive Engineering](https://modrinth.com/mod/immersiveengineering), [TFMG](https://modrinth.com/mod/create-tfmg)<br>
Coal Coke Dust from both mods works in both mods' processes and recipes.

</details>
<br>

Expand Down Expand Up @@ -64,23 +65,27 @@ Kerosene, Molten/Liquid Plastic, Lubricant/Lubrication Oil from both mods works
<br><br>

## Installation
The mod is currently only available for 1.20.1 (neo)forge. Fabric/Quilt versions and >=1.21.1 versions will come soon. A port to 1.19.2 is not planned.<br>

The mod is currently only available for 1.20.1 and 1.21.1 (neo)forge. Fabric/Quilt versions will come soon.<br>
[Almost Unified](https://modrinth.com/mod/almost-unified) is required to be installed.<br>
<br><br>

## Compatibility Configuration

To change which mod has the priority in compatibility, modify the `modPriorities` in `config/almostunified/unify.json`, for more info look at [this](https://github.com/AlmostReliable/almostunified/wiki/Unification-Config).
<br><br>
There are datapacks present in the mod which allow you to change certain things about compatibility between different mods.<br>
They can be enabled during world creation or by using the ``/datapack enable`` command.
They can be enabled during world creation or by using the `/datapack enable` command.
<br><br>

## Suggestions / More Compatibility Features

I do have more compatibility features planned, but if you have any ideas feel free to create an issue on GitHub or tell me in the Discord server.

<br><br>

## Credits

Thanks to the creators of the various mods for which compatibility has been added in this mod.<br>
Thanks to the AlmostReliable team for making Almost Unified, without which this mod would have been very difficult to make.<br>
Finally, thanks to the people on the Minecraft Mod Development discord for helping me out with some features in the mod.
214 changes: 4 additions & 210 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,212 +1,6 @@
plugins {
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.spongepowered.mixin' version '0.7.+'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
}


version = mod_version
group = mod_group_id

base {
archivesName = mod_id
}

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

// generateRunFolders = true

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


runs {
configureEach {
workingDirectory project.file('run')

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


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

client {
property 'forge.enabledGameTestNamespaces', mod_id
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
}

server {
property 'forge.enabledGameTestNamespaces', mod_id
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
}

// 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 {
property 'forge.enabledGameTestNamespaces', mod_id
}

data {
// example of overriding the workingDirectory set in configureEach above
workingDirectory project.file('run-data')

// 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/')
}
}
}

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

repositories {
maven {
name = 'Create Mod Maven'
url = 'https://maven.createmod.net'
}
maven {
name = 'Fuzss Maven'
url = 'https://raw.githubusercontent.com/Fuzss/modresources/main/maven/'
}
maven {
name = 'tterrag maven'
url = 'https://maven.tterrag.com/'
}
maven {
// location of the maven that hosts JEI files since January 2023
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.dev"
}
maven {
name = "Modrinth Maven"
url = "https://api.modrinth.com/maven"
}
maven {
name = "Curseforge Maven"
url = "https://cursemaven.com"
}
}

dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"

annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'

implementation(fg.deobf("com.simibubi.create:create-${minecraft_version}:${create_version}:slim") { transitive = false })
implementation(fg.deobf("net.createmod.ponder:Ponder-Forge-${minecraft_version}:${ponder_version}"))
compileOnly(fg.deobf("dev.engine-room.flywheel:flywheel-forge-api-${minecraft_version}:${flywheel_version}"))
runtimeOnly(fg.deobf("dev.engine-room.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}"))
implementation(fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}"))

compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1"))
implementation("io.github.llamalad7:mixinextras-forge:0.4.1")

// compile against the JEI API but do not include it at runtime
compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}"))
compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}"))
// at runtime, use the full JEI jar for Forge
runtimeOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}"))

implementation fg.deobf("com.almostreliable.mods:almostunified-forge:${almostunified_version}")

implementation fg.deobf("maven.modrinth:create-diesel-generators:${createdieselgenerators_version}")
implementation fg.deobf("curse.maven:create-industry-693815:6255138")
}



// This block of code expands all declared replace properties in the specified resource targets.
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: minecraft_version,
minecraft_version_range: minecraft_version_range,
forge_version: forge_version,
forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id: mod_id,
mod_name: mod_name,
mod_license: mod_license,
mod_version: mod_version,
mod_authors: mod_authors,
mod_description: mod_description,
create_version: create_version,
create_version_range: create_version_range,
jei_version: jei_version,
almostunified_version: almostunified_version,
createdieselgenerators_version: createdieselgenerators_version,
tfmg_version: tfmg_version
]
inputs.properties replaceProperties

filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}
}


jar {
manifest {
attributes([
"Specification-Title" : mod_name,
"Specification-Vendor" : mod_authors,
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : mod_authors,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs" : "mixins.${mod_id}.json"
])
}

}

// 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:
// tasks.named('publish').configure {
// dependsOn 'reobfJar'
// }

// Example configuration to allow publishing using the maven-publish plugin
publishing {
publications {
register('mavenJava', MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}

mixin {
add sourceSets.main, 'createaddoncompatibility.refmap.json'
config 'mixins.createaddoncompatibility.json'
// see https://fabricmc.net/develop/ for new versions
// id 'fabric-loom' version '1.11-SNAPSHOT' apply false
// see https://projects.neoforged.net/neoforged/moddevgradle for new versions
id 'net.neoforged.moddev' version '2.0.107' apply false
}
3 changes: 3 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id 'groovy-gradle-plugin'
}
Loading