diff --git a/.gitattributes b/.gitattributes index dfe0770..20fc528 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 5f67b25..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -ko_fi: amronos \ No newline at end of file diff --git a/.github/workflows/PUBLISH.yml b/.github/workflows/PUBLISH.yml index 97c27f1..6db1938 100644 --- a/.github/workflows/PUBLISH.yml +++ b/.github/workflows/PUBLISH.yml @@ -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 }} @@ -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) diff --git a/.gitignore b/.gitignore index af7dd5e..e0ccc6d 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/README.md b/README.md index 31ecf4a..60fee0a 100644 --- a/README.md +++ b/README.md @@ -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)
Coal Coke Dust from both mods works in both mods' processes and recipes. +
@@ -64,23 +65,27 @@ Kerosene, Molten/Liquid Plastic, Lubricant/Lubrication Oil from both mods works

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


## 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).

There are datapacks present in the mod which allow you to change certain things about compatibility between different mods.
-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.

## 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.

## Credits + Thanks to the creators of the various mods for which compatibility has been added in this mod.
Thanks to the AlmostReliable team for making Almost Unified, without which this mod would have been very difficult to make.
Finally, thanks to the people on the Minecraft Mod Development discord for helping me out with some features in the mod. diff --git a/build.gradle b/build.gradle index 499db5f..9a70037 100644 --- a/build.gradle +++ b/build.gradle @@ -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 } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle new file mode 100644 index 0000000..6784052 --- /dev/null +++ b/buildSrc/build.gradle @@ -0,0 +1,3 @@ +plugins { + id 'groovy-gradle-plugin' +} diff --git a/buildSrc/src/main/groovy/multiloader-common.gradle b/buildSrc/src/main/groovy/multiloader-common.gradle new file mode 100644 index 0000000..22afc29 --- /dev/null +++ b/buildSrc/src/main/groovy/multiloader-common.gradle @@ -0,0 +1,128 @@ +plugins { + id 'java-library' + id 'maven-publish' +} + +base { + archivesName = "${mod_id}-${project.name}-${minecraft_version}" +} + +java { + toolchain.languageVersion = JavaLanguageVersion.of(java_version) + withSourcesJar() + withJavadocJar() +} + +repositories { + mavenCentral() + // https://docs.gradle.org/current/userguide/declaring_repositories.html#declaring_content_exclusively_found_in_one_repository + exclusiveContent { + forRepository { + maven { + name = 'Sponge' + url = 'https://repo.spongepowered.org/repository/maven-public' + } + } + filter { includeGroupAndSubgroups('org.spongepowered') } + } + exclusiveContent { + forRepositories( + maven { + name = 'ParchmentMC' + url = 'https://maven.parchmentmc.org/' + }, + maven { + name = "NeoForge" + url = 'https://maven.neoforged.net/releases' + } + ) + filter { includeGroup('org.parchmentmc.data') } + } + maven { + name = 'BlameJared' + url = 'https://maven.blamejared.com' + } + maven { url = "https://maven.createmod.net" } // Create, Ponder, Flywheel + maven { url = "https://maven.ithundxr.dev/snapshots" } // Registrate +} + +// Declare capabilities on the outgoing configurations. +// Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component +['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant -> + configurations."$variant".outgoing { + capability("$group:${base.archivesName.get()}:$version") + capability("$group:$mod_id-${project.name}-${minecraft_version}:$version") + capability("$group:$mod_id:$version") + } + publishing.publications.configureEach { + suppressPomMetadataWarningsFor(variant) + } +} + +sourcesJar { + from(rootProject.file('LICENSE')) { + rename { "${it}_${mod_name}" } + } +} + +jar { + from(rootProject.file('LICENSE')) { + rename { "${it}_${mod_name}" } + } + + 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, + 'Built-On-Minecraft' : minecraft_version + ]) + } +} + +processResources { + var expandProps = [ + 'version' : version, + 'group' : project.group, //Else we target the task's group. + 'minecraft_version' : minecraft_version, + 'minecraft_version_range' : minecraft_version_range, + 'fabric_version' : fabric_version, + 'fabric_loader_version' : fabric_loader_version, + 'mod_name' : mod_name, + 'mod_author' : mod_author, + 'mod_id' : mod_id, + 'license' : license, + 'description' : project.description, + 'neoforge_version' : neoforge_version, + 'neoforge_loader_version_range': neoforge_loader_version_range, + 'credits' : credits, + 'java_version' : java_version, + 'create_version' : create_version, + 'ponder_version' : ponder_version, + 'flywheel_version' : flywheel_version, + 'registrate_version' : registrate_version, + 'almostunified_version' : almostunified_version, + ] + + filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'META-INF/neoforge.mods.toml', '*.mixins.json']) { + expand expandProps + } + inputs.properties(expandProps) +} + +publishing { + publications { + register('mavenJava', MavenPublication) { + artifactId base.archivesName.get() + from components.java + } + } + repositories { + maven { + url System.getenv('local_maven_url') + } + } +} diff --git a/buildSrc/src/main/groovy/multiloader-loader.gradle b/buildSrc/src/main/groovy/multiloader-loader.gradle new file mode 100644 index 0000000..92e2325 --- /dev/null +++ b/buildSrc/src/main/groovy/multiloader-loader.gradle @@ -0,0 +1,44 @@ +plugins { + id 'multiloader-common' +} + +configurations { + commonJava{ + canBeResolved = true + } + commonResources{ + canBeResolved = true + } +} + +dependencies { + compileOnly(project(':common')) { + capabilities { + requireCapability "$group:$mod_id" + } + } + commonJava project(path: ':common', configuration: 'commonJava') + commonResources project(path: ':common', configuration: 'commonResources') +} + +tasks.named('compileJava', JavaCompile) { + dependsOn(configurations.commonJava) + source(configurations.commonJava) +} + +processResources { + dependsOn(configurations.commonResources) + from(configurations.commonResources) +} + +tasks.named('javadoc', Javadoc).configure { + dependsOn(configurations.commonJava) + source(configurations.commonJava) +} + +tasks.named('sourcesJar', Jar) { + dependsOn(configurations.commonJava) + from(configurations.commonJava) + dependsOn(configurations.commonResources) + from(configurations.commonResources) +} diff --git a/common/build.gradle b/common/build.gradle new file mode 100644 index 0000000..d4ca1d4 --- /dev/null +++ b/common/build.gradle @@ -0,0 +1,43 @@ +plugins { + id 'multiloader-common' + id 'net.neoforged.moddev' +} + +neoForge { + neoFormVersion = neo_form_version + // Automatically enable AccessTransformers if the file exists + def at = file('src/main/resources/META-INF/accesstransformer.cfg') + if (at.exists()) { + accessTransformers.from(at.absolutePath) + } + parchment { + minecraftVersion = parchment_minecraft + mappingsVersion = parchment_version + } +} + +dependencies { + compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5' + // fabric and neoforge both bundle mixinextras, so it is safe to use it in common + compileOnly group: 'io.github.llamalad7', name: 'mixinextras-common', version: '0.3.5' + annotationProcessor group: 'io.github.llamalad7', name: 'mixinextras-common', version: '0.3.5' + // Dependencies + compileOnly "com.almostreliable.mods:almostunified-common:${almostunified_version}" +} + +configurations { + commonJava { + canBeResolved = false + canBeConsumed = true + } + commonResources { + canBeResolved = false + canBeConsumed = true + } +} + +artifacts { + commonJava sourceSets.main.java.sourceDirectories.singleFile + commonResources sourceSets.main.resources.sourceDirectories.singleFile +} + diff --git a/common/src/main/java/dev/amronos/createaddoncompatibility/CommonClass.java b/common/src/main/java/dev/amronos/createaddoncompatibility/CommonClass.java new file mode 100644 index 0000000..0435ba4 --- /dev/null +++ b/common/src/main/java/dev/amronos/createaddoncompatibility/CommonClass.java @@ -0,0 +1,7 @@ +package dev.amronos.createaddoncompatibility; + +public class CommonClass { + + public static void init() { + } +} diff --git a/common/src/main/java/dev/amronos/createaddoncompatibility/Constants.java b/common/src/main/java/dev/amronos/createaddoncompatibility/Constants.java new file mode 100644 index 0000000..03c7044 --- /dev/null +++ b/common/src/main/java/dev/amronos/createaddoncompatibility/Constants.java @@ -0,0 +1,11 @@ +package dev.amronos.createaddoncompatibility; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Constants { + + public static final String MOD_ID = "createaddoncompatibility"; + public static final String MOD_NAME = "Create: Addon Compatiblity"; + public static final Logger LOG = LoggerFactory.getLogger(MOD_NAME); +} \ No newline at end of file diff --git a/src/main/java/com/amronos/createaddoncompatibility/data/tags/ForgeTags.java b/common/src/main/java/dev/amronos/createaddoncompatibility/data/tags/CommonTags.java similarity index 50% rename from src/main/java/com/amronos/createaddoncompatibility/data/tags/ForgeTags.java rename to common/src/main/java/dev/amronos/createaddoncompatibility/data/tags/CommonTags.java index f873609..733968f 100644 --- a/src/main/java/com/amronos/createaddoncompatibility/data/tags/ForgeTags.java +++ b/common/src/main/java/dev/amronos/createaddoncompatibility/data/tags/CommonTags.java @@ -1,30 +1,34 @@ -package com.amronos.createaddoncompatibility.data.tags; +package dev.amronos.createaddoncompatibility.data.tags; +import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.FluidTags; -import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.level.material.Fluid; -public class ForgeTags { - +public class CommonTags { public static class Fluids { public static final TagKey CRUDE_OIL = tag("crude_oil"); - public static final TagKey LIQUID_PLASTIC = tag("liquid_plastic"); + public static final TagKey PLASTIC = tag("plastic"); public static final TagKey LUBRICANT = tag("lubricant"); + public static final TagKey LUBRICATION_OIL = tag("lubrication_oil"); private static TagKey tag(String name) { - return FluidTags.create(new ResourceLocation("forge", name)); + return TagKey.create( + Registries.FLUID, + ResourceLocation.fromNamespaceAndPath("c", name) + ); } } public static class Items { public static final TagKey PLASTIC = tag("ingots/plastic"); - public static final TagKey COKE_DUST = tag("dusts/coal_coke"); private static TagKey tag(String name) { - return ItemTags.create(new ResourceLocation("forge", name)); + return TagKey.create( + Registries.ITEM, + ResourceLocation.fromNamespaceAndPath("c", name) + ); } } } diff --git a/src/main/java/com/amronos/createaddoncompatibility/data/tags/CopycatsTags.java b/common/src/main/java/dev/amronos/createaddoncompatibility/data/tags/CopycatsTags.java similarity index 70% rename from src/main/java/com/amronos/createaddoncompatibility/data/tags/CopycatsTags.java rename to common/src/main/java/dev/amronos/createaddoncompatibility/data/tags/CopycatsTags.java index 78ddb5b..709c23a 100644 --- a/src/main/java/com/amronos/createaddoncompatibility/data/tags/CopycatsTags.java +++ b/common/src/main/java/dev/amronos/createaddoncompatibility/data/tags/CopycatsTags.java @@ -1,7 +1,7 @@ -package com.amronos.createaddoncompatibility.data.tags; +package dev.amronos.createaddoncompatibility.data.tags; +import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; @@ -14,7 +14,10 @@ public static class Items { public static final TagKey COPYCAT_STAIRS = tag("copycat_stairs"); private static TagKey tag(String name) { - return ItemTags.create(new ResourceLocation("copycats", name)); + return TagKey.create( + Registries.ITEM, + ResourceLocation.fromNamespaceAndPath("copycats", name) + ); } } } diff --git a/common/src/main/java/dev/amronos/createaddoncompatibility/mixin/MixinUnifySerializer.java b/common/src/main/java/dev/amronos/createaddoncompatibility/mixin/MixinUnifySerializer.java new file mode 100644 index 0000000..137594b --- /dev/null +++ b/common/src/main/java/dev/amronos/createaddoncompatibility/mixin/MixinUnifySerializer.java @@ -0,0 +1,57 @@ +package dev.amronos.createaddoncompatibility.mixin; + +import com.almostreliable.unified.config.UnificationConfig; +import dev.amronos.createaddoncompatibility.Constants; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyVariable; + +import java.util.ArrayList; +import java.util.List; + +@Mixin(UnificationConfig.UnifySerializer.class) +public class MixinUnifySerializer { + @ModifyVariable(method = "handleDeserialization*", at = @At(value = "STORE"), name = "modPriorities", remap = false) + private List modPrioritiesMixin(List modPriorities){ + Constants.LOG.info("Adding modPriorities for AlmostUnified, this will not reflect in unify.json"); + ArrayList newModPriorities = new ArrayList<>(modPriorities); + List cacModPriorities = new ArrayList<>(); + cacModPriorities.add("pneumaticcraft"); + cacModPriorities.add("copycats"); + cacModPriorities.add("create_connected"); + cacModPriorities.add("create_dd"); + cacModPriorities.add("tfmg"); + for (String i : cacModPriorities) { + if (!newModPriorities.contains(i)) { + newModPriorities.add(i); + } + } + return newModPriorities; + } + + @ModifyVariable(method = "handleDeserialization*", at = @At(value = "STORE"), name = "tags", remap = false) + private List tagsMixin(List tags){ + Constants.LOG.info("Adding tags for AlmostUnified, this will not reflect in unify.json"); + ArrayList newTags = new ArrayList<>(tags); + List cacTags = new ArrayList<>(); + cacTags.add("c:ingots/plastic"); + cacTags.add("createaddoncompatibility:six_way_gearbox"); + cacTags.add("copycats:copycat_beam"); + cacTags.add("copycats:copycat_block"); + cacTags.add("copycats:copycat_board"); + cacTags.add("copycats:copycat_box"); + cacTags.add("copycats:copycat_catwalk"); + cacTags.add("copycats:copycat_fence"); + cacTags.add("copycats:copycat_fence_gate"); + cacTags.add("copycats:copycat_slab"); + cacTags.add("copycats:copycat_stairs"); + cacTags.add("copycats:copycat_vertical_step"); + cacTags.add("copycats:copycat_wall"); + for (String i : cacTags) { + if (!newTags.contains(i)) { + newTags.add(i); + } + } + return newTags; + } +} diff --git a/common/src/main/java/dev/amronos/createaddoncompatibility/platform/Services.java b/common/src/main/java/dev/amronos/createaddoncompatibility/platform/Services.java new file mode 100644 index 0000000..90b4a22 --- /dev/null +++ b/common/src/main/java/dev/amronos/createaddoncompatibility/platform/Services.java @@ -0,0 +1,30 @@ +package dev.amronos.createaddoncompatibility.platform; + +import dev.amronos.createaddoncompatibility.Constants; +import dev.amronos.createaddoncompatibility.platform.services.IPlatformHelper; + +import java.util.ServiceLoader; + +// Service loaders are a built-in Java feature that allow us to locate implementations of an interface that vary from one +// environment to another. In the context of MultiLoader we use this feature to access a mock API in the common code that +// is swapped out for the platform specific implementation at runtime. +public class Services { + + // In this example we provide a platform helper which provides information about what platform the mod is running on. + // For example this can be used to check if the code is running on Forge vs Fabric, or to ask the modloader if another + // mod is loaded. + public static final IPlatformHelper PLATFORM = load(IPlatformHelper.class); + + // This code is used to load a service for the current environment. Your implementation of the service must be defined + // manually by including a text file in META-INF/services named with the fully qualified class name of the service. + // Inside the file you should write the fully qualified class name of the implementation to load for the platform. For + // example our file on Forge points to ForgePlatformHelper while Fabric points to FabricPlatformHelper. + public static T load(Class clazz) { + + final T loadedService = ServiceLoader.load(clazz) + .findFirst() + .orElseThrow(() -> new NullPointerException("Failed to load service for " + clazz.getName())); + Constants.LOG.debug("Loaded {} for service {}", loadedService, clazz); + return loadedService; + } +} \ No newline at end of file diff --git a/common/src/main/java/dev/amronos/createaddoncompatibility/platform/services/IPlatformHelper.java b/common/src/main/java/dev/amronos/createaddoncompatibility/platform/services/IPlatformHelper.java new file mode 100644 index 0000000..c6e8334 --- /dev/null +++ b/common/src/main/java/dev/amronos/createaddoncompatibility/platform/services/IPlatformHelper.java @@ -0,0 +1,36 @@ +package dev.amronos.createaddoncompatibility.platform.services; + +public interface IPlatformHelper { + + /** + * Gets the name of the current platform + * + * @return The name of the current platform. + */ + String getPlatformName(); + + /** + * Checks if a mod with the given id is loaded. + * + * @param modId The mod to check if it is loaded. + * @return True if the mod is loaded, false otherwise. + */ + boolean isModLoaded(String modId); + + /** + * Check if the game is currently in a development environment. + * + * @return True if in a development environment, false otherwise. + */ + boolean isDevelopmentEnvironment(); + + /** + * Gets the name of the environment type as a string. + * + * @return The name of the environment type. + */ + default String getEnvironmentName() { + + return isDevelopmentEnvironment() ? "development" : "production"; + } +} \ No newline at end of file diff --git a/common/src/main/resources/createaddoncompatibility.mixins.json b/common/src/main/resources/createaddoncompatibility.mixins.json new file mode 100644 index 0000000..1c8facd --- /dev/null +++ b/common/src/main/resources/createaddoncompatibility.mixins.json @@ -0,0 +1,15 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "dev.amronos.createaddoncompatibility.mixin", + "refmap": "${mod_id}.refmap.json", + "compatibilityLevel": "JAVA_18", + "mixins": [], + "client": [], + "server": [ + "MixinUnifySerializer" + ], + "injectors": { + "defaultRequire": 1 + } +} diff --git a/src/main/resources/logo.png b/common/src/main/resources/logo.png similarity index 100% rename from src/main/resources/logo.png rename to common/src/main/resources/logo.png diff --git a/common/src/main/resources/pack.mcmeta b/common/src/main/resources/pack.mcmeta new file mode 100644 index 0000000..52854ec --- /dev/null +++ b/common/src/main/resources/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "description": "${mod_name}", + "pack_format": 8 + } +} \ No newline at end of file diff --git a/fabric/build.gradle b/fabric/build.gradle new file mode 100644 index 0000000..f82b365 --- /dev/null +++ b/fabric/build.gradle @@ -0,0 +1,37 @@ +plugins { + id 'multiloader-loader' + id 'fabric-loom' +} +dependencies { + minecraft "com.mojang:minecraft:${minecraft_version}" + mappings loom.layered { + officialMojangMappings() + parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip") + } + modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" + modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" +} + +loom { + def aw = project(':common').file("src/main/resources/${mod_id}.accesswidener") + if (aw.exists()) { + accessWidenerPath.set(aw) + } + mixin { + defaultRefmapName.set("${mod_id}.refmap.json") + } + runs { + client { + client() + setConfigName('Fabric Client') + ideConfigGenerated(true) + runDir('runs/client') + } + server { + server() + setConfigName('Fabric Server') + ideConfigGenerated(true) + runDir('runs/server') + } + } +} \ No newline at end of file diff --git a/fabric/src/main/java/dev/amronos/createaddoncompatibility/CreateAddonCompatibility.java b/fabric/src/main/java/dev/amronos/createaddoncompatibility/CreateAddonCompatibility.java new file mode 100644 index 0000000..d1c3fb9 --- /dev/null +++ b/fabric/src/main/java/dev/amronos/createaddoncompatibility/CreateAddonCompatibility.java @@ -0,0 +1,18 @@ +package dev.amronos.createaddoncompatibility; + +import net.fabricmc.api.ModInitializer; + +public class CreateAddonCompatibility implements ModInitializer { + + @Override + public void onInitialize() { + + // This method is invoked by the Fabric mod loader when it is ready + // to load your mod. You can access Fabric and Common code in this + // project. + + // Use Fabric to bootstrap the Common mod. + Constants.LOG.info("Hello Fabric world!"); + CommonClass.init(); + } +} diff --git a/fabric/src/main/java/dev/amronos/createaddoncompatibility/mixin/MixinTitleScreen.java b/fabric/src/main/java/dev/amronos/createaddoncompatibility/mixin/MixinTitleScreen.java new file mode 100644 index 0000000..ca83143 --- /dev/null +++ b/fabric/src/main/java/dev/amronos/createaddoncompatibility/mixin/MixinTitleScreen.java @@ -0,0 +1,20 @@ +package dev.amronos.createaddoncompatibility.mixin; + +import dev.amronos.createaddoncompatibility.Constants; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.screens.TitleScreen; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(TitleScreen.class) +public class MixinTitleScreen { + + @Inject(at = @At("HEAD"), method = "init()V") + private void init(CallbackInfo info) { + + Constants.LOG.info("This line is printed by an example mod mixin from Fabric!"); + Constants.LOG.info("MC Version: {}", Minecraft.getInstance().getVersionType()); + } +} \ No newline at end of file diff --git a/fabric/src/main/java/dev/amronos/createaddoncompatibility/platform/FabricPlatformHelper.java b/fabric/src/main/java/dev/amronos/createaddoncompatibility/platform/FabricPlatformHelper.java new file mode 100644 index 0000000..1a3371f --- /dev/null +++ b/fabric/src/main/java/dev/amronos/createaddoncompatibility/platform/FabricPlatformHelper.java @@ -0,0 +1,24 @@ +package com.example.examplemod.platform; + +import com.example.examplemod.platform.services.IPlatformHelper; +import net.fabricmc.loader.api.FabricLoader; + +public class FabricPlatformHelper implements IPlatformHelper { + + @Override + public String getPlatformName() { + return "Fabric"; + } + + @Override + public boolean isModLoaded(String modId) { + + return FabricLoader.getInstance().isModLoaded(modId); + } + + @Override + public boolean isDevelopmentEnvironment() { + + return FabricLoader.getInstance().isDevelopmentEnvironment(); + } +} diff --git a/fabric/src/main/resources/META-INF/services/dev.amronos.createaddoncompatibility.platform.services.IPlatformHelper b/fabric/src/main/resources/META-INF/services/dev.amronos.createaddoncompatibility.platform.services.IPlatformHelper new file mode 100644 index 0000000..29d9205 --- /dev/null +++ b/fabric/src/main/resources/META-INF/services/dev.amronos.createaddoncompatibility.platform.services.IPlatformHelper @@ -0,0 +1 @@ +dev.amronos.createaddoncompatibility.platform.FabricPlatformHelper diff --git a/fabric/src/main/resources/createaddoncompatibility.fabric.mixins.json b/fabric/src/main/resources/createaddoncompatibility.fabric.mixins.json new file mode 100644 index 0000000..8c19947 --- /dev/null +++ b/fabric/src/main/resources/createaddoncompatibility.fabric.mixins.json @@ -0,0 +1,16 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "dev.amronos.createaddoncompatibility.mixin", + "refmap": "${mod_id}.refmap.json", + "compatibilityLevel": "JAVA_21", + "mixins": [], + "client": [ + "MixinTitleScreen" + ], + "server": [], + "injectors": { + "defaultRequire": 1 + } +} + diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json new file mode 100644 index 0000000..f80ea75 --- /dev/null +++ b/fabric/src/main/resources/fabric.mod.json @@ -0,0 +1,36 @@ +{ + "schemaVersion": 1, + "id": "${mod_id}", + "version": "${version}", + "name": "${mod_name}", + "description": "${description}", + "authors": [ + "${mod_author}" + ], + "contact": { + "homepage": "https://fabricmc.net/", + "sources": "https://github.com/FabricMC/fabric-example-mod" + }, + "license": "${license}", + "icon": "${mod_id}.png", + "environment": "*", + "entrypoints": { + "main": [ + "dev.amronos.createaddoncompatibility.CreateAddonCompatibility" + ] + }, + "mixins": [ + "${mod_id}.mixins.json", + "${mod_id}.fabric.mixins.json" + ], + "depends": { + "fabricloader": ">=${fabric_loader_version}", + "fabric-api": "*", + "minecraft": "${minecraft_version}", + "java": ">=${java_version}" + }, + "suggests": { + "another-mod": "*" + } +} + diff --git a/gradle.properties b/gradle.properties index 1b60634..75cbd7d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,37 +1,42 @@ -# 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 -org.gradle.daemon=false - - -minecraft_version=1.20.1 -minecraft_version_range=[1.20.1] -forge_version=47.1.47 -forge_version_range=[47,) -loader_version_range=[47,) - - -mapping_channel=parchment -mapping_version=2023.09.03-1.20.1 - +# Important Notes: +# Every field you add must be added to the root build.gradle expandProps map. -mod_id=createaddoncompatibility -mod_group_id=com.amronos.createaddoncompatibility - -mod_version=0.2.4 +# Project +version=0.2.4 +group=dev.amronos.createaddoncompatibility +java_version=21 -mod_license=GNU Lesser General Public License v3.0 +# Common +minecraft_version=1.21.1 mod_name=Create: Addon Compatibility -mod_authors=Amronos -mod_description=Adds compatibility for and between different create addons. - - -create_version = 6.0.3-71 -create_version_range = [6.0.3,) -ponder_version = 1.0.51 -flywheel_version = 1.0.1 -registrate_version = MC1.20-1.3.3 -jei_version=15.20.0.106 -almostunified_version=1.20.1-0.9.3 -createdieselgenerators_version = 1.20.1-1.3.1 -tfmg_version = 0.9.3-1.20.1 +mod_author=Amronos +mod_id=createaddoncompatibility +license=GNU Lesser General Public License v3.0 +credits= +description=Adds compatibility for and between different create addons. +minecraft_version_range=[1.21.1] +## This is the version of minecraft that the 'common' project uses, you can find a list of all versions here +## https://projects.neoforged.net/neoforged/neoform +neo_form_version=1.21.1-20240808.144430 +# The version of ParchmentMC that is used, see https://parchmentmc.org/docs/getting-started#choose-a-version for new versions +parchment_minecraft=1.21.1 +parchment_version=2024.11.17 + +# Fabric +fabric_version=0.116.5+1.21.1 +fabric_loader_version=0.17.2 + +# NeoForge +neoforge_version=21.1.203 +neoforge_loader_version_range=[4,) + +# Dependencies +create_version=6.0.6-98 +ponder_version=1.0.59 +flywheel_version=1.0.4 +registrate_version=MC1.21-1.3.0+62 +almostunified_version=1.21.1-1.3.0 + +# Gradle +org.gradle.jvmargs=-Xmx3G +org.gradle.daemon=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index c1962a7..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 20db9ad..ff23a68 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 index aeb74cb..f5feea6 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -83,7 +85,9 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -130,10 +134,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -141,7 +148,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -149,7 +156,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -198,11 +205,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 93e3f59..9d21a21 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/neoforge/build.gradle b/neoforge/build.gradle new file mode 100644 index 0000000..03ce602 --- /dev/null +++ b/neoforge/build.gradle @@ -0,0 +1,49 @@ +plugins { + id 'multiloader-loader' + id 'net.neoforged.moddev' +} + +neoForge { + version = neoforge_version + // Automatically enable neoforge AccessTransformers if the file exists + def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg') + if (at.exists()) { + accessTransformers.from(at.absolutePath) + } + parchment { + minecraftVersion = parchment_minecraft + mappingsVersion = parchment_version + } + runs { + configureEach { + systemProperty('neoforge.enabledGameTestNamespaces', mod_id) + ideName = "NeoForge ${it.name.capitalize()} (${project.path})" // Unify the run config names with fabric + } + client { + client() + } + data { + data() + programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath() + } + server { + server() + } + } + mods { + "${mod_id}" { + sourceSet sourceSets.main + } + } +} + +dependencies { + implementation("com.simibubi.create:create-${minecraft_version}:${create_version}:slim") { transitive = false } + implementation("net.createmod.ponder:Ponder-NeoForge-${minecraft_version}:${ponder_version}") + compileOnly("dev.engine-room.flywheel:flywheel-neoforge-api-${minecraft_version}:${flywheel_version}") + runtimeOnly("dev.engine-room.flywheel:flywheel-neoforge-${minecraft_version}:${flywheel_version}") + implementation("com.tterrag.registrate:Registrate:${registrate_version}") + implementation("com.almostreliable.mods:almostunified-neoforge:${almostunified_version}") +} + +sourceSets.main.resources { srcDir 'src/generated/resources' } diff --git a/neoforge/src/generated/resources/data/c/tags/fluid/crude_oil.json b/neoforge/src/generated/resources/data/c/tags/fluid/crude_oil.json new file mode 100644 index 0000000..118d63c --- /dev/null +++ b/neoforge/src/generated/resources/data/c/tags/fluid/crude_oil.json @@ -0,0 +1,8 @@ +{ + "values": [ + { + "id": "pneumaticcraft:flowing_oil", + "required": false + } + ] +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/c/tags/fluid/lubricant.json b/neoforge/src/generated/resources/data/c/tags/fluid/lubricant.json new file mode 100644 index 0000000..bba6835 --- /dev/null +++ b/neoforge/src/generated/resources/data/c/tags/fluid/lubricant.json @@ -0,0 +1,8 @@ +{ + "values": [ + { + "id": "#c:lubrication_oil", + "required": false + } + ] +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/c/tags/fluid/lubrication_oil.json b/neoforge/src/generated/resources/data/c/tags/fluid/lubrication_oil.json new file mode 100644 index 0000000..a1a79be --- /dev/null +++ b/neoforge/src/generated/resources/data/c/tags/fluid/lubrication_oil.json @@ -0,0 +1,8 @@ +{ + "values": [ + { + "id": "#c:lubricant", + "required": false + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/fluids/liquid_plastic.json b/neoforge/src/generated/resources/data/c/tags/fluid/plastic.json similarity index 100% rename from src/generated/resources/data/forge/tags/fluids/liquid_plastic.json rename to neoforge/src/generated/resources/data/c/tags/fluid/plastic.json diff --git a/src/generated/resources/data/forge/tags/items/ingots/plastic.json b/neoforge/src/generated/resources/data/c/tags/item/ingots/plastic.json similarity index 100% rename from src/generated/resources/data/forge/tags/items/ingots/plastic.json rename to neoforge/src/generated/resources/data/c/tags/item/ingots/plastic.json diff --git a/src/generated/resources/data/copycats/tags/items/copycat_block.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_block.json similarity index 100% rename from src/generated/resources/data/copycats/tags/items/copycat_block.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_block.json diff --git a/src/generated/resources/data/copycats/tags/items/copycat_box.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_box.json similarity index 100% rename from src/generated/resources/data/copycats/tags/items/copycat_box.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_box.json diff --git a/src/generated/resources/data/copycats/tags/items/copycat_catwalk.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_catwalk.json similarity index 100% rename from src/generated/resources/data/copycats/tags/items/copycat_catwalk.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_catwalk.json diff --git a/src/generated/resources/data/copycats/tags/items/copycat_slab.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_slab.json similarity index 100% rename from src/generated/resources/data/copycats/tags/items/copycat_slab.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_slab.json diff --git a/src/generated/resources/data/copycats/tags/items/copycat_stairs.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_stairs.json similarity index 100% rename from src/generated/resources/data/copycats/tags/items/copycat_stairs.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_stairs.json diff --git a/neoforge/src/main/java/dev/amronos/createaddoncompatibility/CreateAddonCompatibility.java b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/CreateAddonCompatibility.java new file mode 100644 index 0000000..97cb9b8 --- /dev/null +++ b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/CreateAddonCompatibility.java @@ -0,0 +1,15 @@ +package dev.amronos.createaddoncompatibility; + + +import dev.amronos.createaddoncompatibility.data.datagen.ModDataGenerator; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.common.Mod; + +@Mod(Constants.MOD_ID) +public class CreateAddonCompatibility { + + public CreateAddonCompatibility(IEventBus eventBus) { + CommonClass.init(); + eventBus.register(ModDataGenerator.class); + } +} diff --git a/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModBlockTagsProvider.java b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModBlockTagsProvider.java new file mode 100644 index 0000000..2c6dc1c --- /dev/null +++ b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModBlockTagsProvider.java @@ -0,0 +1,19 @@ +package dev.amronos.createaddoncompatibility.data.datagen; + +import dev.amronos.createaddoncompatibility.Constants; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.PackOutput; +import net.neoforged.neoforge.common.data.BlockTagsProvider; +import net.neoforged.neoforge.common.data.ExistingFileHelper; +import org.jetbrains.annotations.Nullable; + +import java.util.concurrent.CompletableFuture; + +public class ModBlockTagsProvider extends BlockTagsProvider { + public ModBlockTagsProvider(PackOutput output, CompletableFuture lookupProvider, @Nullable ExistingFileHelper existingFileHelper) { + super(output, lookupProvider, Constants.MOD_ID, existingFileHelper); + } + + @Override + protected void addTags(HolderLookup.Provider provider) {} +} diff --git a/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModDataGenerator.java b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModDataGenerator.java new file mode 100644 index 0000000..2944906 --- /dev/null +++ b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModDataGenerator.java @@ -0,0 +1,24 @@ +package dev.amronos.createaddoncompatibility.data.datagen; + +import net.minecraft.core.HolderLookup; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.PackOutput; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.common.data.ExistingFileHelper; +import net.neoforged.neoforge.data.event.GatherDataEvent; + +import java.util.concurrent.CompletableFuture; + +public class ModDataGenerator { + @SubscribeEvent + public static void gatherData(GatherDataEvent event) { + DataGenerator generator = event.getGenerator(); + PackOutput output = generator.getPackOutput(); + CompletableFuture lookupProvider = event.getLookupProvider(); + ExistingFileHelper existingFileHelper = event.getExistingFileHelper(); + + ModBlockTagsProvider blockTagsProvider = generator.addProvider(event.includeServer(), new ModBlockTagsProvider(output, lookupProvider, existingFileHelper)); + generator.addProvider(event.includeServer(), new ModFluidTagsProvider(output, lookupProvider, existingFileHelper)); + generator.addProvider(event.includeServer(), new ModItemTagsProvider(output, lookupProvider, blockTagsProvider.contentsGetter(), existingFileHelper)); + } +} diff --git a/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModFluidTagsProvider.java b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModFluidTagsProvider.java new file mode 100644 index 0000000..cc61369 --- /dev/null +++ b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModFluidTagsProvider.java @@ -0,0 +1,38 @@ +package dev.amronos.createaddoncompatibility.data.datagen; + +import dev.amronos.createaddoncompatibility.Constants; +import dev.amronos.createaddoncompatibility.data.tags.CommonTags; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.PackOutput; +import net.minecraft.data.tags.FluidTagsProvider; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.common.data.ExistingFileHelper; +import org.jetbrains.annotations.Nullable; + +import java.util.concurrent.CompletableFuture; + +public class ModFluidTagsProvider extends FluidTagsProvider { + + public ModFluidTagsProvider(PackOutput output, CompletableFuture provider, @Nullable ExistingFileHelper existingFileHelper) { + super(output, provider, Constants.MOD_ID, existingFileHelper); + } + + @Override + protected void addTags(HolderLookup.Provider lookupProvider) { + tag(CommonTags.Fluids.CRUDE_OIL) + .addOptional(ResourceLocation.fromNamespaceAndPath("pneumaticcraft", "flowing_oil")) + ; + tag(CommonTags.Fluids.PLASTIC) + .addOptional(ResourceLocation.fromNamespaceAndPath("pneumaticcraft", "plastic")) + .addOptional(ResourceLocation.fromNamespaceAndPath("pneumaticcraft", "flowing_plastic")) + .addOptional(ResourceLocation.fromNamespaceAndPath("tfmg", "liquid_plastic")) + .addOptional(ResourceLocation.fromNamespaceAndPath("tfmg", "flowing_liquid_plastic")) + ; + tag(CommonTags.Fluids.LUBRICANT) + .addOptionalTag(ResourceLocation.fromNamespaceAndPath("c", "lubrication_oil")) + ; + tag(CommonTags.Fluids.LUBRICATION_OIL) + .addOptionalTag(ResourceLocation.fromNamespaceAndPath("c", "lubricant")) + ; + } +} diff --git a/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModItemTagsProvider.java b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModItemTagsProvider.java new file mode 100644 index 0000000..9df359c --- /dev/null +++ b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/data/datagen/ModItemTagsProvider.java @@ -0,0 +1,45 @@ +package dev.amronos.createaddoncompatibility.data.datagen; + +import dev.amronos.createaddoncompatibility.Constants; +import dev.amronos.createaddoncompatibility.data.tags.CommonTags; +import dev.amronos.createaddoncompatibility.data.tags.CopycatsTags; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.PackOutput; +import net.minecraft.data.tags.ItemTagsProvider; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.neoforged.neoforge.common.data.ExistingFileHelper; +import org.jetbrains.annotations.Nullable; + +import java.util.concurrent.CompletableFuture; + +public class ModItemTagsProvider extends ItemTagsProvider { + public ModItemTagsProvider(PackOutput output, CompletableFuture lookupProvider, CompletableFuture> blockTags, @Nullable ExistingFileHelper existingFileHelper) { + super(output, lookupProvider, blockTags, Constants.MOD_ID, existingFileHelper); + } + + @Override + protected void addTags(HolderLookup.Provider provider) { + this.tag(CommonTags.Items.PLASTIC) + .addOptional(ResourceLocation.fromNamespaceAndPath("pneumaticcraft", "plastic")) + ; + + this.tag(CopycatsTags.Items.COPYCAT_BLOCK) + .addOptional(ResourceLocation.fromNamespaceAndPath("create_dd", "copycat_block")) + ; + this.tag(CopycatsTags.Items.COPYCAT_BOX) + .addOptional(ResourceLocation.fromNamespaceAndPath("create_connected", "copycat_box")) + ; + this.tag(CopycatsTags.Items.COPYCAT_CATWALK) + .addOptional(ResourceLocation.fromNamespaceAndPath("create_connected", "copycat_catwalk")) + ; + this.tag(CopycatsTags.Items.COPYCAT_SLAB) + .addOptional(ResourceLocation.fromNamespaceAndPath("create_dd", "copycat_slab")) + ; + this.tag(CopycatsTags.Items.COPYCAT_STAIRS) + .replace(true) + .addOptional(ResourceLocation.fromNamespaceAndPath("copycats", "copycat_stairs")) + .addOptional(ResourceLocation.fromNamespaceAndPath("create_connected", "copycat_stairs")) + ; + } +} diff --git a/neoforge/src/main/java/dev/amronos/createaddoncompatibility/platform/NeoForgePlatformHelper.java b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/platform/NeoForgePlatformHelper.java new file mode 100644 index 0000000..d85fd11 --- /dev/null +++ b/neoforge/src/main/java/dev/amronos/createaddoncompatibility/platform/NeoForgePlatformHelper.java @@ -0,0 +1,26 @@ +package dev.amronos.createaddoncompatibility.platform; + +import dev.amronos.createaddoncompatibility.platform.services.IPlatformHelper; +import net.neoforged.fml.ModList; +import net.neoforged.fml.loading.FMLLoader; + +public class NeoForgePlatformHelper implements IPlatformHelper { + + @Override + public String getPlatformName() { + + return "NeoForge"; + } + + @Override + public boolean isModLoaded(String modId) { + + return ModList.get().isLoaded(modId); + } + + @Override + public boolean isDevelopmentEnvironment() { + + return !FMLLoader.isProduction(); + } +} diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml new file mode 100644 index 0000000..3a27deb --- /dev/null +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -0,0 +1,50 @@ +modLoader = "javafml" +loaderVersion = "${neoforge_loader_version_range}" +license = "${license}" +issueTrackerURL="https://github.com/Amronos/${mod_id}/issues/" + +[[mods]] +modId = "${mod_id}" +version = "${version}" +displayName = "${mod_name}" +updateJSONURL="https://api.modrinth.com/updates/QgrK9rtJ/forge_updates.json" +displayURL="https://modrinth.com/mod/${mod_id}" +logoFile="logo.png" +credits="${credits}" +authors = "${mod_author}" +description = '''${description}''' + +[[mixins]] +config = "${mod_id}.mixins.json" +[[mixins]] +config = "${mod_id}.neoforge.mixins.json" + +[[dependencies.${mod_id}]] +modId = "neoforge" +type="required" +versionRange = "[${neoforge_version},)" +ordering = "NONE" +side = "BOTH" + +[[dependencies.${mod_id}]] +modId = "minecraft" +type="required" +versionRange = "${minecraft_version_range}" +ordering = "NONE" +side = "BOTH" + +[[dependencies.${mod_id}]] +modId="almostunified" +mandatory=true +versionRange="[${almostunified_version},)" +ordering="AFTER" +side="SERVER" +referralUrl="https://modrinth.com/mod/almost-unified" + +[[dependencies.${mod_id}]] +modId="create" +mandatory=true +versionRange="[6.0.6,6.1.0)" +ordering="AFTER" +side="BOTH" +referralUrl="https://modrinth.com/mod/create" diff --git a/neoforge/src/main/resources/META-INF/services/dev.amronos.createaddoncompatibility.platform.services.IPlatformHelper b/neoforge/src/main/resources/META-INF/services/dev.amronos.createaddoncompatibility.platform.services.IPlatformHelper new file mode 100644 index 0000000..133c1aa --- /dev/null +++ b/neoforge/src/main/resources/META-INF/services/dev.amronos.createaddoncompatibility.platform.services.IPlatformHelper @@ -0,0 +1 @@ +dev.amronos.createaddoncompatibility.platform.NeoForgePlatformHelper diff --git a/neoforge/src/main/resources/createaddoncompatibility.neoforge.mixins.json b/neoforge/src/main/resources/createaddoncompatibility.neoforge.mixins.json new file mode 100644 index 0000000..8d3fdab --- /dev/null +++ b/neoforge/src/main/resources/createaddoncompatibility.neoforge.mixins.json @@ -0,0 +1,14 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "dev.amronos.createaddoncompatibility.mixin", + "compatibilityLevel": "JAVA_21", + "mixins": [ + "MixinUnifySerializer" + ], + "client": [], + "server": [], + "injectors": { + "defaultRequire": 1 + } +} diff --git a/settings.gradle b/settings.gradle index 0a02867..77067c8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,15 +1,39 @@ pluginManagement { repositories { gradlePluginPortal() - maven { - name = 'MinecraftForge' - url = 'https://maven.minecraftforge.net/' + mavenCentral() + exclusiveContent { + forRepository { + maven { + name = 'Fabric' + url = uri('https://maven.fabricmc.net') + } + } + filter { + includeGroup('net.fabricmc') + includeGroup('fabric-loom') + } + } + exclusiveContent { + forRepository { + maven { + name = 'Sponge' + url = uri('https://repo.spongepowered.org/repository/maven-public') + } + } + filter { + includeGroupAndSubgroups("org.spongepowered") + } } - maven { url = 'https://maven.parchmentmc.org' } - maven { url = 'https://repo.spongepowered.org/repository/maven-public/'} } } plugins { - id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' } + +// This should match the folder name of the project, or else IDEA may complain (see https://youtrack.jetbrains.com/issue/IDEA-317606) +rootProject.name = 'createaddoncompatibility' +include('common') +// include('fabric') +include('neoforge') diff --git a/src/generated/resources/data/createaddoncompatibility/tags/items/six_way_gearbox.json b/src/generated/resources/data/createaddoncompatibility/tags/items/six_way_gearbox.json deleted file mode 100644 index e5b336b..0000000 --- a/src/generated/resources/data/createaddoncompatibility/tags/items/six_way_gearbox.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "values": [ - { - "id": "create_connected:six_way_gearbox", - "required": false - }, - { - "id": "createutilities:gearcube", - "required": false - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/fluids/crude_oil.json b/src/generated/resources/data/forge/tags/fluids/crude_oil.json deleted file mode 100644 index 0676d47..0000000 --- a/src/generated/resources/data/forge/tags/fluids/crude_oil.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "values": [ - { - "id": "ad_astra:oil", - "required": false - }, - { - "id": "ad_astra:flowing_oil", - "required": false - }, - { - "id": "pneumaticcraft:oil", - "required": false - }, - { - "id": "pneumaticcraft:flowing_oil", - "required": false - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/fluids/lubricant.json b/src/generated/resources/data/forge/tags/fluids/lubricant.json deleted file mode 100644 index 52a710b..0000000 --- a/src/generated/resources/data/forge/tags/fluids/lubricant.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "values": [ - { - "id": "tfmg:lubrication_oil", - "required": false - }, - { - "id": "tfmg:flowing_lubrication_oil", - "required": false - } - ] -} \ No newline at end of file diff --git a/src/main/java/com/amronos/createaddoncompatibility/CreateAddonCompatibility.java b/src/main/java/com/amronos/createaddoncompatibility/CreateAddonCompatibility.java deleted file mode 100644 index 9fb37a2..0000000 --- a/src/main/java/com/amronos/createaddoncompatibility/CreateAddonCompatibility.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.amronos.createaddoncompatibility; - -import com.mojang.logging.LogUtils; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.AddPackFindersEvent; -import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import org.slf4j.Logger; -import com.amronos.createaddoncompatibility.registry.ModDatapacks; - -@Mod(CreateAddonCompatibility.MOD_ID) -public class CreateAddonCompatibility { - public static final String MOD_ID = "createaddoncompatibility"; - public static final Logger LOGGER = LogUtils.getLogger(); - - public CreateAddonCompatibility() { - IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); - MinecraftForge.EVENT_BUS.register(this); - - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::callRegisterModDatapacks); - } - - public void callRegisterModDatapacks(final AddPackFindersEvent event) { - ModDatapacks.registerModDatapacks(event); - } -} diff --git a/src/main/java/com/amronos/createaddoncompatibility/data/datagen/DataGenerators.java b/src/main/java/com/amronos/createaddoncompatibility/data/datagen/DataGenerators.java deleted file mode 100644 index c2260ae..0000000 --- a/src/main/java/com/amronos/createaddoncompatibility/data/datagen/DataGenerators.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.amronos.createaddoncompatibility.data.datagen; - -import com.amronos.createaddoncompatibility.CreateAddonCompatibility; -import net.minecraft.core.HolderLookup; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.PackOutput; -import net.minecraftforge.common.data.ExistingFileHelper; -import net.minecraftforge.data.event.GatherDataEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; - -import java.util.concurrent.CompletableFuture; - -@Mod.EventBusSubscriber(modid = CreateAddonCompatibility.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) -public class DataGenerators { - @SubscribeEvent - public static void gatherData(GatherDataEvent event){ - DataGenerator generator = event.getGenerator(); - PackOutput packOutput = generator.getPackOutput(); - CompletableFuture lookupProvider = event.getLookupProvider(); - ExistingFileHelper existingFileHelper = event.getExistingFileHelper(); - - ModBlockTagGenerator blockTagGenerator = - generator.addProvider(event.includeServer(), new ModBlockTagGenerator(packOutput, lookupProvider, existingFileHelper)); - generator.addProvider(event.includeServer(), new ModFluidTagGenerator(packOutput, lookupProvider, existingFileHelper)); - generator.addProvider(event.includeServer(), new ModItemTagGenerator(packOutput, lookupProvider, blockTagGenerator.contentsGetter(), existingFileHelper)); - } -} diff --git a/src/main/java/com/amronos/createaddoncompatibility/data/datagen/ModBlockTagGenerator.java b/src/main/java/com/amronos/createaddoncompatibility/data/datagen/ModBlockTagGenerator.java deleted file mode 100644 index d4b2ad9..0000000 --- a/src/main/java/com/amronos/createaddoncompatibility/data/datagen/ModBlockTagGenerator.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.amronos.createaddoncompatibility.data.datagen; - -import com.amronos.createaddoncompatibility.CreateAddonCompatibility; -import net.minecraft.core.HolderLookup; -import net.minecraft.data.PackOutput; -import net.minecraftforge.common.data.BlockTagsProvider; -import net.minecraftforge.common.data.ExistingFileHelper; -import org.jetbrains.annotations.Nullable; - -import java.util.concurrent.CompletableFuture; - -public class ModBlockTagGenerator extends BlockTagsProvider { - - public ModBlockTagGenerator(PackOutput output, CompletableFuture lookupProvider, @Nullable ExistingFileHelper existingFileHelper) { - super(output, lookupProvider, CreateAddonCompatibility.MOD_ID, existingFileHelper); - } - - @Override - protected void addTags(HolderLookup.Provider provider) { - - } -} diff --git a/src/main/java/com/amronos/createaddoncompatibility/data/datagen/ModFluidTagGenerator.java b/src/main/java/com/amronos/createaddoncompatibility/data/datagen/ModFluidTagGenerator.java deleted file mode 100644 index 94df197..0000000 --- a/src/main/java/com/amronos/createaddoncompatibility/data/datagen/ModFluidTagGenerator.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.amronos.createaddoncompatibility.data.datagen; - -import com.amronos.createaddoncompatibility.CreateAddonCompatibility; -import com.amronos.createaddoncompatibility.data.tags.ForgeTags; -import net.minecraft.core.HolderLookup; -import net.minecraft.data.PackOutput; -import net.minecraft.data.tags.FluidTagsProvider; -import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.common.data.ExistingFileHelper; -import org.jetbrains.annotations.Nullable; - -import java.util.concurrent.CompletableFuture; - - -public class ModFluidTagGenerator extends FluidTagsProvider { - public ModFluidTagGenerator(PackOutput p_255941_, CompletableFuture p_256600_, @Nullable ExistingFileHelper existingFileHelper) { - super(p_255941_, p_256600_, CreateAddonCompatibility.MOD_ID, existingFileHelper); - } - - @Override - protected void addTags(HolderLookup.Provider pProvider) { - this.tag(ForgeTags.Fluids.CRUDE_OIL) - .addOptional(new ResourceLocation("ad_astra", "oil")) - .addOptional(new ResourceLocation("ad_astra", "flowing_oil")) - .addOptional(new ResourceLocation("pneumaticcraft", "oil")) - .addOptional(new ResourceLocation("pneumaticcraft", "flowing_oil")) - ; - this.tag(ForgeTags.Fluids.LIQUID_PLASTIC) - .addOptional(new ResourceLocation("pneumaticcraft", "plastic")) - .addOptional(new ResourceLocation("pneumaticcraft", "flowing_plastic")) - .addOptional(new ResourceLocation("tfmg", "liquid_plastic")) - .addOptional(new ResourceLocation("tfmg", "flowing_liquid_plastic")) - ; - this.tag(ForgeTags.Fluids.LUBRICANT) - .addOptional(new ResourceLocation("tfmg", "lubrication_oil")) - .addOptional(new ResourceLocation("tfmg", "flowing_lubrication_oil")) - ; - } -} diff --git a/src/main/java/com/amronos/createaddoncompatibility/data/datagen/ModItemTagGenerator.java b/src/main/java/com/amronos/createaddoncompatibility/data/datagen/ModItemTagGenerator.java deleted file mode 100644 index b5c4487..0000000 --- a/src/main/java/com/amronos/createaddoncompatibility/data/datagen/ModItemTagGenerator.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.amronos.createaddoncompatibility.data.datagen; - -import com.amronos.createaddoncompatibility.CreateAddonCompatibility; -import com.amronos.createaddoncompatibility.data.tags.CopycatsTags; -import com.amronos.createaddoncompatibility.data.tags.CreateAddonCompatibilityTags; -import com.amronos.createaddoncompatibility.data.tags.ForgeTags; -import net.minecraft.core.HolderLookup; -import net.minecraft.data.PackOutput; -import net.minecraft.data.tags.ItemTagsProvider; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.level.block.Block; -import net.minecraftforge.common.data.ExistingFileHelper; -import org.jetbrains.annotations.Nullable; - -import java.util.concurrent.CompletableFuture; - -public class ModItemTagGenerator extends ItemTagsProvider { - public ModItemTagGenerator(PackOutput p_275343_, CompletableFuture p_275729_, CompletableFuture> p_275322_, @Nullable ExistingFileHelper existingFileHelper) { - super(p_275343_, p_275729_, p_275322_, CreateAddonCompatibility.MOD_ID, existingFileHelper); - } - - @Override - protected void addTags(HolderLookup.Provider provider) { - this.tag(ForgeTags.Items.PLASTIC) - .addOptional(new ResourceLocation("pneumaticcraft", "plastic")) - ; - - - this.tag(CreateAddonCompatibilityTags.Items.SIX_WAY_GEARBOX) - .addOptional(new ResourceLocation("create_connected", "six_way_gearbox")) - .addOptional(new ResourceLocation("createutilities", "gearcube")) - ; - - this.tag(CopycatsTags.Items.COPYCAT_BLOCK) - .addOptional(new ResourceLocation("create_dd", "copycat_block")) - ; - this.tag(CopycatsTags.Items.COPYCAT_BOX) - .addOptional(new ResourceLocation("create_connected", "copycat_box")) - ; - this.tag(CopycatsTags.Items.COPYCAT_CATWALK) - .addOptional(new ResourceLocation("create_connected", "copycat_catwalk")) - ; - this.tag(CopycatsTags.Items.COPYCAT_SLAB) - .addOptional(new ResourceLocation("create_dd", "copycat_slab")) - ; - this.tag(CopycatsTags.Items.COPYCAT_STAIRS) - .replace(true) - .addOptional(new ResourceLocation("copycats", "copycat_stairs")) - .addOptional(new ResourceLocation("create_connected", "copycat_stairs")) - ; - } -} diff --git a/src/main/java/com/amronos/createaddoncompatibility/data/tags/CreateAddonCompatibilityTags.java b/src/main/java/com/amronos/createaddoncompatibility/data/tags/CreateAddonCompatibilityTags.java deleted file mode 100644 index 8a48cbc..0000000 --- a/src/main/java/com/amronos/createaddoncompatibility/data/tags/CreateAddonCompatibilityTags.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.amronos.createaddoncompatibility.data.tags; - -import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.FluidTags; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.TagKey; -import net.minecraft.world.item.Item; -import net.minecraft.world.level.material.Fluid; - -public class CreateAddonCompatibilityTags { - public static class Items { - public static final TagKey SIX_WAY_GEARBOX = tag("six_way_gearbox"); - - private static TagKey tag(String name) { - return ItemTags.create(new ResourceLocation("createaddoncompatibility", name)); - } - } -} diff --git a/src/main/java/com/amronos/createaddoncompatibility/mixin/MixinBlastFurnaceOutputBlockEntity.java b/src/main/java/com/amronos/createaddoncompatibility/mixin/MixinBlastFurnaceOutputBlockEntity.java deleted file mode 100644 index edae042..0000000 --- a/src/main/java/com/amronos/createaddoncompatibility/mixin/MixinBlastFurnaceOutputBlockEntity.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.amronos.createaddoncompatibility.mixin; - -import com.amronos.createaddoncompatibility.data.tags.ForgeTags; -import com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace.BlastFurnaceOutputBlockEntity; -import com.drmangotea.tfmg.registry.TFMGItems; -import com.simibubi.create.foundation.item.SmartInventory; -import net.minecraft.world.entity.item.ItemEntity; -import net.minecraft.world.item.ItemStack; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Pseudo; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -import java.util.List; - -@Pseudo -@Mixin(BlastFurnaceOutputBlockEntity.class) -public class MixinBlastFurnaceOutputBlockEntity { - @Shadow - public SmartInventory fuelInventory; - @Shadow - public SmartInventory inputInventory; - - @Unique - public SmartInventory createaddoncompatibility$previousFuelInventory; - @Unique - public SmartInventory createaddoncompatibility$previousInputInventory; - - @Inject(remap = false, method = "acceptInsertedItems", at = @At(value = "HEAD")) - private void savePreviousInventory(CallbackInfo info){ - createaddoncompatibility$previousFuelInventory = fuelInventory; - createaddoncompatibility$previousInputInventory = inputInventory; - } - - @Inject(remap = false, method = "acceptInsertedItems", at = @At(value = "TAIL"), locals = LocalCapture.CAPTURE_FAILSOFT) - private void acceptInsertedItems(CallbackInfo info, List itemsToPick) { - fuelInventory = createaddoncompatibility$previousFuelInventory; - inputInventory = createaddoncompatibility$previousInputInventory; - for (ItemEntity itemEntity : itemsToPick) { - ItemStack itemStack = itemEntity.getItem(); - int count; - int freeSpace2; - if (itemStack.is(ForgeTags.Items.COKE_DUST)) { - freeSpace2 = this.fuelInventory.getStackInSlot(0).getMaxStackSize() - this.fuelInventory.getStackInSlot(0).getCount(); - count = itemStack.getCount(); - if (count > freeSpace2) { - itemStack.setCount(itemStack.getCount() - freeSpace2); - this.fuelInventory.setItem(0, new ItemStack(TFMGItems.COAL_COKE_DUST.get(), this.fuelInventory.getStackInSlot(0).getCount() + freeSpace2)); - } else { - this.fuelInventory.setItem(0, new ItemStack(TFMGItems.COAL_COKE_DUST.get(), this.fuelInventory.getStackInSlot(0).getCount() + itemStack.getCount())); - itemEntity.discard(); - } - } else { - if (itemStack.getCount() == 1) { - itemStack.setCount(2); - itemEntity.setItem(itemStack); - } - - freeSpace2 = this.inputInventory.getStackInSlot(0).getMaxStackSize() - this.inputInventory.getStackInSlot(0).getCount(); - count = itemStack.getCount(); - if (this.inputInventory.isEmpty() || this.inputInventory.getItem(0).is(itemStack.getItem())) { - if (count > freeSpace2) { - itemStack.setCount(itemStack.getCount() - freeSpace2); - this.inputInventory.setItem(0, new ItemStack(itemStack.getItem(), this.inputInventory.getStackInSlot(0).getCount() + freeSpace2)); - } else { - this.inputInventory.setItem(0, new ItemStack(itemStack.getItem(), this.inputInventory.getStackInSlot(0).getCount() + itemStack.getCount())); - itemEntity.discard(); - } - } - } - } - } -} diff --git a/src/main/java/com/amronos/createaddoncompatibility/mixin/MixinUnifyConfig.java b/src/main/java/com/amronos/createaddoncompatibility/mixin/MixinUnifyConfig.java deleted file mode 100644 index 2f3aad1..0000000 --- a/src/main/java/com/amronos/createaddoncompatibility/mixin/MixinUnifyConfig.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.amronos.createaddoncompatibility.mixin; - -import com.almostreliable.unified.config.UnifyConfig; -import com.amronos.createaddoncompatibility.CreateAddonCompatibility; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -@Mixin(UnifyConfig.Serializer.class) -public class MixinUnifyConfig { - - @ModifyVariable(method = "deserialize", at = @At(value = "RETURN"), ordinal = 0, index = 3, name = "modPriorities", remap = false) - private List modPrioritiesMixin(List modPriorities){ - CreateAddonCompatibility.LOGGER.info("Adding modPriorities for AlmostUnified, this will not reflect in unify.json"); - modPriorities = new ArrayList<>(modPriorities); - List cacModPriorities = new ArrayList(); - cacModPriorities.add("pneumaticcraft"); - cacModPriorities.add("copycats"); - cacModPriorities.add("create_connected"); - cacModPriorities.add("createutilities"); - cacModPriorities.add("create_dd"); - cacModPriorities.add("tfmg"); - for (String i : cacModPriorities) { - if (!modPriorities.contains(i)) { - modPriorities.add(i); - } - } - modPriorities = Collections.unmodifiableList(modPriorities); - return modPriorities; - } - - @ModifyVariable(method = "deserialize", at = @At(value = "RETURN"), ordinal = 2, index = 5, name = "tags", remap = false) - private List tagsMixin(List tags){ - CreateAddonCompatibility.LOGGER.info("Adding tags for AlmostUnified, this will not reflect in unify.json"); - tags = new ArrayList<>(tags); - List cacTags = new ArrayList(); - cacTags.add("forge:plastic_sheet"); - cacTags.add("createaddoncompatibility:six_way_gearbox"); - cacTags.add("copycats:copycat_beam"); - cacTags.add("copycats:copycat_block"); - cacTags.add("copycats:copycat_board"); - cacTags.add("copycats:copycat_box"); - cacTags.add("copycats:copycat_catwalk"); - cacTags.add("copycats:copycat_fence"); - cacTags.add("copycats:copycat_fence_gate"); - cacTags.add("copycats:copycat_slab"); - cacTags.add("copycats:copycat_stairs"); - cacTags.add("copycats:copycat_vertical_step"); - cacTags.add("copycats:copycat_wall"); - for (String i : cacTags) { - if (!tags.contains(i)) { - tags.add(i); - } - } - tags = Collections.unmodifiableList(tags); - return tags; - } -} diff --git a/src/main/java/com/amronos/createaddoncompatibility/registry/ModDatapacks.java b/src/main/java/com/amronos/createaddoncompatibility/registry/ModDatapacks.java deleted file mode 100644 index f53b1e0..0000000 --- a/src/main/java/com/amronos/createaddoncompatibility/registry/ModDatapacks.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.amronos.createaddoncompatibility.registry; - -import com.amronos.createaddoncompatibility.CreateAddonCompatibility; -import net.minecraft.ChatFormatting; -import net.minecraft.network.chat.Component; -import net.minecraft.server.packs.PackType; -import net.minecraft.server.packs.PathPackResources; -import net.minecraft.server.packs.repository.Pack; -import net.minecraft.server.packs.repository.PackSource; -import net.minecraftforge.event.AddPackFindersEvent; -import net.minecraftforge.fml.ModList; - -import java.nio.file.Path; - -public class ModDatapacks { - public static void registerModDatapacks(final AddPackFindersEvent event) { - if (ModList.get().isLoaded("ad_astra")) { - registerModDatapacks(event, "rockets_use_adastra_fuels_only"); - } - } - - private static void registerModDatapacks(final AddPackFindersEvent event, String name) { - if (event.getPackType() == PackType.SERVER_DATA) { - Path path = ModList.get().getModFileById(CreateAddonCompatibility.MOD_ID).getFile().findResource("datapacks/" + name); - Pack builtinDataPack = Pack.readMetaAndCreate( - CreateAddonCompatibility.MOD_ID + ":" + name, - Component.translatable("datapack." + CreateAddonCompatibility.MOD_ID + "." + name), - false, - (a) -> new PathPackResources(a, path, false), - PackType.SERVER_DATA, - Pack.Position.TOP, - PackSource.create((arg) -> Component.translatable("pack.nameAndSource", arg, Component.translatable("pack.source.builtin")).withStyle(ChatFormatting.GRAY), false) - ); - event.addRepositorySource((packConsumer) -> packConsumer.accept(builtinDataPack)); - } - } -} diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml deleted file mode 100644 index d187d86..0000000 --- a/src/main/resources/META-INF/mods.toml +++ /dev/null @@ -1,152 +0,0 @@ -modLoader="javafml" -loaderVersion= "${loader_version_range}" - -license="GNU Lesser General Public License v3.0" -issueTrackerURL="https://github.com/Amronos/${mod_id}/issues" -showAsResourcePack=false - -[[mods]] -modId="${mod_id}" -version="${mod_version}" -displayName="Create: Addon Compatibility" -updateJSONURL="https://api.modrinth.com/updates/QgrK9rtJ/forge_updates.json" -displayURL="https://modrinth.com/mod/${mod_id}" -logoFile="logo.png" -#credits="" -authors="Amronos" -description="Adds compatibility for and between different create addons." - - -[dependencies] -[[dependencies.${mod_id}]] -modId="minecraft" -mandatory=true -versionRange="${minecraft_version_range}" -ordering="NONE" -side="BOTH" - -[[dependencies.${mod_id}]] -modId="forge" -mandatory=true -versionRange="${forge_version_range}" -ordering="NONE" -side="BOTH" - -[[dependencies.${mod_id}]] -modId="almostunified" -mandatory=true -versionRange="[${almostunified_version},)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/almost-unified" - -[[dependencies.${mod_id}]] -modId="ad_astra" -mandatory=false -versionRange="[1.15.18,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/ad-astra" - -[[dependencies.${mod_id}]] -modId="copycats" -mandatory=false -versionRange="[1.3.8+mc.1.20.1-forge,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/copycats" - -[[dependencies.${mod_id}]] -modId="create" -mandatory=true -versionRange="${create_version_range}" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/create" - -[[dependencies.${mod_id}]] -modId="createaddition" -mandatory=false -versionRange="[1.20.1-1.2.2,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/createaddition" - -[[dependencies.${mod_id}]] -modId="create_connected" -mandatory=false -versionRange="[0.8.2-mc1.20.1,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/create-connected" - -[[dependencies.${mod_id}]] -modId="create_dd" -mandatory=false -versionRange="[0.1a.Release-Early-Dev,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/create-dreams-and-desires" - -[[dependencies.${mod_id}]] -modId="createdieselgenerators" -mandatory=false -versionRange="[${createdieselgenerators_version},)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/create-diesel-generators" - -[[dependencies.${mod_id}]] -modId="createutilities" -mandatory=false -versionRange="[0.3.0,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/create-utilities" - -[[dependencies.${mod_id}]] -modId="destroy" -mandatory=false -versionRange="[0.1.0-snapshot-6,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/destroy" - -[[dependencies.${mod_id}]] -modId="garnished" -mandatory=false -versionRange="[1.8.3,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/create-garnished" - -[[dependencies.${mod_id}]] -modId="jei" -mandatory=false -versionRange="[${jei_version},)" -ordering="AFTER" -side="CLIENT" - -[[dependencies.${mod_id}]] -modId="pneumaticcraft" -mandatory=false -versionRange="[6.0.14,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/pneumaticcraft-repressurized" - -[[dependencies.${mod_id}]] -modId="railways" -mandatory=false -versionRange="[1.6.3,)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/create-steam-n-rails" - -[[dependencies.${mod_id}]] -modId="tfmg" -mandatory=false -versionRange="[${tfmg_version},)" -ordering="AFTER" -side="BOTH" -referralUrl="https://modrinth.com/mod/create-tfmg" diff --git a/src/main/resources/assets/createaddoncompatibility/lang/en_us.json b/src/main/resources/assets/createaddoncompatibility/lang/en_us.json deleted file mode 100644 index 5a98d02..0000000 --- a/src/main/resources/assets/createaddoncompatibility/lang/en_us.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "datapack.createaddoncompatibility.rockets_use_adastra_fuels_only": "Rockets Use Ad Astra Fuels Only", - "datapack.createaddoncompatibility.rockets_use_adastra_fuels_only.description": "Makes Ad Astra rockets use only Ad Astra fuels." -} diff --git a/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/ad_astra-cryo_fuel.json b/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/ad_astra-cryo_fuel.json deleted file mode 100644 index 0bccec6..0000000 --- a/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/ad_astra-cryo_fuel.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "fluid": "ad_astra:cryo_fuel", - "sound_speed": 1, - "normal": { - "speed": 96.0, - "strength": 2048.0, - "burn_rate": 2 - }, - "modular": { - "speed": 96.0, - "strength": 3072.0, - "burn_rate": 2 - }, - "huge": { - "speed": 128.0, - "strength": 4096.0, - "burn_rate": 2 - } -} diff --git a/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/ad_astra-fuel.json b/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/ad_astra-fuel.json deleted file mode 100644 index 40e419f..0000000 --- a/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/ad_astra-fuel.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "fluid": "ad_astra:fuel", - "sound_speed": 1, - "normal": { - "speed": 96.0, - "strength": 2048.0, - "burn_rate": 2 - }, - "modular": { - "speed": 96.0, - "strength": 3072.0, - "burn_rate": 2 - }, - "huge": { - "speed": 128.0, - "strength": 4096.0, - "burn_rate": 2 - } -} diff --git a/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/createaddition-bioethanol.json b/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/createaddition-bioethanol.json deleted file mode 100644 index 0a75127..0000000 --- a/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/createaddition-bioethanol.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "fluid": "createaddition:bioethanol", - "sound_speed": 1, - "normal": { - "speed": 96.0, - "strength": 2048.0, - "burn_rate": 1 - }, - "modular": { - "speed": 96.0, - "strength": 2048.0, - "burn_rate": 1 - }, - "huge": { - "speed": 128.0, - "strength": 8192.0, - "burn_rate": 1 - } -} diff --git a/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/garnished-peanut_oil.json b/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/garnished-peanut_oil.json deleted file mode 100644 index 387429e..0000000 --- a/src/main/resources/data/createaddoncompatibility/diesel_engine_fuel_type/garnished-peanut_oil.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "fluid": "garnished:peanut_oil", - "sound_speed": 1, - "normal": { - "speed": 96.0, - "strength": 2048.0, - "burn_rate": 2 - }, - "modular": { - "speed": 96.0, - "strength": 3072.0, - "burn_rate": 2 - }, - "huge": { - "speed": 128.0, - "strength": 4096.0, - "burn_rate": 2 - } -} diff --git a/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-diesel.json b/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-diesel.json deleted file mode 100644 index 4521846..0000000 --- a/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-diesel.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "fluids": [ - "#forge:diesel" - ], - "fuel_ticks": 550 -} diff --git a/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-ethanol.json b/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-ethanol.json deleted file mode 100644 index 25596a3..0000000 --- a/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-ethanol.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "fluids": [ - "#forge:ethanol" - ], - "fuel_ticks": 250 -} diff --git a/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-gasoline.json b/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-gasoline.json deleted file mode 100644 index 72c6d96..0000000 --- a/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-gasoline.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "fluids": [ - "#forge:gasoline" - ], - "fuel_ticks": 550 -} diff --git a/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-plantoil.json b/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-plantoil.json deleted file mode 100644 index 65ba54d..0000000 --- a/src/main/resources/data/createaddoncompatibility/railways/railways_liquid_fuel/compat-plantoil.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "fluids": [ - "#forge:plantoil" - ], - "fuel_ticks": 250 -} diff --git a/src/main/resources/data/createaddoncompatibility/recipes/pneumaticcraft/thermo_plant/compat-reinforced_pressure_tube.json b/src/main/resources/data/createaddoncompatibility/recipes/pneumaticcraft/thermo_plant/compat-reinforced_pressure_tube.json deleted file mode 100644 index c392fd2..0000000 --- a/src/main/resources/data/createaddoncompatibility/recipes/pneumaticcraft/thermo_plant/compat-reinforced_pressure_tube.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "forge:mod_loaded", - "modid": "pneumaticcraft" - } - ], - "recipe": { - "type": "pneumaticcraft:thermo_plant", - "exothermic": false, - "fluid_input": { - "type": "pneumaticcraft:fluid", - "amount": 50, - "tag": "forge:liquid_plastic" - }, - "item_input": { - "item": "pneumaticcraft:pressure_tube" - }, - "item_output": { - "item": "pneumaticcraft:reinforced_pressure_tube" - }, - "pressure": 1.5 - } - } - ] -} - \ No newline at end of file diff --git a/src/main/resources/data/createaddoncompatibility/recipes/tfmg/distillation/compat-crude_oil.json b/src/main/resources/data/createaddoncompatibility/recipes/tfmg/distillation/compat-crude_oil.json deleted file mode 100644 index bf5402b..0000000 --- a/src/main/resources/data/createaddoncompatibility/recipes/tfmg/distillation/compat-crude_oil.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "type": "tfmg:distillation", - - "ingredients": [ - { - "fluidTag": "forge:crude_oil", - "nbt": {}, - "amount": 180 - } - ], - - "results": [ - { - "fluid": "tfmg:heavy_oil", - "amount": 40 - }, - { - "fluid": "tfmg:diesel", - "amount": 30 - }, - { - "fluid": "tfmg:kerosene", - "amount": 20 - }, - { - "fluid": "tfmg:naphtha", - "amount": 20 - }, - { - "fluid": "tfmg:gasoline", - "amount": 40 - }, - { - "fluid": "tfmg:lpg", - "amount": 30 - } - ] -} diff --git a/src/main/resources/data/createaddoncompatibility/recipes/tfmg/distillation/compat-crude_oil_no_naptha.json b/src/main/resources/data/createaddoncompatibility/recipes/tfmg/distillation/compat-crude_oil_no_naptha.json deleted file mode 100644 index 7f7c11d..0000000 --- a/src/main/resources/data/createaddoncompatibility/recipes/tfmg/distillation/compat-crude_oil_no_naptha.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "tfmg:distillation", - - "ingredients": [ - { - "fluidTag": "forge:crude_oil", - "nbt": {}, - "amount": 340 - } - ], - - "results": [ - { - "fluid": "tfmg:heavy_oil", - "amount": 80 - }, - { - "fluid": "tfmg:diesel", - "amount": 60 - }, - { - "fluid": "tfmg:kerosene", - "amount": 40 - }, - { - "fluid": "tfmg:gasoline", - "amount": 80 - }, - { - "fluid": "tfmg:lpg", - "amount": 60 - } - ] -} diff --git a/src/main/resources/data/createaddoncompatibility/recipes/tfmg/sequenced_assembly/compat-pneumaticcraft-turbine_engine.json b/src/main/resources/data/createaddoncompatibility/recipes/tfmg/sequenced_assembly/compat-pneumaticcraft-turbine_engine.json deleted file mode 100644 index 6f9725c..0000000 --- a/src/main/resources/data/createaddoncompatibility/recipes/tfmg/sequenced_assembly/compat-pneumaticcraft-turbine_engine.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "forge:mod_loaded", - "modid": "pneumaticcraft" - } - ], - "recipe": { - "type": "create:sequenced_assembly", - "ingredient": { - "item": "tfmg:engine_base" - }, - "transitionalItem": { - "item": "tfmg:unfinished_turbine_engine" - }, - "sequence": [ - { - "type": "create:deploying", - "ingredients": [ - { - "item": "tfmg:unfinished_turbine_engine" - }, - { - "item": "tfmg:turbine_blade" - } - ], - "results": [ - { - "item": "tfmg:unfinished_turbine_engine" - } - ] - }, - { - "type": "create:deploying", - "ingredients": [ - { - "item": "tfmg:unfinished_turbine_engine" - }, - { - "item": "tfmg:screw" - } - ], - "results": [ - { - "item": "tfmg:unfinished_turbine_engine" - } - ] - }, - { - "type": "create:deploying", - "ingredients": [ - { - "item": "tfmg:unfinished_turbine_engine" - }, - { - "item": "tfmg:screwdriver" - } - ], - "results": [ - { - "item": "tfmg:unfinished_turbine_engine" - } - ] - }, - { - "type": "create:filling", - "ingredients": [ - { - "item": "tfmg:unfinished_turbine_engine" - }, - { - "fluid": "pneumaticcraft:lubricant", - "nbt": {}, - "amount": 1000 - } - ], - "results": [ - { - "item": "tfmg:unfinished_turbine_engine" - } - ] - }, - { - "type": "create:deploying", - "ingredients": [ - { - "item": "tfmg:unfinished_turbine_engine" - }, - { - "item": "tfmg:steel_mechanism" - } - ], - "results": [ - { - "item": "tfmg:unfinished_turbine_engine" - } - ] - } - ], - "results": [ - { - "item": "tfmg:turbine_engine", - "count": 2 - } - ], - "loops": 6 - } - } - ] -} diff --git a/src/main/resources/datapacks/rockets_use_adastra_fuels_only/data/ad_astra/tags/fluids/fuel.json b/src/main/resources/datapacks/rockets_use_adastra_fuels_only/data/ad_astra/tags/fluids/fuel.json deleted file mode 100644 index cff7210..0000000 --- a/src/main/resources/datapacks/rockets_use_adastra_fuels_only/data/ad_astra/tags/fluids/fuel.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "replace": true, - "values": [ - { - "id": "ad_astra:fuel", - "required": false - }, - { - "id": "ad_astra:cryo_fuel", - "required": false - } - ] -} diff --git a/src/main/resources/datapacks/rockets_use_adastra_fuels_only/pack.mcmeta b/src/main/resources/datapacks/rockets_use_adastra_fuels_only/pack.mcmeta deleted file mode 100644 index 44ef1b8..0000000 --- a/src/main/resources/datapacks/rockets_use_adastra_fuels_only/pack.mcmeta +++ /dev/null @@ -1,8 +0,0 @@ -{ - "pack": { - "pack_format": 15, - "description": { - "translate": "datapack.createaddoncompatibility.rockets_use_adastra_fuels_only.description" - } - } -} diff --git a/src/main/resources/mixins.createaddoncompatibility.json b/src/main/resources/mixins.createaddoncompatibility.json deleted file mode 100644 index 2c3cb45..0000000 --- a/src/main/resources/mixins.createaddoncompatibility.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "required": true, - "package": "com.amronos.createaddoncompatibility.mixin", - "refmap": "createaddoncompatibility.refmap.json", - "compatibilityLevel": "JAVA_17", - "mixins": [ - "MixinBlastFurnaceOutputBlockEntity", - "MixinUnifyConfig" - ], - "client": [ - ], - "injectors": { - "defaultRequire": 1 - }, - "minVersion": "0.8" -} diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta deleted file mode 100644 index eca79ae..0000000 --- a/src/main/resources/pack.mcmeta +++ /dev/null @@ -1,8 +0,0 @@ -{ - "pack": { - "description": { - "text": "${mod_id} resources" - }, - "pack_format": 15 - } -} \ No newline at end of file