diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54c20c0cb..05213340d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,11 +35,12 @@ jobs: path: gradle.properties properties: minecraft_version enabled_platforms archives_base_name - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: temurin + cache: 'gradle' - name: Validate Gradle wrapper uses: gradle/actions/wrapper-validation@v3 @@ -55,21 +56,21 @@ jobs: loom-cache - name: Build jar - run: ./gradlew build + run: ./gradlew :neoforge:build - name: Publish to GitHub Packages env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: env.GITHUB_TOKEN != '' continue-on-error: true - run: ./gradlew publishMavenJavaPublicationToGitHubPackagesRepository + run: ./gradlew :neoforge:publishMavenJavaPublicationToGitHubPackagesRepository - name: Publish to realRobotix Maven env: MAVEN_USER: ${{ secrets.MAVEN_USER }} MAVEN_ACCESS_TOKEN: ${{ secrets.MAVEN_ACCESS_TOKEN }} if: env.MAVEN_USER != '' && env.MAVEN_ACCESS_TOKEN != '' - run: ./gradlew publishMavenJavaPublicationToRealRobotixMavenRepository -PrealRobotixMavenUsername=${{ secrets.MAVEN_USER }} -PrealRobotixMavenPassword=${{ secrets.MAVEN_ACCESS_TOKEN }} + run: ./gradlew :neoforge:publishMavenJavaPublicationToRealRobotixMavenRepository -PrealRobotixMavenUsername=${{ secrets.MAVEN_USER }} -PrealRobotixMavenPassword=${{ secrets.MAVEN_ACCESS_TOKEN }} - name: Find jars id: find_jars @@ -79,14 +80,15 @@ jobs: find . -regextype posix-extended -regex "\.\/($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))\/build\/libs\/${{ steps.read_properties.outputs.archives_base_name }}-${{ steps.get_mod_version.outputs.version }}\+mc\.${{ steps.read_properties.outputs.minecraft_version }}-($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))-build\.${{ github.run_number }}\.jar" >> $GITHUB_OUTPUT echo "$EOF" >> $GITHUB_OUTPUT -# - name: Send building message to discord -# env: -# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} -# if: env.DISCORD_WEBHOOK != '' -# uses: realRobotix/action-discord-notifier@master -# with: -# webhook: ${{ secrets.DISCORD_WEBHOOK }} -# message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }} + - name: Send building message to discord + continue-on-error: true + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + if: env.DISCORD_WEBHOOK != '' + uses: realRobotix/action-discord-notifier@master + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }} - name: Send built file to discord env: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index cf84838f9..7fd45a40f 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -30,11 +30,12 @@ jobs: path: gradle.properties properties: minecraft_version enabled_platforms archives_base_name - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: temurin + cache: 'gradle' - name: Validate Gradle wrapper uses: gradle/actions/wrapper-validation@v3 @@ -48,7 +49,7 @@ jobs: cache-read-only: true - name: Build jar - run: ./gradlew build + run: ./gradlew :neoforge:build - name: Find jars id: find_jars diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40d5acfaf..fd365eac5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,11 +35,12 @@ jobs: path: gradle.properties properties: minecraft_version enabled_platforms archives_base_name - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: temurin + cache: 'gradle' - name: Validate Gradle wrapper uses: gradle/actions/wrapper-validation@v3 @@ -57,7 +58,7 @@ jobs: - name: Build jar env: RELEASE: true - run: ./gradlew build + run: ./gradlew :neoforge:build - name: Publish to GitHub Packages env: @@ -65,7 +66,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: env.GITHUB_TOKEN != '' continue-on-error: true - run: ./gradlew publishMavenJavaPublicationToGitHubPackagesRepository + run: ./gradlew :neoforge:publishMavenJavaPublicationToGitHubPackagesRepository - name: Publish to realRobotix Maven env: @@ -73,7 +74,7 @@ jobs: MAVEN_USER: ${{ secrets.MAVEN_USER }} MAVEN_ACCESS_TOKEN: ${{ secrets.MAVEN_ACCESS_TOKEN }} if: env.MAVEN_USER != '' && env.MAVEN_ACCESS_TOKEN != '' - run: ./gradlew publishMavenJavaPublicationToRealRobotixMavenRepository -PrealRobotixMavenUsername=${{ secrets.MAVEN_USER }} -PrealRobotixMavenPassword=${{ secrets.MAVEN_ACCESS_TOKEN }} + run: ./gradlew :neoforge:publishMavenJavaPublicationToRealRobotixMavenRepository -PrealRobotixMavenUsername=${{ secrets.MAVEN_USER }} -PrealRobotixMavenPassword=${{ secrets.MAVEN_ACCESS_TOKEN }} - name: Publish to Modrinth and CurseForge env: @@ -81,7 +82,7 @@ jobs: MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} if: env.MODRINTH_TOKEN != '' && env.CURSEFORGE_TOKEN != '' - run: ./gradlew publishMods -PMODRINTH_TOKEN=${{ secrets.MODRINTH_TOKEN }} -PCURSEFORGE_TOKEN=${{ secrets.CURSEFORGE_TOKEN }} + run: ./gradlew :neoforge:publishMods -PMODRINTH_TOKEN=${{ secrets.MODRINTH_TOKEN }} -PCURSEFORGE_TOKEN=${{ secrets.CURSEFORGE_TOKEN }} - name: Find jars id: find_jars @@ -91,14 +92,15 @@ jobs: find . -regextype posix-extended -regex "\.\/($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))\/build\/libs\/${{ steps.read_properties.outputs.archives_base_name }}-${{ steps.get_mod_version.outputs.version }}\+mc\.${{ steps.read_properties.outputs.minecraft_version }}-($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))\.jar" >> $GITHUB_OUTPUT echo "$EOF" >> $GITHUB_OUTPUT -# - name: Send building message to discord -# env: -# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} -# if: env.DISCORD_WEBHOOK != '' -# uses: realRobotix/action-discord-notifier@master -# with: -# webhook: ${{ secrets.DISCORD_WEBHOOK }} -# message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }} + - name: Send building message to discord + continue-on-error: true + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + if: env.DISCORD_WEBHOOK != '' + uses: realRobotix/action-discord-notifier@master + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }} - name: Send built file to discord env: diff --git a/.gitignore b/.gitignore index 99315dd5e..da820fc44 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,6 @@ run-data # Files from Forge MDK forge*changelog.txt -secrets.properties \ No newline at end of file +secrets.properties +/neoforge/lib/RenderDoc_1.37_64/ +/neoforge/lib/RenderDoc_1.37_64/** diff --git a/build.gradle b/build.gradle index dafbade75..d07f9e466 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id "architectury-plugin" version "3.4-SNAPSHOT" + id "architectury-plugin" version "3.4.+" id "dev.architectury.loom" version "1.7.+" apply false } @@ -37,6 +37,7 @@ subprojects { officialMojangMappings() parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip") } + compileOnly 'com.google.code.findbugs:jsr305:3.0.2' // for nullability annotations } publishing { @@ -74,12 +75,18 @@ allprojects { String buildNumber = System.getenv("GITHUB_RUN_NUMBER") version = "${getGitTag()}+mc.${minecraft_version}-${project.name}${nightly ? "-build.${buildNumber}" : ""}" group = rootProject.maven_group + ext.ci = ci repositories { + maven { url "https://maven.neoforged.net/releases/" } maven { name = 'ParchmentMC' url = 'https://maven.parchmentmc.org' } + maven { + name = 'createmod maven' + url = 'https://maven.createmod.net/' + } maven { name = 'tterrag maven' url = 'https://maven.tterrag.com/' @@ -99,6 +106,11 @@ allprojects { name = "ModMaven" url = "https://modmaven.dev" } + maven { + //Location of EMI + name = "TerraformersMC" + url = "https://maven.terraformersmc.com/" + } maven { url = "https://cursemaven.com" } @@ -125,6 +137,7 @@ allprojects { url = "https://jitpack.io/" content { includeGroupAndSubgroups("com.github") } } + maven { url "https://maven.neoforged.net/releases/" } exclusiveContent { forRepository { maven { @@ -141,7 +154,7 @@ allprojects { } } - configurations{ + configurations { findAndDelete } @@ -157,7 +170,7 @@ allprojects { tasks.withType(JavaCompile).configureEach { options.encoding = "UTF-8" - options.release.set(17) + options.release.set(21) } jar { @@ -173,21 +186,28 @@ allprojects { // set up properties for filling into metadata var replaceProperties = [ - version : version.replace("forge.", "").replace("fabric.", ""), - minecraft_version : minecraft_version, - fabric_api_version : fabric_api_version, - fabric_loader_version: fabric_loader_version, - create_forge_range : create_forge_range, - create_fabric_range : create_fabric_range, - mod_license : mod_license, - mod_authors : mod_authors, - mod_name : mod_name, - mod_description : mod_description + version : version.replace("neoforge.", "").replace("fabric.", ""), + minecraft_version : minecraft_version, + minecraft_version_range : minecraft_version_range, + fabric_api_version : fabric_api_version, + fabric_loader_version : fabric_loader_version, + neoforge_version_range : neoforge_version_range, + neoforge_loader_version_range: neoforge_loader_version_range, + create_neoforge_range : create_neoforge_range, + create_fabric_range : create_fabric_range, + archives_base_name : archives_base_name, + mod_license : mod_license, + mod_authors : mod_authors, + mod_name : mod_name, + mod_description : mod_description, + mod_credits : mod_credits, + mod_url : mod_url, + mod_issues : mod_issues ] inputs.properties replaceProperties - filesMatching(["fabric.mod.json", "META-INF/mods.toml"]) { + filesMatching(["fabric.mod.json", "META-INF/neoforge.mods.toml"]) { expand replaceProperties + [project: project] } } diff --git a/common/build.gradle b/common/build.gradle index 2a4839e70..362057127 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -2,25 +2,36 @@ architectury { common(enabled_platforms.split(",")) } +loom { + accessWidenerPath = file("src/main/resources/copycats.accesswidener") +} + dependencies { // We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies // Do NOT use other classes from fabric loader - modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" + neoForge "net.neoforged:neoforge:${neoforge_version}" // Compile against Create Fabric in common // beware of differences across platforms! // dependencies must also be pulled in to minimize problems, from remapping issues to compile errors. // All dependencies except Flywheel and Registrate are NOT safe to use! // Flywheel and Registrate must also be used carefully due to differences. - modCompileOnly("com.simibubi.create:create-fabric-${minecraft_version}:${create_fabric_version}") + //TODO: Change to fabric when its out + modCompileOnly("com.simibubi.create:create-${minecraft_version}:${create_neoforge_version}:slim") { transitive = false } + modCompileOnly("com.tterrag.registrate:Registrate:${registrate_neoforge_version}") + modImplementation("dev.engine-room.flywheel:flywheel-neoforge-${minecraft_version}:${flywheel_neoforge_version}") + compileOnly("dev.engine-room.flywheel:flywheel-neoforge-api-${minecraft_version}:${flywheel_neoforge_version}") + modImplementation("net.createmod.ponder:Ponder-NeoForge-${minecraft_version}:${ponder_version}") + // required for proper remapping and compiling modCompileOnly("net.fabricmc.fabric-api:fabric-api:${fabric_api_version}") modCompileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_common_version}") + modCompileOnly("dev.emi:emi-xplat-mojmap:${emi_common_version}+${minecraft_version}") - modCompileOnly("curse.maven:additional-placements-fabric-930469:${additionalplacements_fabric_curse_id}") - modCompileOnly("curse.maven:embeddium-908741:${embeddium_curse_id}") - modCompileOnly("curse.maven:selene-499980:${moonlight_curse_fabric_id}") - modCompileOnly("curse.maven:vertical-slabs-compat-724387:${vertical_slabs_curse_fabric_id}") + modImplementation("curse.maven:additional-placements-674852:${additionalplacements_neoforge_curse_id}") + modImplementation("curse.maven:sodium-394468:${sodium_neoforge_curse_id}") + modCompileOnly("curse.maven:selene-499980:${moonlight_curse_neoforge_id}") + modCompileOnly("curse.maven:vertical-slabs-compat-724387:${vertical_slabs_curse_neoforge_id}") //Used for all diagonal mods as they all shadow a common library we can mixin modCompileOnly("fuzs.diagonalblocks:diagonalblocks-common:${diagonal_mods_version}") diff --git a/common/gradle.properties b/common/gradle.properties new file mode 100644 index 000000000..4f8c4883f --- /dev/null +++ b/common/gradle.properties @@ -0,0 +1 @@ +loom.platform = neoforge \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_fence.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_fence.json deleted file mode 100644 index 1499dbc8c..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_fence.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_fence" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_fence_gate.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_fence_gate.json deleted file mode 100644 index d4f4010a7..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_fence_gate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_fence_gate" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_heavy_weighted_pressure_plate.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_heavy_weighted_pressure_plate.json deleted file mode 100644 index e8a501cab..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_heavy_weighted_pressure_plate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_heavy_weighted_pressure_plate" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_light_weighted_pressure_plate.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_light_weighted_pressure_plate.json deleted file mode 100644 index 643883a0c..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_light_weighted_pressure_plate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_light_weighted_pressure_plate" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_stairs.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_stairs.json deleted file mode 100644 index 2bcc3a1d5..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_stairs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_stairs" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_stone_button.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_stone_button.json deleted file mode 100644 index c09c5fffb..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_stone_button.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_stone_button" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_stone_pressure_plate.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_stone_pressure_plate.json deleted file mode 100644 index 87e0d2c05..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_stone_pressure_plate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_stone_pressure_plate" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_trapdoor.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_trapdoor.json deleted file mode 100644 index 5d1ec7675..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_trapdoor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_trapdoor" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_wall.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_wall.json deleted file mode 100644 index f98f2cd6d..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_wall.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_wall" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_wooden_button.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_wooden_button.json deleted file mode 100644 index a205f09d1..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_wooden_button.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_wooden_button" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_wooden_pressure_plate.json b/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_wooden_pressure_plate.json deleted file mode 100644 index d98c513cf..000000000 --- a/common/src/generated/resources/assets/copycats/blockstates/wrapped_copycat_wooden_pressure_plate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "copycats:block/wrapped_copycat_wooden_pressure_plate" - } - } -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/lang/en_ud.json b/common/src/generated/resources/assets/copycats/lang/en_ud.json deleted file mode 100644 index 91c9e91fd..000000000 --- a/common/src/generated/resources/assets/copycats/lang/en_ud.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "block.copycats.copycat_beam": "ɯɐǝᗺ ʇɐɔʎdoƆ", - "block.copycats.copycat_beam.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_beam.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_beam.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_beam.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_beam.tooltip.summary": "˙ɯɐǝq ǝʌıʇɐɹoɔǝp ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_block": "ʞɔoןᗺ ʇɐɔʎdoƆ", - "block.copycats.copycat_block.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_block.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_block.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_block.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_block.tooltip.summary": "˙ǝuoןɔ ǝʌıʇɐɹoɔǝp ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_board": "pɹɐoᗺ ʇɐɔʎdoƆ", - "block.copycats.copycat_board.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_board.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_board.tooltip.behaviour3": "˙‾ʎןןɐnpıʌıpuı‾ ʇɐɔʎdoɔ ǝɥʇ ɟo sʇɹɐd ‾sǝןʇuɐɯsıᗡ‾", - "block.copycats.copycat_board.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_board.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_board.tooltip.condition3": "buıʞɐǝuS ǝןıɥʍ pǝɥɔuǝɹM uǝɥM", - "block.copycats.copycat_board.tooltip.summary": "˙ǝɔɐds ʞɔoןq ǝɯɐs ǝɥʇ uı pǝɔɐןd ǝq uɐɔ spɹɐoq ǝןdıʇןnW ˙pɹɐoq ǝʌıʇɐɹoɔǝp ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_byte": "ǝʇʎᗺ ʇɐɔʎdoƆ", - "block.copycats.copycat_byte.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_byte.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_byte.tooltip.behaviour3": "˙‾ʎןןɐnpıʌıpuı‾ ʇɐɔʎdoɔ ǝɥʇ ɟo sʇɹɐd ‾sǝןʇuɐɯsıᗡ‾", - "block.copycats.copycat_byte.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_byte.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_byte.tooltip.condition3": "buıʞɐǝuS ǝןıɥʍ pǝɥɔuǝɹM uǝɥM", - "block.copycats.copycat_byte.tooltip.summary": "˙sǝɹnʇxǝʇ pǝʇɔǝuuoɔ ou :ǝʇoN ˙ʞɔoןq-ıuıɯ ǝʌıʇɐɹoɔǝp ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_fence": "ǝɔuǝℲ ʇɐɔʎdoƆ", - "block.copycats.copycat_fence.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_fence.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_fence.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_fence.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_fence.tooltip.summary": "˙ǝɔuǝɟ ǝʌıʇɐɹoɔǝp ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_fence_gate": "ǝʇɐ⅁ ǝɔuǝℲ ʇɐɔʎdoƆ", - "block.copycats.copycat_fence_gate.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_fence_gate.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_fence_gate.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_fence_gate.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_fence_gate.tooltip.summary": "˙ǝʇɐb ǝɔuǝɟ ןɐuoıʇɔunɟ ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_half_layer": "ɹǝʎɐꞀ ɟןɐH ʇɐɔʎdoƆ", - "block.copycats.copycat_half_layer.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_half_layer.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_half_layer.tooltip.behaviour3": "˙‾ʎןןɐnpıʌıpuı‾ ʇɐɔʎdoɔ ǝɥʇ ɟo sʇɹɐd ‾sǝןʇuɐɯsıᗡ‾", - "block.copycats.copycat_half_layer.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_half_layer.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_half_layer.tooltip.condition3": "buıʞɐǝuS ǝןıɥʍ pǝɥɔuǝɹM uǝɥM", - "block.copycats.copycat_half_layer.tooltip.summary": "˙ǝzıs uı ʞɔoןq ןןnɟ ɐ sǝɥɔɐǝɹ ʇı ןןıʇ pǝʞɔɐʇs ǝq uɐɔ sɹǝʎɐꞀ ˙sɹǝʎɐן ɟןɐɥ ǝʌıʇɐɹoɔǝp oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_half_panel": "ןǝuɐԀ ɟןɐH ʇɐɔʎdoƆ", - "block.copycats.copycat_half_panel.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_half_panel.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_half_panel.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_half_panel.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_half_panel.tooltip.summary": "˙ןǝuɐd ɟןɐɥ ǝʌıʇɐɹoɔǝp ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_heavy_weighted_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ pǝʇɥbıǝM ʎʌɐǝH ʇɐɔʎdoƆ", - "block.copycats.copycat_heavy_weighted_pressure_plate.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_heavy_weighted_pressure_plate.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_heavy_weighted_pressure_plate.tooltip.summary": "˙ǝʇɐןd ǝɹnssǝɹd pǝʇɥbıǝʍ ʎʌɐǝɥ ןɐuoıʇɔunɟ ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_layer": "ɹǝʎɐꞀ ʇɐɔʎdoƆ", - "block.copycats.copycat_layer.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_layer.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_layer.tooltip.behaviour3": "˙‾ʎןןɐnpıʌıpuı‾ ʇɐɔʎdoɔ ǝɥʇ ɟo sʇɹɐd ‾sǝןʇuɐɯsıᗡ‾", - "block.copycats.copycat_layer.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_layer.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_layer.tooltip.condition3": "buıʞɐǝuS ǝןıɥʍ pǝɥɔuǝɹM uǝɥM", - "block.copycats.copycat_layer.tooltip.summary": "˙ǝzıs uı ʞɔoןq ןןnɟ ɐ sǝɥɔɐǝɹ ʇı ןןıʇ pǝʞɔɐʇs ǝq uɐɔ sɹǝʎɐꞀ ˙sɹǝʎɐן ǝʌıʇɐɹoɔǝp oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_light_weighted_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ pǝʇɥbıǝM ʇɥbıꞀ ʇɐɔʎdoƆ", - "block.copycats.copycat_light_weighted_pressure_plate.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_light_weighted_pressure_plate.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_light_weighted_pressure_plate.tooltip.summary": "˙ǝʇɐןd ǝɹnssǝɹd pǝʇɥbıǝʍ ʇɥbıן ןɐuoıʇɔunɟ ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_slab": "qɐןS ʇɐɔʎdoƆ", - "block.copycats.copycat_slab.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_slab.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_slab.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_slab.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_slab.tooltip.summary": "˙‾ʎןןɐɔıʇɹǝʌ‾ pǝɔɐןd ǝq uɐƆ ˙qɐןs ǝʌıʇɐɹoɔǝp ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_slice": "ǝɔıןS ʇɐɔʎdoƆ", - "block.copycats.copycat_slice.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_slice.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_slice.tooltip.behaviour3": "˙‾ʎןןɐnpıʌıpuı‾ ʇɐɔʎdoɔ ǝɥʇ ɟo sʇɹɐd ‾sǝןʇuɐɯsıᗡ‾", - "block.copycats.copycat_slice.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_slice.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_slice.tooltip.condition3": "buıʞɐǝuS ǝןıɥʍ pǝɥɔuǝɹM uǝɥM", - "block.copycats.copycat_slice.tooltip.summary": "˙ǝzıs uı ʞɔoןq ןןnɟ ɐ sǝɥɔɐǝɹ ʇı ןןıʇ pǝbɹɐןuǝ ǝq uɐɔ sǝɔıןS ˙sǝɔıןs ǝʌıʇɐɹoɔǝp oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_stairs": "sɹıɐʇS ʇɐɔʎdoƆ", - "block.copycats.copycat_stairs.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_stairs.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_stairs.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_stairs.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_stairs.tooltip.summary": "˙sǝɹnʇxǝʇ pǝʇɔǝuuoɔ ʎbbnq :ǝʇoN ˙sɹıɐʇs ǝʌıʇɐɹoɔǝp oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_stone_button": "uoʇʇnᗺ ǝuoʇS ʇɐɔʎdoƆ", - "block.copycats.copycat_stone_button.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_stone_button.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_stone_button.tooltip.summary": "˙uoʇʇnq ǝuoʇs ןɐuoıʇɔunɟ ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_stone_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ ǝuoʇS ʇɐɔʎdoƆ", - "block.copycats.copycat_stone_pressure_plate.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_stone_pressure_plate.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_stone_pressure_plate.tooltip.summary": "˙ǝʇɐןd ǝɹnssǝɹd ǝuoʇs ןɐuoıʇɔunɟ ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_trapdoor": "ɹoopdɐɹ⟘ ʇɐɔʎdoƆ", - "block.copycats.copycat_trapdoor.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_trapdoor.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_trapdoor.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_trapdoor.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_trapdoor.tooltip.summary": "˙ɹoopdɐɹʇ ןɐuoıʇɔunɟ ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_vertical_slice": "ǝɔıןS ןɐɔıʇɹǝΛ ʇɐɔʎdoƆ", - "block.copycats.copycat_vertical_slice.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_vertical_slice.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_vertical_slice.tooltip.behaviour3": "˙‾ʎןןɐnpıʌıpuı‾ ʇɐɔʎdoɔ ǝɥʇ ɟo sʇɹɐd ‾sǝןʇuɐɯsıᗡ‾", - "block.copycats.copycat_vertical_slice.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_vertical_slice.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_vertical_slice.tooltip.condition3": "buıʞɐǝuS ǝןıɥʍ pǝɥɔuǝɹM uǝɥM", - "block.copycats.copycat_vertical_slice.tooltip.summary": "˙ǝzıs uı ʞɔoןq ןןnɟ ɐ sǝɥɔɐǝɹ ʇı ןןıʇ pǝbɹɐןuǝ ǝq uɐɔ sǝɔıןS ˙sǝɔıןs ןɐɔıʇɹǝʌ ǝʌıʇɐɹoɔǝp oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_vertical_step": "dǝʇS ןɐɔıʇɹǝΛ ʇɐɔʎdoƆ", - "block.copycats.copycat_vertical_step.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_vertical_step.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_vertical_step.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_vertical_step.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_vertical_step.tooltip.summary": "˙dǝʇs ןɐɔıʇɹǝʌ ǝʌıʇɐɹoɔǝp ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_wall": "ןןɐM ʇɐɔʎdoƆ", - "block.copycats.copycat_wall.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_wall.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "block.copycats.copycat_wall.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_wall.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "block.copycats.copycat_wall.tooltip.summary": "˙ןןɐʍ ǝʌıʇɐɹoɔǝp ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_wooden_button": "uoʇʇnᗺ uǝpooM ʇɐɔʎdoƆ", - "block.copycats.copycat_wooden_button.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_wooden_button.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_wooden_button.tooltip.summary": "˙uoʇʇnq uǝpooʍ ןɐuoıʇɔunɟ ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.copycat_wooden_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ uǝpooM ʇɐɔʎdoƆ", - "block.copycats.copycat_wooden_pressure_plate.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "block.copycats.copycat_wooden_pressure_plate.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "block.copycats.copycat_wooden_pressure_plate.tooltip.summary": "˙ǝʇɐןd ǝɹnssǝɹd uǝpooʍ ןɐuoıʇɔunɟ ɐ oʇuı ‾ʞɔoןq ןןnɟ‾ ʎuɐ ‾sʇɹǝʌuoƆ‾", - "block.copycats.wrapped_copycat_fence": "ǝɔuǝℲ ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_fence_gate": "ǝʇɐ⅁ ǝɔuǝℲ ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_heavy_weighted_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ pǝʇɥbıǝM ʎʌɐǝH ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_light_weighted_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ pǝʇɥbıǝM ʇɥbıꞀ ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_stairs": "sɹıɐʇS ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_stone_button": "uoʇʇnᗺ ǝuoʇS ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_stone_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ ǝuoʇS ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_trapdoor": "ɹoopdɐɹ⟘ ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_wall": "ןןɐM ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_wooden_button": "uoʇʇnᗺ uǝpooM ʇɐɔʎdoƆ pǝddɐɹM", - "block.copycats.wrapped_copycat_wooden_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ uǝpooM ʇɐɔʎdoƆ pǝddɐɹM", - "item.copycats.copycat_box": "xoᗺ ʇɐɔʎdoƆ", - "item.copycats.copycat_box.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "item.copycats.copycat_box.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "item.copycats.copycat_box.tooltip.behaviour3": "˙‾ʎןןɐnpıʌıpuı‾ ʇɐɔʎdoɔ ǝɥʇ ɟo sʇɹɐd ‾sǝןʇuɐɯsıᗡ‾", - "item.copycats.copycat_box.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "item.copycats.copycat_box.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "item.copycats.copycat_box.tooltip.condition3": "buıʞɐǝuS ǝןıɥʍ pǝɥɔuǝɹM uǝɥM", - "item.copycats.copycat_box.tooltip.summary": "˙ʇuǝɯǝɔɐןd ʇuǝıuǝʌuoɔ ɹoɟ xoq ɐ oʇuı pǝןqɯǝssɐ-ǝɹd ‾spɹɐoq ʇɐɔʎdoƆ‾", - "item.copycats.copycat_catwalk": "ʞןɐʍʇɐƆ ʇɐɔʎdoƆ", - "item.copycats.copycat_catwalk.tooltip.behaviour1": "˙ןɐıɹǝʇɐɯ ǝɥʇ ‾ʇǝsǝɹ‾ oʇ ‾ɥɔuǝɹM‾ ɐ ǝs∩ ˙ǝʇɐʇs ‾pǝɹǝʍod‾ ɹo ‾uoıʇɐʇuǝıɹo‾ ǝןɔʎɔ oʇ ‾uıɐbɐ ʞɔıןƆ‾ ˙ǝןqıssod ɟı ‾ןɐıɹǝʇɐɯ‾ sʇı sɐ ‾ɯǝʇı pןǝɥ‾ sǝıןddⱯ", - "item.copycats.copycat_catwalk.tooltip.behaviour2": "˙‾ןɐıɹǝʇɐɯ‾ sʇı uo ‾sǝɹnʇxǝʇ pǝʇɔǝuuoɔ‾ sǝןbbo⟘", - "item.copycats.copycat_catwalk.tooltip.behaviour3": "˙‾ʎןןɐnpıʌıpuı‾ ʇɐɔʎdoɔ ǝɥʇ ɟo sʇɹɐd ‾sǝןʇuɐɯsıᗡ‾", - "item.copycats.copycat_catwalk.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM", - "item.copycats.copycat_catwalk.tooltip.condition2": "puɐH ʎʇdɯƎ ɥʇıʍ pǝʞɔıןƆ-ᴚ-ʞɐǝuS uǝɥM", - "item.copycats.copycat_catwalk.tooltip.condition3": "buıʞɐǝuS ǝןıɥʍ pǝɥɔuǝɹM uǝɥM", - "item.copycats.copycat_catwalk.tooltip.summary": "˙ʇuǝɯǝɔɐןd ʇuǝıuǝʌuoɔ ɹoɟ ʞןɐʍʇɐɔ ɐ oʇuı pǝןqɯǝssɐ-ǝɹd ‾spɹɐoq ʇɐɔʎdoƆ‾", - "itemGroup.copycats.main": "+sʇɐɔʎdoƆ :ǝʇɐǝɹƆ" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/lang/en_us.json b/common/src/generated/resources/assets/copycats/lang/en_us.json deleted file mode 100644 index c2e311453..000000000 --- a/common/src/generated/resources/assets/copycats/lang/en_us.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "block.copycats.copycat_beam": "Copycat Beam", - "block.copycats.copycat_beam.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_beam.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_beam.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_beam.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_beam.tooltip.summary": "_Converts_ any _full block_ into a decorative beam.", - "block.copycats.copycat_block": "Copycat Block", - "block.copycats.copycat_block.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_block.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_block.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_block.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_block.tooltip.summary": "_Converts_ any _full block_ into a decorative clone.", - "block.copycats.copycat_board": "Copycat Board", - "block.copycats.copycat_board.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_board.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_board.tooltip.behaviour3": "_Dismantles_ parts of the copycat _individually_.", - "block.copycats.copycat_board.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_board.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_board.tooltip.condition3": "When Wrenched while Sneaking", - "block.copycats.copycat_board.tooltip.summary": "_Converts_ any _full block_ into a decorative board. Multiple boards can be placed in the same block space.", - "block.copycats.copycat_byte": "Copycat Byte", - "block.copycats.copycat_byte.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_byte.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_byte.tooltip.behaviour3": "_Dismantles_ parts of the copycat _individually_.", - "block.copycats.copycat_byte.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_byte.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_byte.tooltip.condition3": "When Wrenched while Sneaking", - "block.copycats.copycat_byte.tooltip.summary": "_Converts_ any _full block_ into a decorative mini-block. Note: no connected textures.", - "block.copycats.copycat_fence": "Copycat Fence", - "block.copycats.copycat_fence.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_fence.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_fence.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_fence.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_fence.tooltip.summary": "_Converts_ any _full block_ into a decorative fence.", - "block.copycats.copycat_fence_gate": "Copycat Fence Gate", - "block.copycats.copycat_fence_gate.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_fence_gate.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_fence_gate.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_fence_gate.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_fence_gate.tooltip.summary": "_Converts_ any _full block_ into a functional fence gate.", - "block.copycats.copycat_half_layer": "Copycat Half Layer", - "block.copycats.copycat_half_layer.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_half_layer.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_half_layer.tooltip.behaviour3": "_Dismantles_ parts of the copycat _individually_.", - "block.copycats.copycat_half_layer.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_half_layer.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_half_layer.tooltip.condition3": "When Wrenched while Sneaking", - "block.copycats.copycat_half_layer.tooltip.summary": "_Converts_ any _full block_ into decorative half layers. Layers can be stacked till it reaches a full block in size.", - "block.copycats.copycat_half_panel": "Copycat Half Panel", - "block.copycats.copycat_half_panel.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_half_panel.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_half_panel.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_half_panel.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_half_panel.tooltip.summary": "_Converts_ any _full block_ into a decorative half panel.", - "block.copycats.copycat_heavy_weighted_pressure_plate": "Copycat Heavy Weighted Pressure Plate", - "block.copycats.copycat_heavy_weighted_pressure_plate.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_heavy_weighted_pressure_plate.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_heavy_weighted_pressure_plate.tooltip.summary": "_Converts_ any _full block_ into a functional heavy weighted pressure plate.", - "block.copycats.copycat_layer": "Copycat Layer", - "block.copycats.copycat_layer.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_layer.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_layer.tooltip.behaviour3": "_Dismantles_ parts of the copycat _individually_.", - "block.copycats.copycat_layer.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_layer.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_layer.tooltip.condition3": "When Wrenched while Sneaking", - "block.copycats.copycat_layer.tooltip.summary": "_Converts_ any _full block_ into decorative layers. Layers can be stacked till it reaches a full block in size.", - "block.copycats.copycat_light_weighted_pressure_plate": "Copycat Light Weighted Pressure Plate", - "block.copycats.copycat_light_weighted_pressure_plate.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_light_weighted_pressure_plate.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_light_weighted_pressure_plate.tooltip.summary": "_Converts_ any _full block_ into a functional light weighted pressure plate.", - "block.copycats.copycat_slab": "Copycat Slab", - "block.copycats.copycat_slab.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_slab.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_slab.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_slab.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_slab.tooltip.summary": "_Converts_ any _full block_ into a decorative slab. Can be placed _vertically_.", - "block.copycats.copycat_slice": "Copycat Slice", - "block.copycats.copycat_slice.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_slice.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_slice.tooltip.behaviour3": "_Dismantles_ parts of the copycat _individually_.", - "block.copycats.copycat_slice.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_slice.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_slice.tooltip.condition3": "When Wrenched while Sneaking", - "block.copycats.copycat_slice.tooltip.summary": "_Converts_ any _full block_ into decorative slices. Slices can be enlarged till it reaches a full block in size.", - "block.copycats.copycat_stairs": "Copycat Stairs", - "block.copycats.copycat_stairs.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_stairs.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_stairs.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_stairs.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_stairs.tooltip.summary": "_Converts_ any _full block_ into decorative stairs. Note: buggy connected textures.", - "block.copycats.copycat_stone_button": "Copycat Stone Button", - "block.copycats.copycat_stone_button.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_stone_button.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_stone_button.tooltip.summary": "_Converts_ any _full block_ into a functional stone button.", - "block.copycats.copycat_stone_pressure_plate": "Copycat Stone Pressure Plate", - "block.copycats.copycat_stone_pressure_plate.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_stone_pressure_plate.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_stone_pressure_plate.tooltip.summary": "_Converts_ any _full block_ into a functional stone pressure plate.", - "block.copycats.copycat_trapdoor": "Copycat Trapdoor", - "block.copycats.copycat_trapdoor.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_trapdoor.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_trapdoor.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_trapdoor.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_trapdoor.tooltip.summary": "_Converts_ any _full block_ into a functional trapdoor.", - "block.copycats.copycat_vertical_slice": "Copycat Vertical Slice", - "block.copycats.copycat_vertical_slice.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_vertical_slice.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_vertical_slice.tooltip.behaviour3": "_Dismantles_ parts of the copycat _individually_.", - "block.copycats.copycat_vertical_slice.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_vertical_slice.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_vertical_slice.tooltip.condition3": "When Wrenched while Sneaking", - "block.copycats.copycat_vertical_slice.tooltip.summary": "_Converts_ any _full block_ into decorative vertical slices. Slices can be enlarged till it reaches a full block in size.", - "block.copycats.copycat_vertical_step": "Copycat Vertical Step", - "block.copycats.copycat_vertical_step.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_vertical_step.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_vertical_step.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_vertical_step.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_vertical_step.tooltip.summary": "_Converts_ any _full block_ into a decorative vertical step.", - "block.copycats.copycat_wall": "Copycat Wall", - "block.copycats.copycat_wall.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_wall.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "block.copycats.copycat_wall.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_wall.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "block.copycats.copycat_wall.tooltip.summary": "_Converts_ any _full block_ into a decorative wall.", - "block.copycats.copycat_wooden_button": "Copycat Wooden Button", - "block.copycats.copycat_wooden_button.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_wooden_button.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_wooden_button.tooltip.summary": "_Converts_ any _full block_ into a functional wooden button.", - "block.copycats.copycat_wooden_pressure_plate": "Copycat Wooden Pressure Plate", - "block.copycats.copycat_wooden_pressure_plate.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "block.copycats.copycat_wooden_pressure_plate.tooltip.condition1": "When R-Clicked", - "block.copycats.copycat_wooden_pressure_plate.tooltip.summary": "_Converts_ any _full block_ into a functional wooden pressure plate.", - "block.copycats.wrapped_copycat_fence": "Wrapped Copycat Fence", - "block.copycats.wrapped_copycat_fence_gate": "Wrapped Copycat Fence Gate", - "block.copycats.wrapped_copycat_heavy_weighted_pressure_plate": "Wrapped Copycat Heavy Weighted Pressure Plate", - "block.copycats.wrapped_copycat_light_weighted_pressure_plate": "Wrapped Copycat Light Weighted Pressure Plate", - "block.copycats.wrapped_copycat_stairs": "Wrapped Copycat Stairs", - "block.copycats.wrapped_copycat_stone_button": "Wrapped Copycat Stone Button", - "block.copycats.wrapped_copycat_stone_pressure_plate": "Wrapped Copycat Stone Pressure Plate", - "block.copycats.wrapped_copycat_trapdoor": "Wrapped Copycat Trapdoor", - "block.copycats.wrapped_copycat_wall": "Wrapped Copycat Wall", - "block.copycats.wrapped_copycat_wooden_button": "Wrapped Copycat Wooden Button", - "block.copycats.wrapped_copycat_wooden_pressure_plate": "Wrapped Copycat Wooden Pressure Plate", - "item.copycats.copycat_box": "Copycat Box", - "item.copycats.copycat_box.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "item.copycats.copycat_box.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "item.copycats.copycat_box.tooltip.behaviour3": "_Dismantles_ parts of the copycat _individually_.", - "item.copycats.copycat_box.tooltip.condition1": "When R-Clicked", - "item.copycats.copycat_box.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "item.copycats.copycat_box.tooltip.condition3": "When Wrenched while Sneaking", - "item.copycats.copycat_box.tooltip.summary": "_Copycat boards_ pre-assembled into a box for convenient placement.", - "item.copycats.copycat_catwalk": "Copycat Catwalk", - "item.copycats.copycat_catwalk.tooltip.behaviour1": "Applies _held item_ as its _material_ if possible. _Click again_ to cycle _orientation_ or _powered_ state. Use a _Wrench_ to _reset_ the material.", - "item.copycats.copycat_catwalk.tooltip.behaviour2": "Toggles _connected textures_ on its _material_.", - "item.copycats.copycat_catwalk.tooltip.behaviour3": "_Dismantles_ parts of the copycat _individually_.", - "item.copycats.copycat_catwalk.tooltip.condition1": "When R-Clicked", - "item.copycats.copycat_catwalk.tooltip.condition2": "When Sneak-R-Clicked with Empty Hand", - "item.copycats.copycat_catwalk.tooltip.condition3": "When Wrenched while Sneaking", - "item.copycats.copycat_catwalk.tooltip.summary": "_Copycat boards_ pre-assembled into a catwalk for convenient placement.", - "itemGroup.copycats.main": "Create: Copycats+" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_fence.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_fence.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_fence_gate.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_fence_gate.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_heavy_weighted_pressure_plate.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_heavy_weighted_pressure_plate.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_heavy_weighted_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_light_weighted_pressure_plate.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_light_weighted_pressure_plate.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_light_weighted_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_stairs.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_stairs.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_stone_button.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_stone_button.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_stone_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_stone_pressure_plate.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_stone_pressure_plate.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_stone_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_trapdoor.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_trapdoor.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_wall.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_wall.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_wooden_button.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_wooden_button.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_wooden_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_wooden_pressure_plate.json b/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_wooden_pressure_plate.json deleted file mode 100644 index 2272fd467..000000000 --- a/common/src/generated/resources/assets/copycats/models/block/wrapped_copycat_wooden_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrier" -} \ No newline at end of file diff --git a/common/src/main/java/com/copycatsplus/copycats/CCBlockEntityTypes.java b/common/src/main/java/com/copycatsplus/copycats/CCBlockEntityTypes.java index 8a717d508..b8074b79a 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CCBlockEntityTypes.java +++ b/common/src/main/java/com/copycatsplus/copycats/CCBlockEntityTypes.java @@ -5,20 +5,21 @@ import com.copycatsplus.copycats.foundation.copycat.CCCopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.multistate.MultiStateCopycatBlockEntity; import com.copycatsplus.copycats.content.copycat.cogwheel.CopycatCogWheelBlockEntity; -import com.copycatsplus.copycats.content.copycat.cogwheel.CopycatCogWheelInstance; +import com.copycatsplus.copycats.content.copycat.cogwheel.CopycatCogWheelVisual; import com.copycatsplus.copycats.content.copycat.cogwheel.CopycatCogWheelRenderer; import com.copycatsplus.copycats.content.copycat.fluid_pipe.CopycatFluidPipeBlockEntity; import com.copycatsplus.copycats.content.copycat.fluid_pipe.CopycatFluidPipeRenderer; import com.copycatsplus.copycats.content.copycat.fluid_pipe.CopycatStraightPipeBlockEntity; import com.copycatsplus.copycats.content.copycat.ladder.MultiStateCopycatLadderBlockEntity; import com.copycatsplus.copycats.content.copycat.shaft.CopycatShaftBlockEntity; -import com.copycatsplus.copycats.content.copycat.shaft.CopycatShaftInstance; +import com.copycatsplus.copycats.content.copycat.shaft.CopycatShaftVisual; import com.copycatsplus.copycats.content.copycat.shaft.CopycatShaftRenderer; import com.simibubi.create.content.fluids.pipes.TransparentStraightPipeRenderer; +import com.simibubi.create.foundation.data.CreateRegistrate; import com.tterrag.registrate.util.entry.BlockEntityEntry; public class CCBlockEntityTypes { - private static final CopycatRegistrate REGISTRATE = Copycats.getRegistrate(); + private static final CreateRegistrate REGISTRATE = Copycats.getRegistrate(); public static final BlockEntityEntry COPYCAT = REGISTRATE.blockEntity("copycat", CCCopycatBlockEntity::new) @@ -76,14 +77,14 @@ public class CCBlockEntityTypes { public static final BlockEntityEntry COPYCAT_SHAFT = REGISTRATE.blockEntity("copycat_shaft", CopycatShaftBlockEntity::new) - .instance(() -> CopycatShaftInstance::new, false) + .visual(() -> CopycatShaftVisual::new, false) .validBlocks(CCBlocks.COPYCAT_SHAFT) .renderer(() -> CopycatShaftRenderer::new) .register(); public static final BlockEntityEntry COPYCAT_COGWHEEL = REGISTRATE.blockEntity("copycat_cogwheel", CopycatCogWheelBlockEntity::new) - .instance(() -> CopycatCogWheelInstance::new, false) + .visual(() -> CopycatCogWheelVisual::new, false) .validBlocks(CCBlocks.COPYCAT_COGWHEEL, CCBlocks.COPYCAT_LARGE_COGWHEEL) .renderer(() -> CopycatCogWheelRenderer::new) .register(); diff --git a/common/src/main/java/com/copycatsplus/copycats/CCBlocks.java b/common/src/main/java/com/copycatsplus/copycats/CCBlocks.java index 3c8d7c3f1..a65c8cbc6 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CCBlocks.java +++ b/common/src/main/java/com/copycatsplus/copycats/CCBlocks.java @@ -1,5 +1,6 @@ package com.copycatsplus.copycats; +import com.copycatsplus.copycats.config.CStress; import com.copycatsplus.copycats.config.FeatureCategory; import com.copycatsplus.copycats.config.FeatureToggle; import com.copycatsplus.copycats.content.copycat.byte_panel.CopycatBytePanelBlock; @@ -89,7 +90,6 @@ import com.simibubi.create.AllTags; import com.simibubi.create.content.contraptions.behaviour.DoorMovingInteraction; import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorMovementBehaviour; -import com.simibubi.create.content.kinetics.BlockStressDefaults; import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockModel; import com.simibubi.create.content.kinetics.simpleRelays.CogwheelBlockItem; import com.simibubi.create.foundation.data.BuilderTransformers; @@ -117,18 +117,19 @@ import java.util.stream.Collectors; import static com.copycatsplus.copycats.CCCustomModels.*; -import static com.simibubi.create.AllInteractionBehaviours.interactionBehaviour; -import static com.simibubi.create.AllMovementBehaviours.movementBehaviour; -import static com.simibubi.create.content.contraptions.BlockMovementChecks.*; +import static com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour.interactionBehaviour; +import static com.simibubi.create.api.behaviour.movement.MovementBehaviour.movementBehaviour; +import static com.simibubi.create.api.contraption.BlockMovementChecks.CheckResult; +import static com.simibubi.create.api.contraption.BlockMovementChecks.registerBrittleCheck; import static com.simibubi.create.foundation.data.CreateRegistrate.blockModel; import static com.simibubi.create.foundation.data.ModelGen.customItemModel; import static com.simibubi.create.foundation.data.TagGen.pickaxeOnly; -@SuppressWarnings("unused") +@SuppressWarnings({"unused", "removal"}) //noinspection unchecked public class CCBlocks { - private static final CopycatRegistrate REGISTRATE = Copycats.getRegistrate(); + private static final CreateRegistrate REGISTRATE = Copycats.getRegistrate(); public static final BlockEntry WRAPPED_COPYCAT = REGISTRATE.block("wrapped_copycat", WrappedCopycatBlock::new) @@ -191,7 +192,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_WOODEN_BUTTON = - REGISTRATE.block("copycat_wooden_button", p -> new CopycatButtonBlock(p, BlockSetType.OAK, 30, true)) + REGISTRATE.block("copycat_wooden_button", p -> new CopycatButtonBlock(BlockSetType.OAK, 30, p)) .transform(CCBuilderTransformers.copycat()) .properties(p -> p.isValidSpawn((state, level, pos, entity) -> false) .noCollission()) @@ -208,7 +209,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_STONE_BUTTON = - REGISTRATE.block("copycat_stone_button", p -> new CopycatButtonBlock(p, BlockSetType.STONE, 20, false)) + REGISTRATE.block("copycat_stone_button", p -> new CopycatButtonBlock(BlockSetType.STONE, 20, p)) .transform(CCBuilderTransformers.copycat()) .properties(p -> p.isValidSpawn((state, level, pos, entity) -> false) .noCollission()) @@ -402,7 +403,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_WOODEN_PRESSURE_PLATE = - REGISTRATE.block("copycat_wooden_pressure_plate", p -> new CopycatPressurePlateBlock(PressurePlateBlock.Sensitivity.EVERYTHING, p, BlockSetType.OAK)) + REGISTRATE.block("copycat_wooden_pressure_plate", p -> new CopycatPressurePlateBlock(BlockSetType.OAK, p)) .transform(CCBuilderTransformers.copycat()) .properties(p -> p.isValidSpawn((state, level, pos, entity) -> false) .noCollission()) @@ -419,7 +420,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_STONE_PRESSURE_PLATE = - REGISTRATE.block("copycat_stone_pressure_plate", p -> new CopycatPressurePlateBlock(PressurePlateBlock.Sensitivity.MOBS, p, BlockSetType.STONE)) + REGISTRATE.block("copycat_stone_pressure_plate", p -> new CopycatPressurePlateBlock(BlockSetType.STONE, p)) .transform(CCBuilderTransformers.copycat()) .properties(p -> p.isValidSpawn((state, level, pos, entity) -> false) .noCollission()) @@ -436,7 +437,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_HEAVY_WEIGHTED_PRESSURE_PLATE = - REGISTRATE.block("copycat_heavy_weighted_pressure_plate", p -> new CopycatWeightedPressurePlate(150, p, BlockSetType.IRON)) + REGISTRATE.block("copycat_heavy_weighted_pressure_plate", p -> new CopycatWeightedPressurePlate(150, BlockSetType.IRON, p)) .transform(CCBuilderTransformers.copycat()) .properties(p -> p.isValidSpawn((state, level, pos, entity) -> false) .noCollission()) @@ -452,7 +453,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_LIGHT_WEIGHTED_PRESSURE_PLATE = - REGISTRATE.block("copycat_light_weighted_pressure_plate", p -> new CopycatWeightedPressurePlate(15, p, BlockSetType.GOLD)) + REGISTRATE.block("copycat_light_weighted_pressure_plate", p -> new CopycatWeightedPressurePlate(15, BlockSetType.GOLD, p)) .transform(CCBuilderTransformers.copycat()) .properties(p -> p.isValidSpawn((state, level, pos, entity) -> false) .noCollission()) @@ -545,7 +546,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_TRAPDOOR = - REGISTRATE.block("copycat_trapdoor", p -> new CopycatTrapdoorBlock(p, BlockSetType.OAK)) + REGISTRATE.block("copycat_trapdoor", p -> new CopycatTrapdoorBlock(BlockSetType.OAK, p)) .transform(CCBuilderTransformers.copycat()) .properties(p -> p.isValidSpawn((state, level, pos, entity) -> false)) .tag(BlockTags.TRAPDOORS) @@ -561,7 +562,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_IRON_TRAPDOOR = - REGISTRATE.block("copycat_iron_trapdoor", p -> new CopycatTrapdoorBlock(p, BlockSetType.IRON)) + REGISTRATE.block("copycat_iron_trapdoor", p -> new CopycatTrapdoorBlock(BlockSetType.IRON, p)) .transform(CCBuilderTransformers.copycat()) .properties(p -> p.isValidSpawn((state, level, pos, entity) -> false)) .tag(BlockTags.TRAPDOORS) @@ -665,7 +666,7 @@ public class CCBlocks { REGISTRATE.block("copycat_shaft", CopycatShaftBlock::new) .transform(CCBuilderTransformers.copycat()) .transform(FeatureToggle.register(FeatureCategory.FUNCTIONAL, FeatureCategory.CREATE)) - .transform(BlockStressDefaults.setNoImpact()) + .transform(CStress.setNoImpact()) .onRegister(onClient(() -> createBlockModel(BracketedKineticBlockModel::new, () -> CopycatModelCore.kinetic(new CopycatShaftModelCore())))) .item() .onRegister(CopycatDescription.register( @@ -679,7 +680,7 @@ public class CCBlocks { REGISTRATE.block("copycat_cogwheel", CopycatCogWheelBlock::small) .transform(CCBuilderTransformers.copycat()) .transform(FeatureToggle.register(FeatureCategory.MULTISTATES, FeatureCategory.FUNCTIONAL, FeatureCategory.CREATE)) - .transform(BlockStressDefaults.setNoImpact()) + .transform(CStress.setNoImpact()) .onRegister(onClient(() -> createBlockModel(BracketedKineticBlockModel::new, () -> CopycatModelCore.kinetic(new CopycatShaftModelCore(), new CopycatCogWheelModelCore())))) .item(CogwheelBlockItem::new) .onRegister(CopycatDescription.register( @@ -694,7 +695,7 @@ public class CCBlocks { REGISTRATE.block("copycat_large_cogwheel", CopycatCogWheelBlock::large) .transform(CCBuilderTransformers.copycat()) .transform(FeatureToggle.register(FeatureCategory.MULTISTATES, FeatureCategory.FUNCTIONAL, FeatureCategory.CREATE)) - .transform(BlockStressDefaults.setNoImpact()) + .transform(CStress.setNoImpact()) .onRegister(onClient(() -> createBlockModel(BracketedKineticBlockModel::new, () -> CopycatModelCore.kinetic(new CopycatShaftModelCore(), new CopycatLargeCogWheelModelCore())))) .item(CogwheelBlockItem::new) .onRegister(CopycatDescription.register( @@ -727,7 +728,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_DOOR = - REGISTRATE.block("copycat_door", p -> new CopycatDoorBlock(p, BlockSetType.OAK)) + REGISTRATE.block("copycat_door", p -> new CopycatDoorBlock(BlockSetType.OAK, p)) .transform(CCBuilderTransformers.copycat()) .transform(FeatureToggle.register(FeatureCategory.FUNCTIONAL)) .onRegister(interactionBehaviour(new DoorMovingInteraction())) @@ -746,7 +747,7 @@ public class CCBlocks { .register(); public static final BlockEntry COPYCAT_IRON_DOOR = - REGISTRATE.block("copycat_iron_door", p -> new CopycatDoorBlock(p, BlockSetType.IRON)) + REGISTRATE.block("copycat_iron_door", p -> new CopycatDoorBlock(BlockSetType.IRON, p)) .transform(CCBuilderTransformers.copycat()) .transform(FeatureToggle.register(FeatureCategory.FUNCTIONAL)) .onRegister(onClient(() -> createBlockModel(CopycatDoorModelCore::new))) @@ -847,15 +848,15 @@ public static NonNullConsumer onClient(Supplier> getAllRegisteredBlocks() { + public static Set> getAllRegisteredBlocks() { return new HashSet<>(REGISTRATE.getAll(BuiltInRegistries.BLOCK.key())); } - public static Set> getAllRegisteredBlocksWithoutWrapped() { + public static Set> getAllRegisteredBlocksWithoutWrapped() { return new HashSet<>(REGISTRATE.getAll(BuiltInRegistries.BLOCK.key())).stream().filter(entry -> !(entry.getId().getPath().startsWith("wrapped"))).collect(Collectors.toSet()); } - public static Set> getAllRegisteredMultiStateBlocks() { + public static Set> getAllRegisteredMultiStateBlocks() { return new HashSet<>(REGISTRATE.getAll(BuiltInRegistries.BLOCK.key())).stream().filter(entry -> entry.get() instanceof IMultiStateCopycatBlock).collect(Collectors.toSet()); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/CCCatVariants.java b/common/src/main/java/com/copycatsplus/copycats/CCCatVariants.java index dfbfda4fa..46f5a021d 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CCCatVariants.java +++ b/common/src/main/java/com/copycatsplus/copycats/CCCatVariants.java @@ -1,7 +1,7 @@ package com.copycatsplus.copycats; -import com.simibubi.create.foundation.utility.Pair; import dev.architectury.injectables.annotations.ExpectPlatform; +import net.createmod.catnip.data.Pair; import net.minecraft.core.Holder; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; diff --git a/common/src/main/java/com/copycatsplus/copycats/CCCreativeTabs.java b/common/src/main/java/com/copycatsplus/copycats/CCCreativeTabs.java index 9a0eecdb7..c48cf516d 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CCCreativeTabs.java +++ b/common/src/main/java/com/copycatsplus/copycats/CCCreativeTabs.java @@ -3,15 +3,22 @@ import com.copycatsplus.copycats.config.FeatureToggle; import com.tterrag.registrate.util.entry.ItemProviderEntry; import dev.architectury.injectables.annotations.ExpectPlatform; +import it.unimi.dsi.fastutil.objects.ReferenceArrayList; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceKey; -import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.flag.FeatureElement; +import net.minecraft.world.item.*; +import net.neoforged.neoforge.registries.DeferredHolder; import org.jetbrains.annotations.NotNull; +import java.util.LinkedList; import java.util.List; +import java.util.Map; +import java.util.function.Supplier; public class CCCreativeTabs { - public static final List> DECORATIVE = List.of( + public static final List<@NotNull ItemProviderEntry> DECORATIVE = List.of( /* Vanilla blocks */ CCBlocks.COPYCAT_BLOCK, CCBlocks.COPYCAT_SLAB, @@ -46,7 +53,7 @@ public class CCCreativeTabs { CCBlocks.COPYCAT_SLOPE_LAYER ); - public static final List> FUNCTIONAL = List.of( + public static final List> FUNCTIONAL = List.of( /* Vanilla */ CCBlocks.COPYCAT_DOOR, CCBlocks.COPYCAT_IRON_DOOR, @@ -72,7 +79,7 @@ public class CCCreativeTabs { @ExpectPlatform public static void setCreativeTab() { - + throw new AssertionError(); } @ExpectPlatform @@ -95,16 +102,84 @@ public static ResourceKey getFunctionalTabKey() { throw new AssertionError(); } + public record AdvancedDisplayGenerator( + List> items, + Supplier currentTab) implements CreativeModeTab.DisplayItemsGenerator { + + private List makeOrderings() { + List orderings = new ReferenceArrayList<>(); + + Map, ItemProviderEntry> simpleBeforeOrderings = Map.of( + CCBlocks.COPYCAT_WOODEN_BUTTON, CCBlocks.COPYCAT_STONE_BUTTON, + CCBlocks.COPYCAT_WOODEN_PRESSURE_PLATE, CCBlocks.COPYCAT_STONE_PRESSURE_PLATE, + CCBlocks.COPYCAT_LIGHT_WEIGHTED_PRESSURE_PLATE, CCBlocks.COPYCAT_HEAVY_WEIGHTED_PRESSURE_PLATE + ); + + Map, ItemProviderEntry> simpleAfterOrderings = Map.of( + CCBlocks.COPYCAT_IRON_TRAPDOOR, CCBlocks.COPYCAT_TRAPDOOR, + CCBlocks.COPYCAT_IRON_DOOR, CCBlocks.COPYCAT_DOOR, + CCBlocks.COPYCAT_SLIDING_DOOR, CCBlocks.COPYCAT_FOLDING_DOOR + ); + + simpleBeforeOrderings.forEach((entry, otherEntry) -> { + if (items.contains(entry) && items.contains(otherEntry)) + orderings.add(ItemOrdering.before(entry.asItem(), otherEntry.asItem())); + }); + + simpleAfterOrderings.forEach((entry, otherEntry) -> { + if (items.contains(entry) && items.contains(otherEntry)) + orderings.add(ItemOrdering.after(entry.asItem(), otherEntry.asItem())); + }); + + return orderings; + } - public record DisplayItemsGenerator( - List> items) implements CreativeModeTab.DisplayItemsGenerator { @Override - public void accept(@NotNull CreativeModeTab.ItemDisplayParameters params, @NotNull CreativeModeTab.Output output) { - for (ItemProviderEntry item : items) { - if (FeatureToggle.isEnabled(item.getId())) { + public void accept(CreativeModeTab.ItemDisplayParameters parameters, CreativeModeTab.Output output) { + List orderings = makeOrderings(); + + List itemList = new LinkedList<>(items.stream().map(ItemProviderEntry::asItem).toList()); + applyOrderings(itemList, orderings); + for (Item item : itemList) { + if (FeatureToggle.isEnabled(BuiltInRegistries.ITEM.getKey(item))) output.accept(item); + } + } + + private static void applyOrderings(List items, List orderings) { + for (ItemOrdering ordering : orderings) { + int anchorIndex = items.indexOf(ordering.anchor()); + if (anchorIndex != -1) { + Item item = ordering.item(); + int itemIndex = items.indexOf(item); + if (itemIndex != -1) { + items.remove(itemIndex); + if (itemIndex < anchorIndex) { + anchorIndex--; + } + } + if (ordering.type() == ItemOrdering.Type.AFTER) { + items.add(anchorIndex + 1, item); + } else { + items.add(anchorIndex, item); + } } } } + + private record ItemOrdering(Item item, Item anchor, Type type) { + public static ItemOrdering before(Item item, Item anchor) { + return new ItemOrdering(item, anchor, Type.BEFORE); + } + + public static ItemOrdering after(Item item, Item anchor) { + return new ItemOrdering(item, anchor, Type.AFTER); + } + + public enum Type { + BEFORE, + AFTER; + } + } } } diff --git a/common/src/main/java/com/copycatsplus/copycats/CCItems.java b/common/src/main/java/com/copycatsplus/copycats/CCItems.java index 3d3007041..834e6f2f1 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CCItems.java +++ b/common/src/main/java/com/copycatsplus/copycats/CCItems.java @@ -6,11 +6,12 @@ import com.copycatsplus.copycats.foundation.tooltip.CopycatCharacteristics; import com.copycatsplus.copycats.foundation.tooltip.CopycatDescription; import com.simibubi.create.foundation.data.AssetLookup; +import com.simibubi.create.foundation.data.CreateRegistrate; import com.tterrag.registrate.util.entry.ItemEntry; public class CCItems { - private static final CopycatRegistrate REGISTRATE = Copycats.getRegistrate(); + private static final CreateRegistrate REGISTRATE = Copycats.getRegistrate(); public static final ItemEntry COPYCAT_BOX = diff --git a/common/src/main/java/com/copycatsplus/copycats/CCKeys.java b/common/src/main/java/com/copycatsplus/copycats/CCKeys.java index be46571dc..8421c3c6e 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CCKeys.java +++ b/common/src/main/java/com/copycatsplus/copycats/CCKeys.java @@ -2,7 +2,6 @@ import com.mojang.blaze3d.platform.InputConstants; import dev.architectury.injectables.annotations.ExpectPlatform; -import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; @@ -41,11 +40,6 @@ public String getBoundKey() { .toUpperCase(); } - public int getBoundCode() { - return KeyBindingHelper.getBoundKeyOf(keybind) - .getValue(); - } - public static boolean isKeyDown(int key) { return InputConstants.isKeyDown(Minecraft.getInstance() .getWindow() diff --git a/common/src/main/java/com/copycatsplus/copycats/CCLang.java b/common/src/main/java/com/copycatsplus/copycats/CCLang.java index d36e2b5d1..a7ccc7f3b 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CCLang.java +++ b/common/src/main/java/com/copycatsplus/copycats/CCLang.java @@ -1,8 +1,7 @@ package com.copycatsplus.copycats; -import com.simibubi.create.foundation.utility.Components; -import com.simibubi.create.foundation.utility.LangBuilder; -import com.simibubi.create.foundation.utility.LangNumberFormat; +import net.createmod.catnip.lang.LangBuilder; +import net.createmod.catnip.lang.LangNumberFormat; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.world.item.ItemStack; @@ -17,7 +16,7 @@ public class CCLang { * legacy-ish. Use Lang.translate and other builder methods where possible */ public static MutableComponent translateDirect(String key, Object... args) { - return Components.translatable(Copycats.MODID + "." + key, resolveBuilders(args)); + return Component.translatable(Copycats.MODID + "." + key, resolveBuilders(args)); } public static String asId(String name) { diff --git a/common/src/main/java/com/copycatsplus/copycats/CCShapes.java b/common/src/main/java/com/copycatsplus/copycats/CCShapes.java index 60d3ed1ed..52fd07d51 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CCShapes.java +++ b/common/src/main/java/com/copycatsplus/copycats/CCShapes.java @@ -4,15 +4,13 @@ import com.copycatsplus.copycats.CCBlockStateProperties.VerticalStairShape; import com.copycatsplus.copycats.content.copycat.half_layer.CopycatHalfLayerBlock; import com.copycatsplus.copycats.content.copycat.half_panel.CopycatHalfPanelBlock; -import com.copycatsplus.copycats.content.copycat.stacked_half_layer.CopycatStackedHalfLayerBlock; -import com.copycatsplus.copycats.content.copycat.vertical_half_layer.CopycatVerticalHalfLayerBlock; import com.copycatsplus.copycats.content.copycat.vertical_stairs.CopycatVerticalStairBlock; import com.copycatsplus.copycats.foundation.copycat.model.assembly.AssemblyTransform; import com.copycatsplus.copycats.foundation.copycat.model.assembly.MutableAABB; import com.copycatsplus.copycats.foundation.copycat.model.assembly.MutableVec3; +import com.copycatsplus.copycats.utility.TriFunction; import com.copycatsplus.copycats.utility.shape.OutlinedVoxelShape; -import com.simibubi.create.foundation.utility.Pair; -import com.tterrag.registrate.fabric.TriFunction; +import net.createmod.catnip.data.Pair; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; import net.minecraft.world.level.block.state.properties.Half; @@ -149,7 +147,7 @@ public class CCShapes { public static final Map> SLOPE = forHorizontalDirections(forHalves(shape( IntStream.range(0, SLOPE_SUBDIVISIONS) - .mapToObj(i -> aabb(16, i + 1, 16.0 / SLOPE_SUBDIVISIONS).move(0, 0, i * 16.0 / SLOPE_SUBDIVISIONS)) + .mapToObj(i -> aabb(16, (i + 1.0) / SLOPE_SUBDIVISIONS * 16.0, 16.0 / SLOPE_SUBDIVISIONS).move(0, 0, i * 16.0 / SLOPE_SUBDIVISIONS)) .toArray(MutableAABB[]::new) ).outline( line(vec3(0, 0, 0), vec3(16, 0, 0)), @@ -165,7 +163,7 @@ public class CCShapes { public static final Map VERTICAL_SLOPE = forHorizontalDirections(shape( IntStream.range(0, SLOPE_SUBDIVISIONS) - .mapToObj(i -> aabb(i + 1, 16, 16.0 / SLOPE_SUBDIVISIONS).move(15 - i, 0, i * 16.0 / SLOPE_SUBDIVISIONS)) + .mapToObj(i -> aabb((i + 1.0) / SLOPE_SUBDIVISIONS * 16.0, 16, 16.0 / SLOPE_SUBDIVISIONS).move(15 - i * 16.0 / SLOPE_SUBDIVISIONS, 0, i * 16.0 / SLOPE_SUBDIVISIONS)) .toArray(MutableAABB[]::new) ).outline( line(vec3(0, 0, 16), vec3(16, 0, 16)), @@ -183,7 +181,7 @@ public class CCShapes { layer -> layer <= 4 ? shape( IntStream.range(0, SLOPE_SUBDIVISIONS) - .mapToObj(i -> aabb(16, (i + 1) * layer / 4.0, 16.0 / SLOPE_SUBDIVISIONS).move(0, 0, i * 16.0 / SLOPE_SUBDIVISIONS)) + .mapToObj(i -> aabb(16, (i + 1.0) / SLOPE_SUBDIVISIONS * 16 * layer / 4.0, 16.0 / SLOPE_SUBDIVISIONS).move(0, 0, i * 16.0 / SLOPE_SUBDIVISIONS)) .toArray(MutableAABB[]::new) ).outline( line(vec3(0, 0, 0), vec3(16, 0, 0)), @@ -198,7 +196,7 @@ public class CCShapes { ) : shape( IntStream.range(0, SLOPE_SUBDIVISIONS) - .mapToObj(i -> aabb(16, 16 * (layer - 4) / 4.0 + (i + 1) * (1 - (layer - 4) / 4.0), 16.0 / SLOPE_SUBDIVISIONS).move(0, 0, i * 16.0 / SLOPE_SUBDIVISIONS)) + .mapToObj(i -> aabb(16, 16 * (layer - 4) / 4.0 + (i + 1.0) / SLOPE_SUBDIVISIONS * 16 * (1 - (layer - 4) / 4.0), 16.0 / SLOPE_SUBDIVISIONS).move(0, 0, i * 16.0 / SLOPE_SUBDIVISIONS)) .toArray(MutableAABB[]::new) ).outline( line(vec3(0, 0, 0), vec3(16, 0, 0)), diff --git a/common/src/main/java/com/copycatsplus/copycats/CCTags.java b/common/src/main/java/com/copycatsplus/copycats/CCTags.java index feecf2afe..54ca5e9cb 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CCTags.java +++ b/common/src/main/java/com/copycatsplus/copycats/CCTags.java @@ -18,7 +18,7 @@ public static TagKey optionalTag(Registry registry, ResourceLocation i } public static TagKey commonTag(Registry registry, String path) { - return optionalTag(registry, new ResourceLocation((Platform.getCurrent().equals(Platform.FORGE) ? "forge" : "c"), path)); + return optionalTag(registry, ResourceLocation.fromNamespaceAndPath("c", path)); } public static TagKey commonBlockTag(String path) { @@ -87,7 +87,7 @@ public enum Items { } Items(NameSpace namespace, String path, boolean optional, boolean alwaysDatagen) { - ResourceLocation id = new ResourceLocation(namespace.id, path == null ? CCLang.asId(name()) : path); + ResourceLocation id = ResourceLocation.fromNamespaceAndPath(namespace.id, path == null ? CCLang.asId(name()) : path); if (optional) { tag = optionalTag(BuiltInRegistries.ITEM, id); } else { diff --git a/common/src/main/java/com/copycatsplus/copycats/CopycatRegistrate.java b/common/src/main/java/com/copycatsplus/copycats/CopycatRegistrate.java deleted file mode 100644 index 4f5bd3c58..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/CopycatRegistrate.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.copycatsplus.copycats; - -import com.simibubi.create.foundation.data.CreateRegistrate; -import dev.architectury.injectables.annotations.ExpectPlatform; - -public class CopycatRegistrate extends CreateRegistrate { - - private static CopycatRegistrate instance; - protected CopycatRegistrate(String modid) { - super(modid); - instance = this; - } - - public static CopycatRegistrate create(String modid) { - return new CopycatRegistrate(modid); - } - - @ExpectPlatform - public static CreateRegistrate setTab(Tab tab) { - throw new AssertionError(); - } - - public static CopycatRegistrate getInstance() { - return instance; - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/Copycats.java b/common/src/main/java/com/copycatsplus/copycats/Copycats.java index 2ba36ecce..c48fa209f 100644 --- a/common/src/main/java/com/copycatsplus/copycats/Copycats.java +++ b/common/src/main/java/com/copycatsplus/copycats/Copycats.java @@ -5,16 +5,21 @@ import com.copycatsplus.copycats.foundation.tooltip.CopycatDescription; import com.copycatsplus.copycats.network.CCPackets; import com.copycatsplus.copycats.utility.TooltipUtils; +import com.simibubi.create.foundation.data.CreateRegistrate; import com.simibubi.create.foundation.item.ItemDescription; import com.simibubi.create.foundation.item.KineticStats; -import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.item.TooltipModifier; -import dev.architectury.injectables.annotations.ExpectPlatform; +import net.createmod.catnip.lang.FontHelper; +import net.minecraft.core.HolderLookup; import net.minecraft.data.DataGenerator; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.CreativeModeTab; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.concurrent.CompletableFuture; + public class Copycats { public static final String MODID = "copycats"; /** @@ -25,20 +30,15 @@ public class Copycats { public static final int DATA_FIXER_VERSION = 1; public static final Logger LOGGER = LoggerFactory.getLogger("Copycats+"); - private static final CopycatRegistrate REGISTRATE = CopycatRegistrate.create(MODID); - - static { - REGISTRATE.setTooltipModifierFactory(item -> TooltipUtils.sequential( - CopycatDescription.create(item), - new ItemDescription.Modifier(item, TooltipHelper.Palette.STANDARD_CREATE), - TooltipModifier.mapNull(KineticStats.create(item))) - ); - } + private static final CreateRegistrate REGISTRATE = CreateRegistrate.create(MODID) + .defaultCreativeTab((ResourceKey) null) + .setTooltipModifierFactory(item -> TooltipUtils.sequential( + CopycatDescription.create(item), + new ItemDescription.Modifier(item, FontHelper.Palette.STANDARD_CREATE), + TooltipModifier.mapNull(KineticStats.create(item))) + ); public static void init() { - - CCCreativeTabs.setCreativeTab(); - CCBlocks.register(); CCBlockEntityTypes.register(); CCCatVariants.register(); @@ -46,26 +46,18 @@ public static void init() { CCConfigs.register(); - CCPackets.PACKETS.registerC2SListener(); - - finalizeRegistrate(); + CCPackets.register(); } - public static void gatherData(DataGenerator.PackGenerator gen) { - gen.addProvider(CCStandardRecipes::new); + public static void gatherData(DataGenerator.PackGenerator gen, CompletableFuture lookupProvider) { + gen.addProvider(output -> new CCStandardRecipes(output, lookupProvider)); } - public static CopycatRegistrate getRegistrate() { + public static CreateRegistrate getRegistrate() { return REGISTRATE; } public static ResourceLocation asResource(String path) { - return new ResourceLocation(MODID, path); - } - - @ExpectPlatform - public static void finalizeRegistrate() { - throw new AssertionError(); + return ResourceLocation.fromNamespaceAndPath(MODID, path); } - } diff --git a/common/src/main/java/com/copycatsplus/copycats/CopycatsClient.java b/common/src/main/java/com/copycatsplus/copycats/CopycatsClient.java index 5d66e3287..bdbe4fd3e 100644 --- a/common/src/main/java/com/copycatsplus/copycats/CopycatsClient.java +++ b/common/src/main/java/com/copycatsplus/copycats/CopycatsClient.java @@ -3,7 +3,7 @@ import com.copycatsplus.copycats.foundation.copycat.model.kinetic.KineticCopycatRenderer; import com.copycatsplus.copycats.utility.LogicalSidedProvider; import com.copycatsplus.copycats.network.CCPackets; -import com.simibubi.create.foundation.render.SuperByteBufferCache; +import net.createmod.catnip.render.SuperByteBufferCache; import net.minecraft.client.Minecraft; public class CopycatsClient { @@ -12,9 +12,9 @@ public class CopycatsClient { public static void init() { LogicalSidedProvider.setClient(Minecraft::getInstance); - CCPackets.PACKETS.registerS2CListener(); CCKeys.register(); BUFFER_CACHE.registerCompartment(KineticCopycatRenderer.KINETIC_COPYCAT, 60); + } public static void invalidateCaches() { diff --git a/common/src/main/java/com/copycatsplus/copycats/compat/FlywheelCompat.java b/common/src/main/java/com/copycatsplus/copycats/compat/FlywheelCompat.java deleted file mode 100644 index f4842e8c4..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/compat/FlywheelCompat.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.copycatsplus.copycats.compat; - -import com.jozufozu.flywheel.core.virtual.VirtualChunk; -import net.minecraft.world.level.BlockGetter; - -public class FlywheelCompat { - public static BlockGetter unwrapFlywheelLevel(BlockGetter level) { - if (level instanceof VirtualChunk chunk) { - return chunk.world; - } - return level; - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/compat/Mods.java b/common/src/main/java/com/copycatsplus/copycats/compat/Mods.java index 9f305e143..184dc2476 100644 --- a/common/src/main/java/com/copycatsplus/copycats/compat/Mods.java +++ b/common/src/main/java/com/copycatsplus/copycats/compat/Mods.java @@ -21,6 +21,7 @@ public enum Mods { * For the feature toggle system */ JEI("jei"), + EMI("emi"), CREATE("create"), /** * For copycat fence compatibility (only prevents crash) diff --git a/common/src/main/java/com/copycatsplus/copycats/compat/SodiumCompat.java b/common/src/main/java/com/copycatsplus/copycats/compat/SodiumCompat.java deleted file mode 100644 index ba5dd7b2d..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/compat/SodiumCompat.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.copycatsplus.copycats.compat; - -import me.jellysquid.mods.sodium.client.world.WorldSlice; -import net.minecraft.world.level.BlockGetter; - -public class SodiumCompat { - public static BlockGetter unwrapSodiumLevel(BlockGetter level) { - if (level instanceof WorldSlice slice) { - return slice.world; - } - return level; - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/compat/recipe_viewers/CopycatsEMI.java b/common/src/main/java/com/copycatsplus/copycats/compat/recipe_viewers/CopycatsEMI.java new file mode 100644 index 000000000..4b2f2edbd --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/compat/recipe_viewers/CopycatsEMI.java @@ -0,0 +1,48 @@ +package com.copycatsplus.copycats.compat.recipe_viewers; + +import com.copycatsplus.copycats.CCCreativeTabs; +import com.copycatsplus.copycats.config.FeatureToggle; +import com.tterrag.registrate.util.entry.ItemProviderEntry; + +import dev.emi.emi.api.EmiApi; +import dev.emi.emi.api.EmiEntrypoint; +import dev.emi.emi.api.EmiPlugin; +import dev.emi.emi.api.EmiRegistry; +import dev.emi.emi.api.stack.EmiStack; +import dev.emi.emi.registry.EmiStackList; + +@EmiEntrypoint +public class CopycatsEMI implements EmiPlugin { + + public static EmiRegistry REGISTRY; + + @Override + public void register(EmiRegistry emiRegistry) { + REGISTRY = emiRegistry; + } + + //Currently doesn't refresh. But does update on world join but now at least the stacks vanish whereas before this plugin they didnt + public static void refreshItemList() { + if (REGISTRY != null) { + CCCreativeTabs.DECORATIVE.stream() + .map(ItemProviderEntry::asStack) + .map(EmiStack::of) + .forEach(REGISTRY::removeEmiStacks); + CCCreativeTabs.FUNCTIONAL.stream() + .map(ItemProviderEntry::asStack) + .map(EmiStack::of) + .forEach(REGISTRY::removeEmiStacks); + + CCCreativeTabs.DECORATIVE.stream() + .filter(x -> FeatureToggle.isEnabled(x.getId())) + .map(ItemProviderEntry::asStack) + .map(EmiStack::of) + .forEach(REGISTRY::addEmiStack); + CCCreativeTabs.FUNCTIONAL.stream() + .filter(x -> FeatureToggle.isEnabled(x.getId())) + .map(ItemProviderEntry::asStack) + .map(EmiStack::of) + .forEach(REGISTRY::addEmiStack); + } + } +} diff --git a/common/src/main/java/com/copycatsplus/copycats/compat/CopycatsJEI.java b/common/src/main/java/com/copycatsplus/copycats/compat/recipe_viewers/CopycatsJEI.java similarity index 97% rename from common/src/main/java/com/copycatsplus/copycats/compat/CopycatsJEI.java rename to common/src/main/java/com/copycatsplus/copycats/compat/recipe_viewers/CopycatsJEI.java index 3b3aab941..cf6ea61b9 100644 --- a/common/src/main/java/com/copycatsplus/copycats/compat/CopycatsJEI.java +++ b/common/src/main/java/com/copycatsplus/copycats/compat/recipe_viewers/CopycatsJEI.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.compat; +package com.copycatsplus.copycats.compat.recipe_viewers; import com.copycatsplus.copycats.CCCreativeTabs; import com.copycatsplus.copycats.Copycats; diff --git a/common/src/main/java/com/copycatsplus/copycats/config/CCConfigs.java b/common/src/main/java/com/copycatsplus/copycats/config/CCConfigs.java index 6366bd3e2..7626e848a 100644 --- a/common/src/main/java/com/copycatsplus/copycats/config/CCConfigs.java +++ b/common/src/main/java/com/copycatsplus/copycats/config/CCConfigs.java @@ -1,8 +1,9 @@ package com.copycatsplus.copycats.config; import dev.architectury.injectables.annotations.ExpectPlatform; -import net.minecraftforge.common.ForgeConfigSpec; -import net.minecraftforge.fml.config.ModConfig; +import net.createmod.catnip.config.ConfigBase; +import net.neoforged.fml.config.ModConfig; +import net.neoforged.neoforge.common.ModConfigSpec; import org.apache.commons.lang3.tuple.Pair; import java.util.EnumMap; @@ -12,10 +13,11 @@ @SuppressWarnings("unused") public class CCConfigs { - public static final Map CONFIGS = new EnumMap<>(ModConfig.Type.class); + public static final Map CONFIGS = new EnumMap<>(ModConfig.Type.class); protected static CClient client; protected static CCommon common; + protected static CServer server; public static CClient client() { return client; @@ -25,6 +27,10 @@ public static CCommon common() { return common; } + public static CServer server() { + return server; + } + public static Supplier safeGetter(Supplier getter, T defaultValue) { return () -> { try { @@ -36,12 +42,12 @@ public static Supplier safeGetter(Supplier getter, T defaultValue) { }; } - public static SyncConfigBase byType(ModConfig.Type type) { + public static ConfigBase byType(ModConfig.Type type) { return CONFIGS.get(type); } - public static T register(Supplier factory, ModConfig.Type side) { - Pair specPair = new ForgeConfigSpec.Builder().configure(builder -> { + public static T register(Supplier factory, ModConfig.Type side) { + Pair specPair = new ModConfigSpec.Builder().configure(builder -> { T config = factory.get(); config.registerAll(builder); return config; diff --git a/common/src/main/java/com/copycatsplus/copycats/config/CClient.java b/common/src/main/java/com/copycatsplus/copycats/config/CClient.java index e3a88eaf0..370a7aa50 100644 --- a/common/src/main/java/com/copycatsplus/copycats/config/CClient.java +++ b/common/src/main/java/com/copycatsplus/copycats/config/CClient.java @@ -1,17 +1,12 @@ package com.copycatsplus.copycats.config; -import net.minecraftforge.fml.config.ModConfig; +import net.createmod.catnip.config.ConfigBase; +import org.jetbrains.annotations.NotNull; -//Should never be synced just did it to allow registration -public class CClient extends SyncConfigBase { +public class CClient extends ConfigBase { @Override - protected ModConfig.Type type() { - return ModConfig.Type.CLIENT; - } - - @Override - public String getName() { + public @NotNull String getName() { return "client"; } diff --git a/common/src/main/java/com/copycatsplus/copycats/config/CCommon.java b/common/src/main/java/com/copycatsplus/copycats/config/CCommon.java index 4d4cc0b98..f59f65313 100644 --- a/common/src/main/java/com/copycatsplus/copycats/config/CCommon.java +++ b/common/src/main/java/com/copycatsplus/copycats/config/CCommon.java @@ -1,6 +1,6 @@ package com.copycatsplus.copycats.config; -import net.minecraftforge.fml.config.ModConfig; +import net.neoforged.fml.config.ModConfig; public class CCommon extends SyncConfigBase { private static final String VERSION = "1.0.0"; diff --git a/common/src/main/java/com/copycatsplus/copycats/config/CFeatureCategories.java b/common/src/main/java/com/copycatsplus/copycats/config/CFeatureCategories.java index df235cf9b..096d87b58 100644 --- a/common/src/main/java/com/copycatsplus/copycats/config/CFeatureCategories.java +++ b/common/src/main/java/com/copycatsplus/copycats/config/CFeatureCategories.java @@ -1,8 +1,8 @@ package com.copycatsplus.copycats.config; import net.minecraft.nbt.CompoundTag; -import net.minecraftforge.common.ForgeConfigSpec; -import net.minecraftforge.fml.config.ModConfig; +import net.neoforged.fml.config.ModConfig; +import net.neoforged.neoforge.common.ModConfigSpec; import org.jetbrains.annotations.ApiStatus; import java.util.HashMap; @@ -19,12 +19,12 @@ public String getName() { return "feature_categories"; } - final Map> toggles = new HashMap<>(); + final Map> toggles = new HashMap<>(); Map synchronizedToggles; @Override - public void registerAll(ForgeConfigSpec.Builder builder) { + public void registerAll(ModConfigSpec.Builder builder) { for (FeatureCategory r : FeatureCategory.values()) { builder.comment(".", r.getDescription()); toggles.put(r, builder.define(r.getSerializedName(), true)); @@ -37,7 +37,7 @@ public boolean isEnabled(FeatureCategory category) { Boolean synced = synchronizedToggles.get(category); if (synced != null) return synced; } - ForgeConfigSpec.ConfigValue value = toggles.get(category); + ModConfigSpec.ConfigValue value = toggles.get(category); if (value != null) return value.get(); return true; diff --git a/common/src/main/java/com/copycatsplus/copycats/config/CFeatures.java b/common/src/main/java/com/copycatsplus/copycats/config/CFeatures.java index c3af40034..137b081ce 100644 --- a/common/src/main/java/com/copycatsplus/copycats/config/CFeatures.java +++ b/common/src/main/java/com/copycatsplus/copycats/config/CFeatures.java @@ -2,8 +2,8 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.common.ForgeConfigSpec; -import net.minecraftforge.fml.config.ModConfig; +import net.neoforged.fml.config.ModConfig; +import net.neoforged.neoforge.common.ModConfigSpec; import org.jetbrains.annotations.ApiStatus; import java.util.HashMap; @@ -20,12 +20,12 @@ public String getName() { return "features"; } - final Map> toggles = new HashMap<>(); + final Map> toggles = new HashMap<>(); Map synchronizedToggles; @Override - public void registerAll(ForgeConfigSpec.Builder builder) { + public void registerAll(ModConfigSpec.Builder builder) { FeatureToggle.TOGGLEABLE_FEATURES.forEach((r) -> toggles.put(r, builder.define(r.getPath(), true))); } @@ -40,7 +40,7 @@ public boolean isEnabled(ResourceLocation key) { Boolean synced = synchronizedToggles.get(key); if (synced != null) return synced; } - ForgeConfigSpec.ConfigValue value = toggles.get(key); + ModConfigSpec.ConfigValue value = toggles.get(key); if (value != null) return value.get(); return true; @@ -62,7 +62,7 @@ public void onReload() { protected void readSyncConfig(CompoundTag nbt) { synchronizedToggles = new HashMap<>(); for (String key : nbt.getAllKeys()) { - ResourceLocation location = new ResourceLocation(key); + ResourceLocation location = ResourceLocation.parse(key); synchronizedToggles.put(location, nbt.getBoolean(key)); } FeatureToggle.refreshItemVisibility(); diff --git a/common/src/main/java/com/copycatsplus/copycats/config/CServer.java b/common/src/main/java/com/copycatsplus/copycats/config/CServer.java new file mode 100644 index 000000000..b69d018f8 --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/config/CServer.java @@ -0,0 +1,20 @@ +package com.copycatsplus.copycats.config; + +import net.createmod.catnip.config.ConfigBase; +import org.jetbrains.annotations.NotNull; + +public class CServer extends ConfigBase { + public final CStress stress; + + public CServer() { + this.stress = this.nested(0, CStress::new, new String[]{Comments.stress}); + } + + public @NotNull String getName() { + return "server"; + } + + private static class Comments { + static String stress = "Fine tune the kinetic stats of individual components"; + } +} diff --git a/common/src/main/java/com/copycatsplus/copycats/config/CStress.java b/common/src/main/java/com/copycatsplus/copycats/config/CStress.java new file mode 100644 index 000000000..5d2b81966 --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/config/CStress.java @@ -0,0 +1,105 @@ +package com.copycatsplus.copycats.config; + +import com.copycatsplus.copycats.Copycats; +import com.simibubi.create.Create; +import com.tterrag.registrate.builders.BlockBuilder; +import com.tterrag.registrate.util.nullness.NonNullUnaryOperator; +import it.unimi.dsi.fastutil.objects.Object2DoubleMap; +import it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap; +import net.createmod.catnip.config.ConfigBase; +import net.createmod.catnip.platform.CatnipServices; +import net.createmod.catnip.registry.RegisteredObjectsHelper; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.neoforged.neoforge.common.ModConfigSpec; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.DoubleSupplier; + +public class CStress extends ConfigBase { + private static final int VERSION = 1; + private static final Object2DoubleMap DEFAULT_IMPACTS = new Object2DoubleOpenHashMap<>(); + private static final Object2DoubleMap DEFAULT_CAPACITIES = new Object2DoubleOpenHashMap<>(); + protected final Map> capacities = new HashMap<>(); + protected final Map> impacts = new HashMap<>(); + + public void registerAll(ModConfigSpec.Builder builder) { + builder.comment(new String[]{".", Comments.su, Comments.impact}).push("impact"); + DEFAULT_IMPACTS.forEach((id, value) -> this.impacts.put(id, builder.define(id.getPath(), value))); + builder.pop(); + builder.comment(new String[]{".", Comments.su, Comments.capacity}).push("capacity"); + DEFAULT_CAPACITIES.forEach((id, value) -> this.capacities.put(id, builder.define(id.getPath(), value))); + builder.pop(); + } + + public @NotNull String getName() { + return "stressValues.v" + VERSION; + } + + public @Nullable DoubleSupplier getImpact(Block block) { + ResourceLocation id = RegisteredObjectsHelper.getKeyOrThrow(block); + ModConfigSpec.ConfigValue value = this.impacts.get(id); + DoubleSupplier impactSupplier; + if (value == null) { + impactSupplier = null; + } else { + Objects.requireNonNull(value); + impactSupplier = value::get; + } + + return impactSupplier; + } + + public @Nullable DoubleSupplier getCapacity(Block block) { + ResourceLocation id = RegisteredObjectsHelper.getKeyOrThrow(block); + ModConfigSpec.ConfigValue value = this.capacities.get(id); + DoubleSupplier capacitySupplier; + if (value == null) { + capacitySupplier = null; + } else { + Objects.requireNonNull(value); + capacitySupplier = value::get; + } + + return capacitySupplier; + } + + public static NonNullUnaryOperator> setNoImpact() { + return setImpact(0.0); + } + + public static NonNullUnaryOperator> setImpact(double value) { + return (builder) -> { + assertFromCreate(builder); + ResourceLocation id = Create.asResource(builder.getName()); + DEFAULT_IMPACTS.put(id, value); + return builder; + }; + } + + public static NonNullUnaryOperator> setCapacity(double value) { + return (builder) -> { + assertFromCreate(builder); + ResourceLocation id = Create.asResource(builder.getName()); + DEFAULT_CAPACITIES.put(id, value); + return builder; + }; + } + + private static void assertFromCreate(BlockBuilder builder) { + if (!builder.getOwner().getModid().equals(Copycats.MODID)) { + throw new IllegalStateException("Non-Copycats+ blocks cannot be added to Copycats+ config."); + } + } + + private static class Comments { + static String su = "[in Stress Units]"; + static String impact = "Configure the individual stress impact of mechanical blocks. Note that this cost is doubled for every speed increase it receives."; + static String capacity = "Configure how much stress a source can accommodate for."; + } +} + diff --git a/common/src/main/java/com/copycatsplus/copycats/config/FeatureToggle.java b/common/src/main/java/com/copycatsplus/copycats/config/FeatureToggle.java index 9544db376..ce149ef75 100644 --- a/common/src/main/java/com/copycatsplus/copycats/config/FeatureToggle.java +++ b/common/src/main/java/com/copycatsplus/copycats/config/FeatureToggle.java @@ -1,6 +1,7 @@ package com.copycatsplus.copycats.config; -import com.copycatsplus.copycats.compat.CopycatsJEI; +import com.copycatsplus.copycats.compat.recipe_viewers.CopycatsEMI; +import com.copycatsplus.copycats.compat.recipe_viewers.CopycatsJEI; import com.copycatsplus.copycats.compat.Mods; import com.copycatsplus.copycats.mixin.feature_toggle.CreativeModeTabsAccessor; import com.copycatsplus.copycats.utility.LogicalSidedProvider; @@ -44,7 +45,7 @@ public static void registerDependent(ResourceLocation key, ResourceLocation depe */ public static > NonNullUnaryOperator register() { return b -> { - register(new ResourceLocation(b.getOwner().getModid(), b.getName())); + register(ResourceLocation.fromNamespaceAndPath(b.getOwner().getModid(), b.getName())); return b; }; } @@ -54,7 +55,7 @@ public static > NonNullUnaryOpe */ public static > NonNullUnaryOperator register(FeatureCategory... categories) { return b -> { - register(new ResourceLocation(b.getOwner().getModid(), b.getName()), categories); + register(ResourceLocation.fromNamespaceAndPath(b.getOwner().getModid(), b.getName()), categories); return b; }; } @@ -65,7 +66,7 @@ public static > NonNullUnaryOpe */ public static > NonNullUnaryOperator registerDependent(ResourceLocation dependency) { return b -> { - registerDependent(new ResourceLocation(b.getOwner().getModid(), b.getName()), dependency); + registerDependent(ResourceLocation.fromNamespaceAndPath(b.getOwner().getModid(), b.getName()), dependency); return b; }; } @@ -76,7 +77,7 @@ public static > NonNullUnaryOpe */ public static > NonNullUnaryOperator registerDependent(ResourceLocation dependency, FeatureCategory... categories) { return b -> { - registerDependent(new ResourceLocation(b.getOwner().getModid(), b.getName()), dependency, categories); + registerDependent(ResourceLocation.fromNamespaceAndPath(b.getOwner().getModid(), b.getName()), dependency, categories); return b; }; } @@ -87,7 +88,7 @@ public static > NonNullUnaryOpe */ public static > NonNullUnaryOperator registerDependent(BlockEntry dependency) { return b -> { - registerDependent(new ResourceLocation(b.getOwner().getModid(), b.getName()), dependency.getId()); + registerDependent(ResourceLocation.fromNamespaceAndPath(b.getOwner().getModid(), b.getName()), dependency.getId()); return b; }; } @@ -98,7 +99,7 @@ public static > NonNullUnaryOpe */ public static > NonNullUnaryOperator registerDependent(BlockEntry dependency, FeatureCategory... categories) { return b -> { - registerDependent(new ResourceLocation(b.getOwner().getModid(), b.getName()), dependency.getId(), categories); + registerDependent(ResourceLocation.fromNamespaceAndPath(b.getOwner().getModid(), b.getName()), dependency.getId(), categories); return b; }; } @@ -145,6 +146,7 @@ static void refreshItemVisibility() { CreativeModeTabsAccessor.callBuildAllTabContents(cachedParameters); } Mods.JEI.executeIfInstalled(() -> CopycatsJEI::refreshItemList); + Mods.EMI.executeIfInstalled(() -> CopycatsEMI::refreshItemList); }) ); } diff --git a/common/src/main/java/com/copycatsplus/copycats/config/SyncConfigBase.java b/common/src/main/java/com/copycatsplus/copycats/config/SyncConfigBase.java index 723143ffa..976fd194e 100644 --- a/common/src/main/java/com/copycatsplus/copycats/config/SyncConfigBase.java +++ b/common/src/main/java/com/copycatsplus/copycats/config/SyncConfigBase.java @@ -1,12 +1,18 @@ package com.copycatsplus.copycats.config; -import com.simibubi.create.foundation.config.ConfigBase; +import com.copycatsplus.copycats.Copycats; +import com.copycatsplus.copycats.network.CCPackets; +import com.copycatsplus.copycats.network.ConfigSyncPacket; +import net.createmod.catnip.config.ConfigBase; import net.minecraft.nbt.CompoundTag; -import net.minecraftforge.fml.config.ModConfig; +import net.minecraft.server.level.ServerPlayer; +import net.neoforged.fml.config.ModConfig; /** * Base class for all configs that require custom synchronization from server to clients. */ +// TODO: clean up SyncConfigBase implementation w.r.t C:Connected's implementation +// syncToAllPlayers seems to be unused? public abstract class SyncConfigBase extends ConfigBase { public final CompoundTag getSyncConfig() { @@ -63,4 +69,9 @@ public void onReload() { super.onReload(); } + public void syncToPlayer(ServerPlayer player) { + if (player == null) return; + CCPackets.network().sendToClient(player, new ConfigSyncPacket(getSyncConfig(), type())); + Copycats.LOGGER.debug("Sync Config: Sending server config to {}", player.getName().getString()); + } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/beam/CopycatBeamBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/beam/CopycatBeamBlock.java index 8b7c42cc5..bfaf8f0c9 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/beam/CopycatBeamBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/beam/CopycatBeamBlock.java @@ -7,14 +7,15 @@ import com.copycatsplus.copycats.foundation.copycat.IStateType; import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.foundation.placement.PlacementHelpers; import com.simibubi.create.foundation.placement.PoleHelper; +import net.createmod.catnip.placement.PlacementHelpers; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Vec3i; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; @@ -54,17 +55,15 @@ public CopycatBeamBlock(Properties pProperties) { } @Override - public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @NotNull Player player, @NotNull InteractionHand hand, - @NotNull BlockHitResult ray) { - return InteractionUtils.sequential( - () -> InteractionUtils.usePlacementHelper(placementHelperId, state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> InteractionUtils.usePlacementHelper(placementHelperId, stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } - @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return switch (pType) { case LAND -> pState.getValue(AXIS).isHorizontal(); default -> false; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/block/CopycatBlockBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/block/CopycatBlockBlock.java index a88213f0c..bdfd56d0f 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/block/CopycatBlockBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/block/CopycatBlockBlock.java @@ -25,7 +25,6 @@ public CopycatBlockBlock(Properties properties) { super(properties); } - @SuppressWarnings("deprecation") @Override public @NotNull VoxelShape getShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { return Shapes.block(); @@ -49,7 +48,7 @@ public BlockState transform(BlockState state, StructureTransform transform) { } @Override - public boolean isPathfindable(BlockState pState, BlockGetter pLevel, BlockPos pPos, PathComputationType pType) { - return super.isPathfindable(pState, pLevel, pPos, pType); + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { + return super.isPathfindable(pState, pType); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoardBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoardBlock.java index 7d8d0cd99..13a277e0a 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoardBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoardBlock.java @@ -11,10 +11,11 @@ import com.copycatsplus.copycats.foundation.copycat.multistate.WaterloggedMultiStateCopycatBlock; import com.copycatsplus.copycats.utility.BlockFaceUtils; import com.google.common.collect.ImmutableMap; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -56,7 +57,7 @@ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatBoardBlock extends WaterloggedMultiStateCopycatBlock implements ICustomCTBlocking, ISpecialBlockItemRequirement { +public class CopycatBoardBlock extends WaterloggedMultiStateCopycatBlock implements ICustomCTBlocking, SpecialBlockItemRequirement { public static BooleanProperty UP = BlockStateProperties.UP; public static BooleanProperty DOWN = BlockStateProperties.DOWN; public static BooleanProperty NORTH = BlockStateProperties.NORTH; @@ -173,7 +174,7 @@ public Optional blockCTTowards(BlockAndTintGetter reader, BlockState st } @Override - public boolean isPathfindable(BlockState pState, BlockGetter pLevel, BlockPos pPos, PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return switch (pType) { case LAND -> (!pState.getValue(UP) && pState.getValue(DOWN) || pState.getValue(UP)); default -> false; @@ -288,7 +289,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) } BlockPos up = pos.relative(Direction.UP); world.setBlockAndUpdate(pos, state.setValue(byDirection(options.get(0)), false).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoardModelCore.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoardModelCore.java index 7e184e29a..c415f2ea8 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoardModelCore.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoardModelCore.java @@ -2,7 +2,7 @@ import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoxItem.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoxItem.java index ebb256efd..26ba3eaf7 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoxItem.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatBoxItem.java @@ -1,7 +1,7 @@ package com.copycatsplus.copycats.content.copycat.board; import com.copycatsplus.copycats.CCBlocks; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.entity.player.Player; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatCatwalkItem.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatCatwalkItem.java index 0fa5f23f8..c6b437d34 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatCatwalkItem.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatCatwalkItem.java @@ -1,7 +1,7 @@ package com.copycatsplus.copycats.content.copycat.board; import com.copycatsplus.copycats.CCBlocks; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.entity.player.Player; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatMultiBoardModelCore.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatMultiBoardModelCore.java index 18d247f53..c268a4e37 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatMultiBoardModelCore.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/board/CopycatMultiBoardModelCore.java @@ -3,7 +3,7 @@ import com.copycatsplus.copycats.CCBlocks; import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/button/CopycatButtonBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/button/CopycatButtonBlock.java index 922e49f35..cb4bb8349 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/button/CopycatButtonBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/button/CopycatButtonBlock.java @@ -11,17 +11,21 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.*; import net.minecraft.world.level.block.ButtonBlock; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -30,8 +34,8 @@ @MethodsReturnNonnullByDefault public class CopycatButtonBlock extends ButtonBlock implements ICopycatBlock, IBE, IStateType { - public CopycatButtonBlock(Properties properties, BlockSetType type, int ticksToStayPressed, boolean arrowsCanPress) { - super(properties, type, ticksToStayPressed, arrowsCanPress); + public CopycatButtonBlock(BlockSetType type, int ticksToStayPressed, Properties properties) { + super(type, ticksToStayPressed, properties); } @Nullable @@ -41,15 +45,18 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -70,9 +77,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -94,4 +102,14 @@ public boolean isIgnoredConnectivitySide(BlockAndTintGetter reader, BlockState s public boolean canConnectTexturesToward(BlockAndTintGetter reader, BlockPos fromPos, BlockPos toPos, BlockState state) { return false; } + + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/byte_panel/CopycatBytePanelBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/byte_panel/CopycatBytePanelBlock.java index e12336810..93a3519f9 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/byte_panel/CopycatBytePanelBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/byte_panel/CopycatBytePanelBlock.java @@ -8,8 +8,9 @@ import com.copycatsplus.copycats.utility.BlockFaceUtils; import com.google.common.collect.ImmutableMap; import com.mojang.math.OctahedralGroup; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; @@ -51,7 +52,7 @@ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatBytePanelBlock extends WaterloggedMultiStateCopycatBlock implements ISpecialBlockItemRequirement { +public class CopycatBytePanelBlock extends WaterloggedMultiStateCopycatBlock implements SpecialBlockItemRequirement { public static BooleanProperty BOTTOM_LEFT = BooleanProperty.create("bottom_left"); public static BooleanProperty BOTTOM_RIGHT = BooleanProperty.create("bottom_right"); public static BooleanProperty TOP_LEFT = BooleanProperty.create("top_left"); @@ -191,7 +192,7 @@ public VoxelShape getPartialFaceShape(BlockGetter level, BlockState state, Strin } @Override - public boolean isPathfindable(BlockState pState, BlockGetter pLevel, BlockPos pPos, PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return switch (pType) { case LAND -> true; @@ -250,7 +251,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) } BlockPos up = pos.relative(Direction.UP); world.setBlockAndUpdate(pos, state.setValue(fromProperty(property), false).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/bytes/CopycatByteBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/bytes/CopycatByteBlock.java index 7e53bb237..b6494cbfc 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/bytes/CopycatByteBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/bytes/CopycatByteBlock.java @@ -10,10 +10,11 @@ import com.copycatsplus.copycats.utility.MathUtils; import com.google.common.collect.ImmutableMap; import com.mojang.math.OctahedralGroup; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -47,7 +48,7 @@ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatByteBlock extends WaterloggedMultiStateCopycatBlock implements ISpecialBlockItemRequirement { +public class CopycatByteBlock extends WaterloggedMultiStateCopycatBlock implements SpecialBlockItemRequirement { public static BooleanProperty TOP_NE = BooleanProperty.create("top_northeast"); public static BooleanProperty TOP_NW = BooleanProperty.create("top_northwest"); public static BooleanProperty TOP_SE = BooleanProperty.create("top_southeast"); @@ -187,7 +188,7 @@ public VoxelShape getPartialFaceShape(BlockGetter level, BlockState state, Strin } @Override - public boolean isPathfindable(BlockState pState, BlockGetter pLevel, BlockPos pPos, PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return switch (pType) { case LAND -> true; @@ -263,7 +264,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) } BlockPos up = pos.relative(Direction.UP); world.setBlockAndUpdate(pos, state.setValue(byByte(bite), false).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelBlock.java index 5a05a9f69..b0bb74b95 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelBlock.java @@ -17,6 +17,7 @@ import net.minecraft.util.StringRepresentable; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; @@ -25,6 +26,8 @@ import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; @@ -113,10 +116,18 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) } @Override - public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> IMultiStateCopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> IMultiStateCopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> IMultiStateCopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -146,9 +157,10 @@ public void onRemove(BlockState state, Level world, BlockPos pos, BlockState new } @Override - public void playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { + public BlockState playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { super.playerWillDestroy(level, pos, state, player); IMultiStateCopycatBlock.super.playerWillDestroy(level, pos, state, player); + return state; } @Override @@ -176,6 +188,16 @@ public boolean canConnectTexturesToward(String property, BlockAndTintGetter read return face.getAxis() == state.getValue(AXIS); } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + @Override public BlockEntityType getBlockEntityType() { return CCBlockEntityTypes.COPYCAT_COGWHEEL.get(); diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelBlockEntity.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelBlockEntity.java index d76fa4fc5..55487698f 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelBlockEntity.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelBlockEntity.java @@ -7,7 +7,9 @@ import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -34,9 +36,9 @@ public void setMaterialItemStorageInternal(MaterialItemStorage storage) { } @Override - public void invalidate() { - super.invalidate(); - IMultiStateCopycatBlockEntity.super.invalidate(); + public void onLoad() { + super.onLoad(); + IMultiStateCopycatBlockEntity.super.onLoad(); } @Override @@ -45,26 +47,26 @@ public ItemRequirement getRequiredItems(BlockState state) { } @Override - public void transform(StructureTransform transform) { - super.transform(transform); - IMultiStateCopycatBlockEntity.super.transform(transform); + public void transform(BlockEntity blockEntity, StructureTransform transform) { + super.transform(blockEntity, transform); + IMultiStateCopycatBlockEntity.super.transform(blockEntity, transform); } @Override - public void read(CompoundTag tag, boolean clientPacket) { - super.read(tag, clientPacket); - IMultiStateCopycatBlockEntity.read(this, tag, clientPacket); + public void read(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.read(tag, registries, clientPacket); + IMultiStateCopycatBlockEntity.read(this, tag, registries, clientPacket); } @Override - public void writeSafe(CompoundTag tag) { - super.writeSafe(tag); - IMultiStateCopycatBlockEntity.writeSafe(this, tag); + public void writeSafe(CompoundTag tag, HolderLookup.Provider registries) { + super.writeSafe(tag, registries); + IMultiStateCopycatBlockEntity.writeSafe(this, tag, registries); } @Override - public void write(CompoundTag tag, boolean clientPacket) { - super.write(tag, clientPacket); - IMultiStateCopycatBlockEntity.write(this, tag, clientPacket); + public void write(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.write(tag, registries, clientPacket); + IMultiStateCopycatBlockEntity.write(this, tag, registries, clientPacket); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelInstance.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelInstance.java deleted file mode 100644 index 022262d85..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelInstance.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.copycatsplus.copycats.content.copycat.cogwheel; - -import com.copycatsplus.copycats.CCCopycatPartialModels; -import com.copycatsplus.copycats.foundation.copycat.model.kinetic.IMultiStateKineticCopycatBlockInstance; -import com.copycatsplus.copycats.foundation.copycat.model.kinetic.KineticCopycatRenderData; -import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; -import com.jozufozu.flywheel.api.Material; -import com.jozufozu.flywheel.api.MaterialManager; -import com.jozufozu.flywheel.core.materials.FlatLit; -import com.simibubi.create.content.kinetics.base.KineticBlockEntityInstance; -import com.simibubi.create.content.kinetics.base.flwdata.RotatingData; -import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntity; -import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntityRenderer; -import com.simibubi.create.content.kinetics.simpleRelays.ICogWheel; -import net.minecraft.core.BlockPos; - -import java.util.Map; - -public class CopycatCogWheelInstance extends KineticBlockEntityInstance implements IMultiStateKineticCopycatBlockInstance { - protected Map renderData; - protected Map rotatingData; - - public CopycatCogWheelInstance(MaterialManager materialManager, BracketedKineticBlockEntity blockEntity) { - super(materialManager, blockEntity); - initializeData(); - } - - @Override - public Map getRenderData() { - return renderData; - } - - @Override - public void setRenderDataInternal(Map renderData) { - this.renderData = renderData; - } - - @Override - public Map getRotatingData() { - return rotatingData; - } - - @Override - public void setRotatingDataInternal(Map rotatingData) { - this.rotatingData = rotatingData; - } - - @Override - public RotatingData setupInternal(RotatingData key) { - return super.setup(key); - } - - @Override - public void updateRotationInternal(RotatingData instance) { - super.updateRotation(instance); - } - - @Override - public void relightInternal(BlockPos pos, FlatLit... models) { - super.relight(pos, models); - } - - @Override - public MaterialManager getMaterialManager() { - return materialManager; - } - - @Override - public IMultiStateCopycatBlockEntity getBlockEntity() { - return (IMultiStateCopycatBlockEntity) blockEntity; - } - - private static final String SHAFT_KEY = CopycatCogWheelBlock.Part.SHAFT.getSerializedName(); - private static final String COGWHEEL_KEY = CopycatCogWheelBlock.Part.COGWHEEL.getSerializedName(); - - @Override - public void init() { - super.init(); - if (ICogWheel.isLargeCog(blockEntity.getBlockState())) { - initModel(CCCopycatPartialModels.SHAFT, SHAFT_KEY); - initModel(CCCopycatPartialModels.LARGE_COGWHEEL, COGWHEEL_KEY); - } else { - initModel(CCCopycatPartialModels.SHAFT, SHAFT_KEY); - initModel(CCCopycatPartialModels.COGWHEEL, COGWHEEL_KEY); - } - rotatingData.get(SHAFT_KEY).setRotationOffset(BracketedKineticBlockEntityRenderer.getShaftAngleOffset(axis, pos)); - } - - @Override - public Material getRotatingMaterial() { - return IMultiStateKineticCopycatBlockInstance.super.getRotatingMaterial(); - } - - @Override - public void update() { - super.update(); - IMultiStateKineticCopycatBlockInstance.super.update(); - rotatingData.get(SHAFT_KEY).setRotationOffset(BracketedKineticBlockEntityRenderer.getShaftAngleOffset(axis, pos)); - } - - @Override - public void updateLight() { - super.updateLight(); - IMultiStateKineticCopycatBlockInstance.super.updateLight(); - } - - @Override - public void remove() { - IMultiStateKineticCopycatBlockInstance.super.remove(); - } - - @Override - public boolean shouldReset() { - return IMultiStateKineticCopycatBlockInstance.super.shouldReset(); - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelRenderer.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelRenderer.java index 95c8bfd29..3b0181782 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelRenderer.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelRenderer.java @@ -4,12 +4,12 @@ import com.copycatsplus.copycats.foundation.copycat.model.kinetic.IKineticCopycatBlockRenderer; import com.copycatsplus.copycats.foundation.copycat.model.kinetic.KineticCopycatRenderer; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; -import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntity; import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntityRenderer; import com.simibubi.create.content.kinetics.simpleRelays.ICogWheel; -import com.simibubi.create.foundation.render.SuperByteBuffer; +import dev.engine_room.flywheel.api.visualization.VisualizationManager; +import net.createmod.catnip.render.SuperByteBuffer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; @@ -28,7 +28,7 @@ protected SuperByteBuffer getRotatedModel(BracketedKineticBlockEntity be, BlockS @Override protected void renderSafe(BracketedKineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) { - if (Backend.canUseInstancing(be.getLevel())) + if (VisualizationManager.supportsVisualization(be.getLevel())) return; RenderType type = getRenderType(be, ((IMultiStateCopycatBlockEntity) be).getMaterialItemStorage().getMaterialItem(CopycatCogWheelBlock.Part.COGWHEEL.getSerializedName()).material()); @@ -36,7 +36,7 @@ protected void renderSafe(BracketedKineticBlockEntity be, float partialTicks, Po if (!ICogWheel.isLargeCog(be.getBlockState())) { super.renderSafe(be, partialTicks, ms, buffer, light, overlay); if (type != null) - renderRotatingBuffer(be, KineticCopycatRenderer.getBuffer(CCCopycatPartialModels.COGWHEEL, (IMultiStateCopycatBlockEntity) be, "cogwheel"), ms, buffer.getBuffer(type), light); + renderRotatingBuffer(be, KineticCopycatRenderer.getRenderedBuffer(CCCopycatPartialModels.COGWHEEL, (IMultiStateCopycatBlockEntity) be, "cogwheel"), ms, buffer.getBuffer(type), light); return; } @@ -47,12 +47,12 @@ protected void renderSafe(BracketedKineticBlockEntity be, float partialTicks, Po Direction.Axis axis = getRotationAxisOf(be); renderRotatingBuffer(be, - KineticCopycatRenderer.getBuffer(CCCopycatPartialModels.LARGE_COGWHEEL, (IMultiStateCopycatBlockEntity) be, "cogwheel"), + KineticCopycatRenderer.getRenderedBuffer(CCCopycatPartialModels.LARGE_COGWHEEL, (IMultiStateCopycatBlockEntity) be, "cogwheel"), ms, buffer.getBuffer(type), light); float angle = getAngleForLargeCogShaft(be, axis); SuperByteBuffer shaft = - KineticCopycatRenderer.getBuffer(CCCopycatPartialModels.SHAFT, (IMultiStateCopycatBlockEntity) be, "shaft"); + KineticCopycatRenderer.getRenderedBuffer(CCCopycatPartialModels.SHAFT, (IMultiStateCopycatBlockEntity) be, "shaft"); kineticRotationTransform(shaft, be, axis, angle, light); shaft.renderInto(ms, buffer.getBuffer(shaftType)); } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelVisual.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelVisual.java new file mode 100644 index 000000000..c16010325 --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/cogwheel/CopycatCogWheelVisual.java @@ -0,0 +1,95 @@ +package com.copycatsplus.copycats.content.copycat.cogwheel; + +import com.copycatsplus.copycats.CCCopycatPartialModels; +import com.copycatsplus.copycats.content.copycat.shaft.CopycatShaftBlock; +import com.copycatsplus.copycats.foundation.copycat.model.kinetic.*; +import com.simibubi.create.content.kinetics.base.KineticBlockEntityVisual; +import com.simibubi.create.content.kinetics.base.RotatingInstance; +import com.simibubi.create.content.kinetics.simpleRelays.ICogWheel; +import com.simibubi.create.foundation.render.AllInstanceTypes; +import dev.engine_room.flywheel.api.instance.Instance; +import dev.engine_room.flywheel.api.visualization.VisualizationContext; +import net.minecraft.core.Direction; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Consumer; + +public class CopycatCogWheelVisual extends KineticBlockEntityVisual { + protected Direction from; + protected CopycatInstanceManager instances; + + public CopycatCogWheelVisual(VisualizationContext context, CopycatCogWheelBlockEntity blockEntity, float partialTick) { + this( + context, blockEntity, partialTick, + Direction.fromAxisAndDirection( + blockEntity.getBlockState().getValue(CopycatShaftBlock.AXIS), + Direction.AxisDirection.POSITIVE + ) + ); + } + + /** + * @param from The source model orientation to rotate away from. + */ + public CopycatCogWheelVisual(VisualizationContext context, CopycatCogWheelBlockEntity blockEntity, float partialTick, Direction from) { + super(context, blockEntity, partialTick); + this.from = from; + this.instances = new CopycatInstanceManager<>( + this, + blockEntity, + CopycatCogWheelBlock.Part.SHAFT.getSerializedName(), + CopycatCogWheelBlock.Part.COGWHEEL.getSerializedName() + ) { + @Override + public void updateInstance(CopycatInstance instance) { + instance.instance().setup(blockEntity).setChanged(); + } + + @Override + public CopycatInstance createInstance(String key) { + ICopycatPartialModel partialModel; + if (key.equals(CopycatCogWheelBlock.Part.SHAFT.getSerializedName())) { + partialModel = CCCopycatPartialModels.SHAFT; + } else { + partialModel = ICogWheel.isLargeCog(blockEntity.getBlockState()) + ? CCCopycatPartialModels.LARGE_COGWHEEL + : CCCopycatPartialModels.COGWHEEL; + } + return CopycatInstance.of( + KineticCopycatRenderData.of(partialModel, blockEntity, key), + instancerProvider() + .instancer(AllInstanceTypes.ROTATING, KineticCopycatRenderer.getInstancedModel( + partialModel, + blockEntity, + key + )) + .createInstance() + .rotateToFace(from, rotationAxis()) + .setup(blockEntity) + .setPosition(getVisualPosition()) + ); + } + }; + } + + @Override + public void update(float pt) { + instances.update(pt); + } + + @Override + public void updateLight(float partialTick) { + instances.forEach(i -> relight(i.instance())); + } + + @Override + protected void _delete() { + instances.forEach(i -> i.instance().delete()); + } + + @Override + public void collectCrumblingInstances(Consumer consumer) { + instances.forEach(i -> consumer.accept(i.instance())); + } +} diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/corner_slice/CopycatCornerSliceBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/corner_slice/CopycatCornerSliceBlock.java index aa5baa4d1..e81786214 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/corner_slice/CopycatCornerSliceBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/corner_slice/CopycatCornerSliceBlock.java @@ -6,11 +6,12 @@ import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.copycatsplus.copycats.foundation.copycat.IStateType; import com.copycatsplus.copycats.utility.BlockUtils; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; -import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.utility.Pair; +import net.createmod.catnip.data.Iterate; +import net.createmod.catnip.data.Pair; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -41,7 +42,7 @@ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatCornerSliceBlock extends CCWaterloggedCopycatBlock implements IStateType, ISpecialBlockItemRequirement { +public class CopycatCornerSliceBlock extends CCWaterloggedCopycatBlock implements IStateType, SpecialBlockItemRequirement { public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; public static final IntegerProperty LAYERS = BlockStateProperties.LAYERS; @@ -55,9 +56,8 @@ public CopycatCornerSliceBlock(Properties pProperties) { .setValue(HALF, Half.BOTTOM)); } - @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + protected boolean isPathfindable(BlockState state, PathComputationType pathComputationType) { return false; } @@ -146,7 +146,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) BlockPos up = pos.relative(Direction.UP); // need to call updateShape before setBlock to schedule a tick for water world.setBlockAndUpdate(pos, state.setValue(LAYERS, state.getValue(LAYERS) - 1).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/door/CopycatDoorBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/door/CopycatDoorBlock.java index 69c4e22be..2fc1c82b3 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/door/CopycatDoorBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/door/CopycatDoorBlock.java @@ -13,6 +13,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -21,6 +22,8 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.DoorBlock; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -30,15 +33,15 @@ import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; import net.minecraft.world.phys.BlockHitResult; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class CopycatDoorBlock extends DoorBlock implements ICopycatBlock, IBE, IStateType { public static BooleanProperty CT = BooleanProperty.create("ct"); - public CopycatDoorBlock(Properties properties, BlockSetType type) { - super(properties, type); + public CopycatDoorBlock(BlockSetType type, Properties properties) { + super(type, properties); registerDefaultState(defaultBlockState().setValue(CT, true)); } @@ -54,25 +57,28 @@ public BlockEntityTicker getTicker(Level p_153212_, B } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @Override - public InteractionResult toggleCT(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { - if (pPlayer.isShiftKeyDown() && pPlayer.getItemInHand(pHand).equals(ItemStack.EMPTY)) { - if (!canToggleCT(pState, pLevel, pPos)) + public InteractionResult toggleCT(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + if (player.isShiftKeyDown()) { + if (!canToggleCT(state, level, pos)) return InteractionResult.PASS; - pLevel.setBlock(pPos, pState.cycle(CT), 3); - BlockEntity be = pLevel.getBlockEntity(pPos); + level.setBlock(pos, state.cycle(CT), 3); + BlockEntity be = level.getBlockEntity(pos); if (!(be instanceof ICopycatBlockEntity fbe)) return InteractionResult.PASS; BlockEntityUtils.redraw((BlockEntity) fbe); @@ -98,9 +104,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -124,6 +131,16 @@ public boolean canConnectTexturesToward(BlockAndTintGetter reader, BlockPos from return false; } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + public boolean supportsExternalFaceHiding(BlockState state) { return true; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence/CopycatFenceBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence/CopycatFenceBlock.java index e29bce486..9130c8531 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence/CopycatFenceBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence/CopycatFenceBlock.java @@ -6,12 +6,13 @@ import com.copycatsplus.copycats.foundation.copycat.IStateType; import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.foundation.block.IBE; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; @@ -26,6 +27,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -49,15 +51,18 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -79,9 +84,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -114,6 +120,15 @@ private static boolean isPole(BlockState state) { return true; } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } public boolean supportsExternalFaceHiding(BlockState state) { return true; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence/CopycatFenceModelCore.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence/CopycatFenceModelCore.java index 6443bb5a6..60f166147 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence/CopycatFenceModelCore.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence/CopycatFenceModelCore.java @@ -3,9 +3,8 @@ import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; import com.copycatsplus.copycats.foundation.copycat.model.assembly.AssemblyTransform; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.Direction; -import net.minecraft.world.level.block.DoorBlock; import net.minecraft.world.level.block.FenceBlock; import net.minecraft.world.level.block.state.BlockState; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence_gate/CopycatFenceGateBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence_gate/CopycatFenceGateBlock.java index 4f25a2d5f..28f94ed38 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence_gate/CopycatFenceGateBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence_gate/CopycatFenceGateBlock.java @@ -11,6 +11,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; @@ -25,6 +26,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.WoodType; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -35,7 +37,7 @@ public class CopycatFenceGateBlock extends FenceGateBlock implements ICopycatBlock, IBE, IStateType { public CopycatFenceGateBlock(Properties properties) { - super(properties, WoodType.OAK); + super(WoodType.OAK, properties); } public boolean collisionExtendsVertically(BlockState state, BlockGetter level, BlockPos pos, Entity collidingEntity) { @@ -49,15 +51,18 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -79,9 +84,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -105,6 +111,16 @@ public boolean canConnectTexturesToward(BlockAndTintGetter reader, BlockPos from return false; } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + public boolean supportsExternalFaceHiding(BlockState state) { return false; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence_gate/CopycatFenceGateModelCore.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence_gate/CopycatFenceGateModelCore.java index 4496ac3b6..ac132641e 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence_gate/CopycatFenceGateModelCore.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fence_gate/CopycatFenceGateModelCore.java @@ -3,8 +3,7 @@ import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; import com.copycatsplus.copycats.foundation.copycat.model.assembly.AssemblyTransform; -import com.simibubi.create.foundation.utility.Iterate; -import net.minecraft.world.level.block.DoorBlock; +import net.createmod.catnip.data.Iterate; import net.minecraft.world.level.block.FenceGateBlock; import net.minecraft.world.level.block.state.BlockState; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/flat_pane/CopycatFlatPaneBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/flat_pane/CopycatFlatPaneBlock.java index 8fcae4a40..0b49890e1 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/flat_pane/CopycatFlatPaneBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/flat_pane/CopycatFlatPaneBlock.java @@ -8,9 +8,9 @@ import com.copycatsplus.copycats.foundation.copycat.IStateType; import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.foundation.placement.IPlacementHelper; -import com.simibubi.create.foundation.placement.PlacementHelpers; -import com.simibubi.create.foundation.placement.PlacementOffset; +import net.createmod.catnip.placement.IPlacementHelper; +import net.createmod.catnip.placement.PlacementHelpers; +import net.createmod.catnip.placement.PlacementOffset; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -18,6 +18,7 @@ import net.minecraft.core.Vec3i; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; @@ -56,16 +57,15 @@ public CopycatFlatPaneBlock(Properties pProperties) { } @Override - public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @NotNull Player player, @NotNull InteractionHand hand, - @NotNull BlockHitResult ray) { - return InteractionUtils.sequential( - () -> InteractionUtils.usePlacementHelper(placementHelperId, state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> InteractionUtils.usePlacementHelper(placementHelperId, stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return switch (pType) { case LAND -> pState.getValue(AXIS).isHorizontal(); default -> false; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeBlock.java index 4cb72fecf..456d9e4da 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeBlock.java @@ -6,11 +6,13 @@ import com.simibubi.create.content.decoration.bracket.BracketBlock; import com.simibubi.create.content.fluids.pipes.FluidPipeBlock; import com.simibubi.create.content.fluids.pipes.FluidPipeBlockEntity; +import com.simibubi.create.content.fluids.pipes.FluidPipeBlockRotation; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; @@ -18,6 +20,8 @@ import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; @@ -51,10 +55,18 @@ public InteractionResult onWrenched(BlockState state, UseOnContext context) { } @Override - public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -80,9 +92,20 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { + public BlockState playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { super.playerWillDestroy(level, pos, state, player); ICopycatBlock.super.playerWillDestroy(level, pos, state, player); + return state; + } + + @Override + public BlockState rotate(BlockState pState, Rotation pRotation) { + return super.rotate(pState, pRotation); + } + + @Override + public BlockState mirror(BlockState pState, Mirror pMirror) { + return super.mirror(pState, pMirror); } @Override diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeBlockEntity.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeBlockEntity.java index 96d02ef49..266b76d9e 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeBlockEntity.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeBlockEntity.java @@ -6,8 +6,10 @@ import com.simibubi.create.content.fluids.pipes.FluidPipeBlockEntity; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -54,9 +56,9 @@ public void setCTEnabledInternal(boolean value) { } @Override - public void invalidate() { - super.invalidate(); - ICopycatBlockEntity.super.invalidate(); + public void onLoad() { + super.onLoad(); + ICopycatBlockEntity.super.onLoad(); } @Override @@ -65,27 +67,27 @@ public ItemRequirement getRequiredItems(BlockState state) { } @Override - public void transform(StructureTransform transform) { - super.transform(transform); - ICopycatBlockEntity.super.transform(transform); + public void transform(BlockEntity blockEntity, StructureTransform transform) { + super.transform(blockEntity, transform); + ICopycatBlockEntity.super.transform(blockEntity, transform); } @Override - public void read(CompoundTag tag, boolean clientPacket) { - super.read(tag, clientPacket); - ICopycatBlockEntity.read(this, tag, clientPacket); + public void read(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.read(tag, registries, clientPacket); + ICopycatBlockEntity.read(this, tag, registries, clientPacket); } @Override - public void writeSafe(CompoundTag tag) { - super.writeSafe(tag); - ICopycatBlockEntity.writeSafe(this, tag); + public void writeSafe(CompoundTag tag, HolderLookup.Provider registries) { + super.writeSafe(tag, registries); + ICopycatBlockEntity.writeSafe(this, tag, registries); } @Override - public void write(CompoundTag tag, boolean clientPacket) { - super.write(tag, clientPacket); - ICopycatBlockEntity.write(this, tag, clientPacket); + public void write(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.write(tag, registries, clientPacket); + ICopycatBlockEntity.write(this, tag, registries, clientPacket); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeModelCore.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeModelCore.java index 07a2c4cd0..bab118efd 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeModelCore.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatFluidPipeModelCore.java @@ -4,7 +4,7 @@ import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; import com.copycatsplus.copycats.foundation.copycat.model.assembly.AssemblyTransform; import com.simibubi.create.content.fluids.FluidTransportBehaviour; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.Direction; @@ -376,24 +376,49 @@ protected void renderComponent(CopycatRenderContext context, Direction direction context.assemblePiece( transform, vec3(4, 4, 2), - aabb(4, 4, 2).move(0, 0, 4), + aabb(4, 4, 2).move(0, 0, 0), cull(EAST | UP | SOUTH | NORTH) ); context.assemblePiece( transform, vec3(8, 4, 2), - aabb(4, 4, 2).move(12, 0, 4), + aabb(4, 4, 2).move(12, 0, 0), cull(WEST | UP | SOUTH | NORTH) ); context.assemblePiece( transform, vec3(4, 8, 2), - aabb(4, 4, 2).move(0, 12, 4), + aabb(4, 4, 2).move(0, 12, 0), cull(EAST | DOWN | SOUTH | NORTH) ); context.assemblePiece( transform, vec3(8, 8, 2), + aabb(4, 4, 2).move(12, 12, 0), + cull(WEST | DOWN | SOUTH | NORTH) + ); + + context.assemblePiece( + transform, + vec3(4, 4, 0), + aabb(4, 4, 2).move(0, 0, 4), + cull(EAST | UP | SOUTH | NORTH) + ); + context.assemblePiece( + transform, + vec3(8, 4, 0), + aabb(4, 4, 2).move(12, 0, 4), + cull(WEST | UP | SOUTH | NORTH) + ); + context.assemblePiece( + transform, + vec3(4, 8, 0), + aabb(4, 4, 2).move(0, 12, 4), + cull(EAST | DOWN | SOUTH | NORTH) + ); + context.assemblePiece( + transform, + vec3(8, 8, 0), aabb(4, 4, 2).move(12, 12, 4), cull(WEST | DOWN | SOUTH | NORTH) ); @@ -453,33 +478,30 @@ protected void renderComponent(CopycatRenderContext context, Direction direction } public static class PipeModelData { - private final FluidTransportBehaviour.AttachmentTypes[] attachments; + private final FluidTransportBehaviour.AttachmentTypes[] attachments = new FluidTransportBehaviour.AttachmentTypes[6]; private boolean encased; private BakedModel bracket; public PipeModelData() { - attachments = new FluidTransportBehaviour.AttachmentTypes[6]; - Arrays.fill(attachments, FluidTransportBehaviour.AttachmentTypes.NONE); + Arrays.fill(this.attachments, FluidTransportBehaviour.AttachmentTypes.NONE); } public void putBracket(BlockState state) { if (state != null) { - this.bracket = Minecraft.getInstance() - .getBlockRenderer() - .getBlockModel(state); + this.bracket = Minecraft.getInstance().getBlockRenderer().getBlockModel(state); } } public BakedModel getBracket() { - return bracket; + return this.bracket; } public void putAttachment(Direction face, FluidTransportBehaviour.AttachmentTypes rim) { - attachments[face.get3DDataValue()] = rim; + this.attachments[face.get3DDataValue()] = rim; } public FluidTransportBehaviour.AttachmentTypes getAttachment(Direction face) { - return attachments[face.get3DDataValue()]; + return this.attachments[face.get3DDataValue()]; } public void setEncased(boolean encased) { @@ -487,7 +509,7 @@ public void setEncased(boolean encased) { } public boolean isEncased() { - return encased; + return this.encased; } } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatGlassFluidPipeBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatGlassFluidPipeBlock.java index 4062cacef..c46695abd 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatGlassFluidPipeBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatGlassFluidPipeBlock.java @@ -13,19 +13,20 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -57,10 +58,18 @@ public InteractionResult onWrenched(BlockState state, UseOnContext context) { } @Override - public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -86,13 +95,14 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { + public BlockState playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { super.playerWillDestroy(level, pos, state, player); ICopycatBlock.super.playerWillDestroy(level, pos, state, player); + return state; } @Override - public @NotNull ItemStack getCloneItemStack(@NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull BlockState state) { + public ItemStack getCloneItemStack(BlockState state, HitResult target, LevelReader level, BlockPos pos, Player player) { return CCBlocks.COPYCAT_FLUID_PIPE.asStack(); } @@ -106,6 +116,16 @@ public boolean canConnectTexturesToward(BlockAndTintGetter reader, BlockPos from return false; } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + @Override public BlockState toRegularPipe(LevelAccessor world, BlockPos pos, BlockState state) { Direction side = Direction.get(Direction.AxisDirection.POSITIVE, state.getValue(AXIS)); diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatStraightPipeBlockEntity.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatStraightPipeBlockEntity.java index 4788c11e2..c7f6f95a4 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatStraightPipeBlockEntity.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/CopycatStraightPipeBlockEntity.java @@ -4,6 +4,7 @@ import com.simibubi.create.content.fluids.pipes.StraightPipeBlockEntity; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -52,9 +53,9 @@ public void setCTEnabledInternal(boolean value) { } @Override - public void invalidate() { - super.invalidate(); - ICopycatBlockEntity.super.invalidate(); + public void onLoad() { + super.onLoad(); + ICopycatBlockEntity.super.onLoad(); } @Override @@ -63,21 +64,21 @@ public ItemRequirement getRequiredItems(BlockState state) { } @Override - public void read(CompoundTag tag, boolean clientPacket) { - super.read(tag, clientPacket); - ICopycatBlockEntity.read(this, tag, clientPacket); + public void read(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.read(tag, registries, clientPacket); + ICopycatBlockEntity.read(this, tag, registries, clientPacket); } @Override - public void writeSafe(CompoundTag tag) { - super.writeSafe(tag); - ICopycatBlockEntity.writeSafe(this, tag); + public void writeSafe(CompoundTag tag, HolderLookup.Provider registries) { + super.writeSafe(tag, registries); + ICopycatBlockEntity.writeSafe(this, tag, registries); } @Override - public void write(CompoundTag tag, boolean clientPacket) { - super.write(tag, clientPacket); - ICopycatBlockEntity.write(this, tag, clientPacket); + public void write(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.write(tag, registries, clientPacket); + ICopycatBlockEntity.write(this, tag, registries, clientPacket); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/ghost_block/CopycatGhostBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/ghost_block/CopycatGhostBlock.java index 180750e34..206f41916 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/ghost_block/CopycatGhostBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/ghost_block/CopycatGhostBlock.java @@ -54,7 +54,7 @@ public BlockState transform(BlockState state, StructureTransform transform) { } @Override - public boolean isPathfindable(BlockState pState, BlockGetter pLevel, BlockPos pPos, PathComputationType pType) { - return super.isPathfindable(pState, pLevel, pPos, pType); + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { + return super.isPathfindable(pState, pType); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_layer/CopycatHalfLayerBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_layer/CopycatHalfLayerBlock.java index 54b4fa0de..f1889d879 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_layer/CopycatHalfLayerBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_layer/CopycatHalfLayerBlock.java @@ -7,17 +7,15 @@ import com.copycatsplus.copycats.content.copycat.vertical_half_layer.CopycatVerticalHalfLayerBlock; import com.copycatsplus.copycats.foundation.copycat.CopycatTransformableState; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; -import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlock; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; -import com.copycatsplus.copycats.foundation.copycat.model.ScaledBlockAndTintGetter; import com.copycatsplus.copycats.foundation.copycat.multistate.MaterialItemStorage; import com.copycatsplus.copycats.foundation.copycat.multistate.WaterloggedMultiStateCopycatBlock; import com.copycatsplus.copycats.utility.BlockFaceUtils; import com.copycatsplus.copycats.utility.BlockUtils; import com.google.common.collect.ImmutableMap; -import com.mojang.math.OctahedralGroup; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; @@ -29,12 +27,9 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Mirror; -import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; @@ -52,14 +47,12 @@ import javax.annotation.ParametersAreNonnullByDefault; import java.util.*; -import java.util.function.Function; import static net.minecraft.core.Direction.Axis; -import static net.minecraft.core.Direction.AxisDirection; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatHalfLayerBlock extends WaterloggedMultiStateCopycatBlock implements ISpecialBlockItemRequirement { +public class CopycatHalfLayerBlock extends WaterloggedMultiStateCopycatBlock implements SpecialBlockItemRequirement { public static final EnumProperty AXIS = BlockStateProperties.HORIZONTAL_AXIS; @@ -236,7 +229,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) BlockPos up = pos.relative(Direction.UP); // need to call updateShape before setBlock to schedule a tick for water world.setBlockAndUpdate(pos, state.setValue(targetProp, state.getValue(targetProp) - 1).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } @@ -368,7 +361,7 @@ public void transformStorage(BlockState state, IMultiStateCopycatBlockEntity be, @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return false; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_layer/CopycatHalfLayerModelCore.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_layer/CopycatHalfLayerModelCore.java index b0c596a82..346f5161f 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_layer/CopycatHalfLayerModelCore.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_layer/CopycatHalfLayerModelCore.java @@ -3,7 +3,7 @@ import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; import com.copycatsplus.copycats.foundation.copycat.model.assembly.AssemblyTransform; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.Half; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_panel/CopycatHalfPanelBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_panel/CopycatHalfPanelBlock.java index ab8ebb708..181aa483e 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_panel/CopycatHalfPanelBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/half_panel/CopycatHalfPanelBlock.java @@ -8,13 +8,11 @@ import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.content.contraptions.StructureTransform; import com.simibubi.create.content.equipment.extendoGrip.ExtendoGripItem; -import com.simibubi.create.foundation.placement.IPlacementHelper; -import com.simibubi.create.foundation.placement.PlacementHelpers; -import com.simibubi.create.foundation.placement.PlacementOffset; import com.simibubi.create.foundation.placement.PoleHelper; -import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.infrastructure.config.AllConfigs; +import net.createmod.catnip.placement.IPlacementHelper; +import net.createmod.catnip.placement.PlacementHelpers; +import net.createmod.catnip.placement.PlacementOffset; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -22,24 +20,21 @@ import net.minecraft.core.Vec3i; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.ai.attributes.AttributeInstance; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; -import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Mirror; -import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.NotNull; @@ -75,17 +70,15 @@ public CopycatHalfPanelBlock(Properties pProperties) { } @Override - public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @NotNull Player player, @NotNull InteractionHand hand, - @NotNull BlockHitResult ray) { - return InteractionUtils.sequential( - () -> InteractionUtils.usePlacementHelper(placementHelperId, state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> InteractionUtils.usePlacementHelper(placementHelperId, stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } - @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return false; } @@ -221,9 +214,8 @@ public PlacementOffset getOffset(Player player, Level world, BlockState state, B for (Direction dir : directions) { int range = AllConfigs.server().equipment.placementAssistRange.get(); if (player != null) { - //TODO: Add way to get reach attribute from platform - AttributeInstance reach = null; - if (reach != null && reach.hasModifier(ExtendoGripItem.singleRangeAttributeModifier)) + AttributeInstance reach = InteractionUtils.getPlayerReach(player); + if (reach != null && reach.hasModifier(ExtendoGripItem.singleRangeAttributeModifier.id())) range += 4; } int poles = attachedPoles(world, pos, dir); diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/ladder/CopycatLadderBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/ladder/CopycatLadderBlock.java index eeb66aa21..c373122c3 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/ladder/CopycatLadderBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/ladder/CopycatLadderBlock.java @@ -7,15 +7,16 @@ import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.content.kinetics.simpleRelays.AbstractSimpleShaftBlock; import com.simibubi.create.foundation.block.IBE; -import com.simibubi.create.foundation.placement.PlacementHelpers; -import com.simibubi.create.foundation.placement.PlacementOffset; import com.simibubi.create.foundation.placement.PoleHelper; +import net.createmod.catnip.placement.PlacementHelpers; +import net.createmod.catnip.placement.PlacementOffset; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; @@ -27,6 +28,8 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.LadderBlock; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -92,16 +95,19 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> InteractionUtils.usePlacementHelper(placementHelperId, state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> InteractionUtils.usePlacementHelper(placementHelperId, stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -123,9 +129,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -149,23 +156,28 @@ public boolean isIgnoredConnectivitySide(BlockAndTintGetter reader, BlockState s return true; } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + @MethodsReturnNonnullByDefault private static class PlacementHelper extends PoleHelper { private PlacementHelper() { - super(state -> state.getBlock() instanceof AbstractSimpleShaftBlock - || state.getBlock() instanceof LadderBlock, $ -> Axis.Y, FACING); + super(state -> state.getBlock() instanceof LadderBlock && state.getBlock() instanceof ICopycatBlock, $ -> Axis.Y, FACING); } @Override public Predicate getItemPredicate() { - return i -> i.getItem() instanceof BlockItem - && ((BlockItem) i.getItem()).getBlock() instanceof LadderBlock; - } - - @Override - public Predicate getStatePredicate() { - return state -> state.getBlock() instanceof LadderBlock; + return i -> i.getItem() instanceof BlockItem blockItem + && blockItem.getBlock() instanceof LadderBlock + && blockItem.getBlock() instanceof ICopycatBlock; } @Override diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/layer/CopycatLayerBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/layer/CopycatLayerBlock.java index c74b63290..1a271495c 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/layer/CopycatLayerBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/layer/CopycatLayerBlock.java @@ -5,8 +5,9 @@ import com.copycatsplus.copycats.foundation.copycat.CCWaterloggedCopycatBlock; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.copycatsplus.copycats.foundation.copycat.IStateType; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; @@ -17,12 +18,9 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Mirror; -import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; @@ -42,7 +40,7 @@ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatLayerBlock extends CCWaterloggedCopycatBlock implements ISpecialBlockItemRequirement, IStateType { +public class CopycatLayerBlock extends CCWaterloggedCopycatBlock implements SpecialBlockItemRequirement, IStateType { public static final DirectionProperty FACING = BlockStateProperties.FACING; public static final IntegerProperty LAYERS = BlockStateProperties.LAYERS; @@ -98,7 +96,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) BlockPos up = pos.relative(Direction.UP); // need to call updateShape before setBlock to schedule a tick for water world.setBlockAndUpdate(pos, state.setValue(LAYERS, state.getValue(LAYERS) - 1).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } @@ -115,7 +113,7 @@ public BlockState transform(BlockState state, StructureTransform transform) { @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return switch (pType) { case LAND -> pState.getValue(LAYERS) < 5 && pState.getValue(FACING).equals(UP); default -> false; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/pane/CopycatPaneBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/pane/CopycatPaneBlock.java index d383218a0..9de7143a8 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/pane/CopycatPaneBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/pane/CopycatPaneBlock.java @@ -13,6 +13,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -21,10 +22,13 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.IronBarsBlock; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import java.util.Optional; @@ -40,15 +44,18 @@ public boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -65,9 +72,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -96,6 +104,16 @@ public Optional isCTBlocked(BlockAndTintGetter reader, BlockState state return Optional.of(false); } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + public boolean supportsExternalFaceHiding(BlockState state) { return true; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/pane/CopycatPaneModelCore.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/pane/CopycatPaneModelCore.java index 440604a00..635e126b4 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/pane/CopycatPaneModelCore.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/pane/CopycatPaneModelCore.java @@ -3,7 +3,7 @@ import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import com.copycatsplus.copycats.foundation.copycat.model.assembly.AssemblyTransform; import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.Direction; import net.minecraft.world.level.block.IronBarsBlock; import net.minecraft.world.level.block.state.BlockState; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/pressure_plate/CopycatPressurePlateBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/pressure_plate/CopycatPressurePlateBlock.java index d028b97e1..041866362 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/pressure_plate/CopycatPressurePlateBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/pressure_plate/CopycatPressurePlateBlock.java @@ -11,18 +11,22 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.*; import net.minecraft.world.level.block.BasePressurePlateBlock; +import net.minecraft.world.level.block.Mirror; import net.minecraft.world.level.block.PressurePlateBlock; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -32,8 +36,8 @@ @MethodsReturnNonnullByDefault public class CopycatPressurePlateBlock extends PressurePlateBlock implements ICopycatBlock, IBE, IStateType { - public CopycatPressurePlateBlock(PressurePlateBlock.Sensitivity sensitivity, Properties properties, BlockSetType type) { - super(sensitivity, properties, type); + public CopycatPressurePlateBlock(BlockSetType type, Properties properties) { + super(type, properties); } @Nullable @@ -43,15 +47,18 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -72,9 +79,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -96,4 +104,14 @@ public boolean isIgnoredConnectivitySide(BlockAndTintGetter reader, BlockState s public boolean canConnectTexturesToward(BlockAndTintGetter reader, BlockPos fromPos, BlockPos toPos, BlockState state) { return false; } + + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/pressure_plate/CopycatWeightedPressurePlate.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/pressure_plate/CopycatWeightedPressurePlate.java index 370bdc952..a3202186c 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/pressure_plate/CopycatWeightedPressurePlate.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/pressure_plate/CopycatWeightedPressurePlate.java @@ -11,11 +11,14 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.*; import net.minecraft.world.level.block.BasePressurePlateBlock; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.WeightedPressurePlateBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; @@ -23,6 +26,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -32,8 +36,8 @@ @MethodsReturnNonnullByDefault public class CopycatWeightedPressurePlate extends WeightedPressurePlateBlock implements ICopycatBlock, IBE, IStateType { - public CopycatWeightedPressurePlate(int maxWeight, Properties pProperties, BlockSetType type) { - super(maxWeight, pProperties, type); + public CopycatWeightedPressurePlate(int maxWeight, BlockSetType type, Properties pProperties) { + super(maxWeight, type, pProperties); } @Nullable @@ -43,15 +47,18 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -72,9 +79,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -96,4 +104,14 @@ public boolean isIgnoredConnectivitySide(BlockAndTintGetter reader, BlockState s public boolean canConnectTexturesToward(BlockAndTintGetter reader, BlockPos fromPos, BlockPos toPos, BlockState state) { return false; } + + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftBlock.java index 46b6599bf..e2502e7d4 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftBlock.java @@ -12,21 +12,24 @@ import com.simibubi.create.content.kinetics.simpleRelays.AbstractSimpleShaftBlock; import com.simibubi.create.content.kinetics.simpleRelays.ShaftBlock; import com.simibubi.create.content.kinetics.steamEngine.PoweredShaftBlock; -import com.simibubi.create.foundation.placement.PlacementHelpers; -import com.simibubi.create.foundation.placement.PlacementOffset; import com.simibubi.create.foundation.placement.PoleHelper; +import net.createmod.catnip.placement.PlacementHelpers; +import net.createmod.catnip.placement.PlacementOffset; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Vec3i; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.*; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; @@ -69,11 +72,18 @@ public InteractionResult onWrenched(BlockState state, UseOnContext context) { } @Override - public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, world, pos, player, hand, ray), - () -> InteractionUtils.usePlacementHelper(placementHelperId, state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -104,9 +114,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { + public BlockState playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { super.playerWillDestroy(level, pos, state, player); ICopycatBlock.super.playerWillDestroy(level, pos, state, player); + return state; } @Override @@ -137,6 +148,16 @@ public Optional isCTBlocked(BlockAndTintGetter reader, BlockState state return Optional.of(false); } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + @MethodsReturnNonnullByDefault private static class PlacementHelper extends PoleHelper { // used for extending a shaft in its axis, like the piston poles. works with diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftBlockEntity.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftBlockEntity.java index 1f211e8bb..1bf9ca132 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftBlockEntity.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftBlockEntity.java @@ -5,8 +5,10 @@ import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntity; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -52,9 +54,9 @@ public void setCTEnabledInternal(boolean value) { } @Override - public void invalidate() { - super.invalidate(); - ICopycatBlockEntity.super.invalidate(); + public void onLoad() { + super.onLoad(); + ICopycatBlockEntity.super.onLoad(); } @Override @@ -63,26 +65,26 @@ public ItemRequirement getRequiredItems(BlockState state) { } @Override - public void transform(StructureTransform transform) { - super.transform(transform); - ICopycatBlockEntity.super.transform(transform); + public void transform(BlockEntity blockEntity, StructureTransform transform) { + super.transform(blockEntity, transform); + ICopycatBlockEntity.super.transform(blockEntity, transform); } @Override - public void read(CompoundTag tag, boolean clientPacket) { - super.read(tag, clientPacket); - ICopycatBlockEntity.read(this, tag, clientPacket); + public void read(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.read(tag, registries, clientPacket); + ICopycatBlockEntity.read(this, tag, registries, clientPacket); } @Override - public void writeSafe(CompoundTag tag) { - super.writeSafe(tag); - ICopycatBlockEntity.writeSafe(this, tag); + public void writeSafe(CompoundTag tag, HolderLookup.Provider registries) { + super.writeSafe(tag, registries); + ICopycatBlockEntity.writeSafe(this, tag, registries); } @Override - public void write(CompoundTag tag, boolean clientPacket) { - super.write(tag, clientPacket); - ICopycatBlockEntity.write(this, tag, clientPacket); + public void write(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.write(tag, registries, clientPacket); + ICopycatBlockEntity.write(this, tag, registries, clientPacket); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftInstance.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftInstance.java deleted file mode 100644 index c5c5e7819..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftInstance.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.copycatsplus.copycats.content.copycat.shaft; - -import com.copycatsplus.copycats.CCCopycatPartialModels; -import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; -import com.copycatsplus.copycats.foundation.copycat.model.kinetic.IKineticCopycatBlockInstance; -import com.copycatsplus.copycats.foundation.copycat.model.kinetic.KineticCopycatRenderData; -import com.jozufozu.flywheel.api.Instancer; -import com.jozufozu.flywheel.api.Material; -import com.jozufozu.flywheel.api.MaterialManager; -import com.simibubi.create.content.kinetics.base.flwdata.RotatingData; -import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntity; -import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntityInstance; - -public class CopycatShaftInstance extends BracketedKineticBlockEntityInstance implements IKineticCopycatBlockInstance { - protected KineticCopycatRenderData renderData; - - public CopycatShaftInstance(MaterialManager materialManager, BracketedKineticBlockEntity blockEntity) { - super(materialManager, blockEntity); - } - - @Override - public KineticCopycatRenderData getRenderData() { - return renderData; - } - - @Override - public MaterialManager getMaterialManager() { - return materialManager; - } - - @Override - public void setRenderData(KineticCopycatRenderData renderData) { - this.renderData = renderData; - } - - @Override - public ICopycatBlockEntity getBlockEntity() { - return (ICopycatBlockEntity) blockEntity; - } - - @Override - public Material getRotatingMaterial() { - return IKineticCopycatBlockInstance.super.getRotatingMaterial(); - } - - @Override - public Instancer getModel() { - return IKineticCopycatBlockInstance.super.getModel(CCCopycatPartialModels.SHAFT); - } - - @Override - public boolean shouldReset() { - return IKineticCopycatBlockInstance.super.shouldReset(); - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftRenderer.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftRenderer.java index 57a8cb3c1..708dc8b92 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftRenderer.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftRenderer.java @@ -5,7 +5,7 @@ import com.copycatsplus.copycats.foundation.copycat.model.kinetic.IKineticCopycatBlockRenderer; import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntity; import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntityRenderer; -import com.simibubi.create.foundation.render.SuperByteBuffer; +import net.createmod.catnip.render.SuperByteBuffer; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.world.level.block.state.BlockState; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftVisual.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftVisual.java new file mode 100644 index 000000000..3aeb04b30 --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/shaft/CopycatShaftVisual.java @@ -0,0 +1,82 @@ +package com.copycatsplus.copycats.content.copycat.shaft; + +import com.copycatsplus.copycats.CCCopycatPartialModels; +import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; +import com.copycatsplus.copycats.foundation.copycat.model.kinetic.CopycatInstance; +import com.copycatsplus.copycats.foundation.copycat.model.kinetic.CopycatInstanceManager; +import com.copycatsplus.copycats.foundation.copycat.model.kinetic.KineticCopycatRenderData; +import com.copycatsplus.copycats.foundation.copycat.model.kinetic.KineticCopycatRenderer; +import com.simibubi.create.content.kinetics.base.KineticBlockEntityVisual; +import com.simibubi.create.content.kinetics.base.RotatingInstance; +import com.simibubi.create.foundation.render.AllInstanceTypes; +import dev.engine_room.flywheel.api.instance.Instance; +import dev.engine_room.flywheel.api.visualization.VisualizationContext; +import net.minecraft.core.Direction; + +import java.util.function.Consumer; + +public class CopycatShaftVisual extends KineticBlockEntityVisual { + protected Direction from; + protected CopycatInstanceManager instances; + + public CopycatShaftVisual(VisualizationContext context, CopycatShaftBlockEntity blockEntity, float partialTick) { + this( + context, blockEntity, partialTick, + Direction.fromAxisAndDirection( + blockEntity.getBlockState().getValue(CopycatShaftBlock.AXIS), + Direction.AxisDirection.POSITIVE + ) + ); + } + + /** + * @param from The source model orientation to rotate away from. + */ + public CopycatShaftVisual(VisualizationContext context, CopycatShaftBlockEntity blockEntity, float partialTick, Direction from) { + super(context, blockEntity, partialTick); + this.from = from; + this.instances = new CopycatInstanceManager<>(this, blockEntity, CopycatModelCore.MATERIAL_KEY) { + + @Override + public void updateInstance(CopycatInstance instance) { + instance.instance().setup(blockEntity).setChanged(); + } + + @Override + public CopycatInstance createInstance(String key) { + return CopycatInstance.of( + KineticCopycatRenderData.of(CCCopycatPartialModels.SHAFT, blockEntity), + instancerProvider() + .instancer(AllInstanceTypes.ROTATING, KineticCopycatRenderer.getInstancedModel( + CCCopycatPartialModels.SHAFT, + blockEntity + )) + .createInstance() + .rotateToFace(from, rotationAxis()) + .setup(blockEntity) + .setPosition(getVisualPosition()) + ); + } + }; + } + + @Override + public void update(float pt) { + instances.update(pt); + } + + @Override + public void updateLight(float partialTick) { + instances.forEach(i -> relight(i.instance())); + } + + @Override + protected void _delete() { + instances.forEach(i -> i.instance().delete()); + } + + @Override + public void collectCrumblingInstances(Consumer consumer) { + instances.forEach(i -> consumer.accept(i.instance())); + } +} diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/slab/CopycatSlabBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/slab/CopycatSlabBlock.java index f4cc03b98..5813fa78a 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/slab/CopycatSlabBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/slab/CopycatSlabBlock.java @@ -2,26 +2,22 @@ import com.copycatsplus.copycats.CCBlocks; import com.copycatsplus.copycats.CCShapes; -import com.copycatsplus.copycats.content.copycat.half_layer.CopycatHalfLayerBlock; import com.copycatsplus.copycats.foundation.copycat.CopycatTransformableState; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; -import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlock; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; -import com.copycatsplus.copycats.foundation.copycat.model.ScaledBlockAndTintGetter; import com.copycatsplus.copycats.foundation.copycat.multistate.MaterialItemStorage; import com.copycatsplus.copycats.foundation.copycat.multistate.WaterloggedMultiStateCopycatBlock; import com.copycatsplus.copycats.utility.BlockFaceUtils; import com.copycatsplus.copycats.utility.InteractionUtils; import com.google.common.collect.ImmutableMap; -import com.mojang.math.OctahedralGroup; import com.simibubi.create.AllBlocks; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; -import com.simibubi.create.foundation.placement.IPlacementHelper; -import com.simibubi.create.foundation.placement.PlacementHelpers; -import com.simibubi.create.foundation.placement.PlacementOffset; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.placement.IPlacementHelper; +import net.createmod.catnip.placement.PlacementHelpers; +import net.createmod.catnip.placement.PlacementOffset; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -31,11 +27,11 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.*; @@ -58,11 +54,9 @@ import java.util.*; import java.util.function.Predicate; -import static com.copycatsplus.copycats.utility.BlockUtils.transformFacing; - @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatSlabBlock extends WaterloggedMultiStateCopycatBlock implements ISpecialBlockItemRequirement { +public class CopycatSlabBlock extends WaterloggedMultiStateCopycatBlock implements SpecialBlockItemRequirement { public static final EnumProperty AXIS = BlockStateProperties.AXIS; public static final EnumProperty SLAB_TYPE = BlockStateProperties.SLAB_TYPE; @@ -143,11 +137,10 @@ public int getColorIndex(String property) { } @Override - public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, - BlockHitResult ray) { - return InteractionUtils.sequential( - () -> InteractionUtils.usePlacementHelper(placementHelperId, state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> InteractionUtils.usePlacementHelper(placementHelperId, stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -172,7 +165,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) } BlockPos up = pos.relative(Direction.UP); world.setBlockAndUpdate(pos, state.setValue(SLAB_TYPE, property.equals(SlabType.BOTTOM.getSerializedName()) ? SlabType.TOP : SlabType.BOTTOM).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } @@ -241,8 +234,8 @@ protected void createBlockStateDefinition(StateDefinition.Builder HALF = BlockStateProperties.HALF; public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; @@ -60,7 +54,7 @@ public CopycatSliceBlock(Properties pProperties) { } @Override - public boolean isPathfindable(BlockState pState, BlockGetter pLevel, BlockPos pPos, PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return switch (pType) { case LAND -> pState.getValue(LAYERS) < 5; default -> false; @@ -135,7 +129,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) BlockPos up = pos.relative(Direction.UP); // need to call updateShape before setBlock to schedule a tick for water world.setBlockAndUpdate(pos, state.setValue(LAYERS, state.getValue(LAYERS) - 1).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatFoldingDoorModelCore.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatFoldingDoorModelCore.java index 6c73d55e5..a1cc15e49 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatFoldingDoorModelCore.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatFoldingDoorModelCore.java @@ -4,7 +4,7 @@ import com.copycatsplus.copycats.foundation.copycat.model.assembly.AssemblyTransform; import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlock; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.Direction; import net.minecraft.world.level.block.DoorBlock; import net.minecraft.world.level.block.state.BlockState; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorBlock.java index fa066fad3..2459a2779 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorBlock.java @@ -13,6 +13,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -21,6 +22,8 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -71,20 +74,28 @@ public InteractionResult onWrenched(BlockState state, UseOnContext context) { } @Override - public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) ); } @Override - public InteractionResult toggleCT(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { - if (pPlayer.isShiftKeyDown() && pPlayer.getItemInHand(pHand).equals(ItemStack.EMPTY)) { - if (!canToggleCT(pState, pLevel, pPos)) + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) + ); + } + + @Override + public InteractionResult toggleCT(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + if (player.isShiftKeyDown()) { + if (!canToggleCT(state, level, pos)) return InteractionResult.PASS; - pLevel.setBlock(pPos, pState.cycle(CT), 3); - BlockEntity be = pLevel.getBlockEntity(pPos); + level.setBlock(pos, state.cycle(CT), 3); + BlockEntity be = level.getBlockEntity(pos); if (!(be instanceof ICopycatBlockEntity fbe)) return InteractionResult.PASS; BlockEntityUtils.redraw((BlockEntity) fbe); @@ -111,9 +122,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { + public BlockState playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { super.playerWillDestroy(level, pos, state, player); ICopycatBlock.super.playerWillDestroy(level, pos, state, player); + return state; } @Override @@ -127,6 +139,16 @@ public boolean canConnectTexturesToward(BlockAndTintGetter reader, BlockPos from return false; } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + public boolean supportsExternalFaceHiding(BlockState state) { return true; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorBlockEntity.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorBlockEntity.java index d482d6c93..ecddab098 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorBlockEntity.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorBlockEntity.java @@ -1,21 +1,18 @@ package com.copycatsplus.copycats.content.copycat.sliding_door; -import com.copycatsplus.copycats.Copycats; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; import com.copycatsplus.copycats.mixin.copycat.sliding_door.SlidingDoorBlockEntityAccessor; import com.simibubi.create.content.contraptions.StructureTransform; import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlockEntity; import com.simibubi.create.content.schematics.requirement.ItemRequirement; -import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; -import com.simibubi.create.foundation.utility.animation.LerpedFloat; +import net.createmod.catnip.animation.LerpedFloat; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; - -import static net.minecraft.world.level.block.DoorBlock.HALF; public class CopycatSlidingDoorBlockEntity extends SlidingDoorBlockEntity implements ICopycatBlockEntity { @@ -32,6 +29,11 @@ public LerpedFloat animation() { return ((SlidingDoorBlockEntityAccessor) this).getAnimation(); } + @Override + public boolean shouldRenderSpecial(BlockState state) { + return super.shouldRenderSpecial(state); + } + @Override public BlockState getMaterial() { return material; @@ -63,9 +65,9 @@ public void setCTEnabledInternal(boolean value) { } @Override - public void invalidate() { - super.invalidate(); - ICopycatBlockEntity.super.invalidate(); + public void onLoad() { + super.onLoad(); + ICopycatBlockEntity.super.onLoad(); } @Override @@ -74,26 +76,26 @@ public ItemRequirement getRequiredItems(BlockState state) { } @Override - public void transform(StructureTransform transform) { - ICopycatBlockEntity.super.transform(transform); + public void transform(BlockEntity blockEntity, StructureTransform transform) { + ICopycatBlockEntity.super.transform(blockEntity, transform); } @Override - public void read(CompoundTag tag, boolean clientPacket) { - super.read(tag, clientPacket); - ICopycatBlockEntity.read(this, tag, clientPacket); + public void read(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.read(tag, registries, clientPacket); + ICopycatBlockEntity.read(this, tag, registries, clientPacket); } @Override - public void writeSafe(CompoundTag tag) { - super.writeSafe(tag); - ICopycatBlockEntity.writeSafe(this, tag); + public void writeSafe(CompoundTag tag, HolderLookup.Provider registries) { + super.writeSafe(tag, registries); + ICopycatBlockEntity.writeSafe(this, tag, registries); } @Override - public void write(CompoundTag tag, boolean clientPacket) { - super.write(tag, clientPacket); - ICopycatBlockEntity.write(this, tag, clientPacket); + public void write(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.write(tag, registries, clientPacket); + ICopycatBlockEntity.write(this, tag, registries, clientPacket); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorRenderer.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorRenderer.java index 0ee9872ad..6370c8e9d 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorRenderer.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/sliding_door/CopycatSlidingDoorRenderer.java @@ -6,9 +6,9 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlock; import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer; -import com.simibubi.create.foundation.render.SuperByteBuffer; -import com.simibubi.create.foundation.utility.AngleHelper; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; +import net.createmod.catnip.math.AngleHelper; +import net.createmod.catnip.render.SuperByteBuffer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; @@ -17,7 +17,6 @@ import net.minecraft.world.level.block.DoorBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.DoorHingeSide; -import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; import net.minecraft.world.phys.Vec3; public class CopycatSlidingDoorRenderer extends SafeBlockEntityRenderer implements IKineticCopycatBlockRenderer { @@ -29,6 +28,8 @@ public CopycatSlidingDoorRenderer(BlockEntityRendererProvider.Context context) { protected void renderSafe(CopycatSlidingDoorBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) { BlockState blockState = be.getBlockState(); + if (!be.shouldRenderSpecial(blockState)) + return; Direction facing = blockState.getValue(DoorBlock.FACING); Direction movementDirection = facing.getClockWise(); @@ -39,7 +40,7 @@ protected void renderSafe(CopycatSlidingDoorBlockEntity be, float partialTicks, float value = be.animation().getValue(partialTicks); float value2 = Mth.clamp(value * 10, 0, 1); - VertexConsumer vb = buffer.getBuffer(RenderType.cutoutMipped()); + VertexConsumer vb = buffer.getBuffer(RenderType.translucentMovingBlock()); Vec3 offset = Vec3.atLowerCornerOf(movementDirection.getNormal()) .scale(value * value * 13 / 16f) .add(Vec3.atLowerCornerOf(facing.getNormal()) @@ -56,16 +57,16 @@ protected void renderSafe(CopycatSlidingDoorBlockEntity be, float partialTicks, partial.translate(0, -1 / 512f, 0) .translate(Vec3.atLowerCornerOf(facing.getNormal()) .scale(value2 * 1 / 32f)); - partial.rotateCentered(Direction.UP, - Mth.DEG_TO_RAD * AngleHelper.horizontalAngle(facing.getClockWise())); + partial.rotateCentered( + Mth.DEG_TO_RAD * AngleHelper.horizontalAngle(facing.getClockWise()), Direction.UP); if (flip) partial.translate(0, 0, 1); - partial.rotateY(91 * f * value * value); + partial.rotateYDegrees(91 * f * value * value); if (!left) partial.translate(0, 0, f / 2f) - .rotateY(-181 * f * value * value); + .rotateYDegrees(-181 * f * value * value); if (flip) partial.translate(0, 0, -1 / 2f); diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/slope/CopycatSlopeBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/slope/CopycatSlopeBlock.java index 26852ee4a..300e1a822 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/slope/CopycatSlopeBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/slope/CopycatSlopeBlock.java @@ -9,14 +9,14 @@ import com.copycatsplus.copycats.utility.BlockUtils; import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.foundation.placement.PlacementHelpers; import com.simibubi.create.foundation.placement.PoleHelper; +import net.createmod.catnip.placement.PlacementHelpers; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; @@ -25,8 +25,6 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Mirror; -import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; @@ -60,11 +58,10 @@ public CopycatSlopeBlock(Properties pProperties) { } @Override - public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @NotNull Player player, @NotNull InteractionHand hand, - @NotNull BlockHitResult ray) { - return InteractionUtils.sequential( - () -> InteractionUtils.usePlacementHelper(placementHelperId, state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> InteractionUtils.usePlacementHelper(placementHelperId, stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -78,7 +75,7 @@ public Optional isCTBlocked(BlockAndTintGetter reader, BlockState state @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return false; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/slope_layer/CopycatSlopeLayerBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/slope_layer/CopycatSlopeLayerBlock.java index a89ba36ee..5a4dcf6c9 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/slope_layer/CopycatSlopeLayerBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/slope_layer/CopycatSlopeLayerBlock.java @@ -6,8 +6,9 @@ import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.copycatsplus.copycats.foundation.copycat.IStateType; import com.copycatsplus.copycats.utility.BlockUtils; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; @@ -18,11 +19,9 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Mirror; import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; @@ -40,7 +39,7 @@ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatSlopeLayerBlock extends CCWaterloggedCopycatBlock implements ISpecialBlockItemRequirement, IStateType { +public class CopycatSlopeLayerBlock extends CCWaterloggedCopycatBlock implements SpecialBlockItemRequirement, IStateType { public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; @@ -121,7 +120,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) BlockPos up = pos.relative(Direction.UP); // need to call updateShape before setBlock to schedule a tick for water world.setBlockAndUpdate(pos, state.setValue(LAYERS, state.getValue(LAYERS) - 1).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } @@ -148,16 +147,14 @@ public BlockState transform(BlockState state, StructureTransform transform) { return BlockUtils.transformStepLikeHorizontal(state, transform, defaultBlockState()); } - @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return switch (pType) { case LAND -> pState.getValue(LAYERS) < 5 && pState.getValue(FACING).equals(UP); default -> false; }; } - @SuppressWarnings("deprecation") @Override public @NotNull VoxelShape getShape(BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { return CCShapes.SLOPE_LAYER.get(pState.getValue(FACING)).get(pState.getValue(HALF)).get(pState.getValue(LAYERS)).toShape(); diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/stacked_half_layer/CopycatStackedHalfLayerBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/stacked_half_layer/CopycatStackedHalfLayerBlock.java index 7a7c3c777..da5058232 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/stacked_half_layer/CopycatStackedHalfLayerBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/stacked_half_layer/CopycatStackedHalfLayerBlock.java @@ -2,14 +2,14 @@ import com.copycatsplus.copycats.CCShapes; import com.copycatsplus.copycats.Copycats; -import com.copycatsplus.copycats.content.copycat.half_layer.CopycatHalfLayerBlock; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.multistate.WaterloggedMultiStateCopycatBlock; import com.copycatsplus.copycats.utility.BlockFaceUtils; import com.google.common.collect.ImmutableMap; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; @@ -29,7 +29,6 @@ import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; -import net.minecraft.world.level.block.state.properties.Half; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.Vec3; @@ -41,13 +40,12 @@ import javax.annotation.ParametersAreNonnullByDefault; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; import static com.copycatsplus.copycats.content.copycat.half_layer.CopycatHalfLayerBlock.*; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatStackedHalfLayerBlock extends WaterloggedMultiStateCopycatBlock implements ISpecialBlockItemRequirement { +public class CopycatStackedHalfLayerBlock extends WaterloggedMultiStateCopycatBlock implements SpecialBlockItemRequirement { public static final EnumProperty FACING = BlockStateProperties.HORIZONTAL_FACING; @@ -202,7 +200,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) BlockPos up = pos.relative(Direction.UP); // need to call updateShape before setBlock to schedule a tick for water world.setBlockAndUpdate(pos, state.setValue(targetProp, state.getValue(targetProp) - 1).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } @@ -225,7 +223,7 @@ public void transformStorage(BlockState state, IMultiStateCopycatBlockEntity be, @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return false; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/stairs/CopycatStairsBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/stairs/CopycatStairsBlock.java index 03ca5a32b..3c50243cb 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/stairs/CopycatStairsBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/stairs/CopycatStairsBlock.java @@ -1,7 +1,6 @@ package com.copycatsplus.copycats.content.copycat.stairs; import com.copycatsplus.copycats.CCBlockEntityTypes; -import com.copycatsplus.copycats.CCBlockStateProperties; import com.copycatsplus.copycats.CCBlockStateProperties.Side; import com.copycatsplus.copycats.CCBlocks; import com.copycatsplus.copycats.content.copycat.vertical_stairs.CopycatVerticalStairBlock; @@ -17,10 +16,9 @@ import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; -import net.minecraft.util.Mth; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -39,8 +37,6 @@ import java.util.Optional; import static com.copycatsplus.copycats.CCBlockStateProperties.SIDE; -import static com.copycatsplus.copycats.content.copycat.slab.CopycatSlabBlock.getApparentDirection; -import static com.copycatsplus.copycats.content.copycat.slab.CopycatSlabBlock.setApparentDirection; import static net.minecraft.core.Direction.*; @ParametersAreNonnullByDefault @@ -58,15 +54,18 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -82,9 +81,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/trapdoor/CopycatTrapdoorBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/trapdoor/CopycatTrapdoorBlock.java index 420961ae9..0f4147a31 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/trapdoor/CopycatTrapdoorBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/trapdoor/CopycatTrapdoorBlock.java @@ -11,6 +11,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -22,6 +23,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -31,8 +33,8 @@ @MethodsReturnNonnullByDefault public class CopycatTrapdoorBlock extends TrapDoorBlock implements ICopycatBlock, IBE, IStateType { - public CopycatTrapdoorBlock(Properties properties, BlockSetType type) { - super(properties, type); + public CopycatTrapdoorBlock(BlockSetType type, Properties properties) { + super(type, properties); } @Nullable @@ -42,15 +44,18 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -66,9 +71,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -97,6 +103,15 @@ public boolean canConnectTexturesToward(BlockAndTintGetter reader, BlockPos from return false; } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } public boolean supportsExternalFaceHiding(BlockState state) { return true; diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_half_layer/CopycatVerticalHalfLayerBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_half_layer/CopycatVerticalHalfLayerBlock.java index f33ae8cf3..f20efa762 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_half_layer/CopycatVerticalHalfLayerBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_half_layer/CopycatVerticalHalfLayerBlock.java @@ -2,14 +2,14 @@ import com.copycatsplus.copycats.CCShapes; import com.copycatsplus.copycats.Copycats; -import com.copycatsplus.copycats.content.copycat.stacked_half_layer.CopycatStackedHalfLayerBlock; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.multistate.WaterloggedMultiStateCopycatBlock; import com.copycatsplus.copycats.utility.BlockFaceUtils; import com.google.common.collect.ImmutableMap; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; @@ -47,7 +47,7 @@ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatVerticalHalfLayerBlock extends WaterloggedMultiStateCopycatBlock implements ISpecialBlockItemRequirement { +public class CopycatVerticalHalfLayerBlock extends WaterloggedMultiStateCopycatBlock implements SpecialBlockItemRequirement { public static final EnumProperty FACING = BlockStateProperties.HORIZONTAL_FACING; @@ -225,7 +225,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) BlockPos up = pos.relative(Direction.UP); // need to call updateShape before setBlock to schedule a tick for water world.setBlockAndUpdate(pos, state.setValue(targetProp, state.getValue(targetProp) - 1).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } @@ -248,7 +248,7 @@ public void transformStorage(BlockState state, IMultiStateCopycatBlockEntity be, @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return false; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_slice/CopycatVerticalSliceBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_slice/CopycatVerticalSliceBlock.java index ddd060d17..57893b436 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_slice/CopycatVerticalSliceBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_slice/CopycatVerticalSliceBlock.java @@ -7,33 +7,29 @@ import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.copycatsplus.copycats.foundation.copycat.IStateType; import com.copycatsplus.copycats.utility.BlockUtils; +import com.simibubi.create.api.schematic.requirement.SpecialBlockItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockItemRequirement; +import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; -import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.utility.Pair; +import net.createmod.catnip.data.Iterate; +import net.createmod.catnip.data.Pair; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Mirror; -import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.DirectionProperty; -import net.minecraft.world.level.block.state.properties.Half; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.shapes.CollisionContext; @@ -45,12 +41,11 @@ import java.util.List; import java.util.Map; -import static com.copycatsplus.copycats.content.copycat.slice.CopycatSliceBlock.HALF; import static net.minecraft.core.Direction.Axis; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatVerticalSliceBlock extends CCWaterloggedCopycatBlock implements ISpecialBlockItemRequirement, IStateType { +public class CopycatVerticalSliceBlock extends CCWaterloggedCopycatBlock implements SpecialBlockItemRequirement, IStateType { public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; public static final IntegerProperty LAYERS = BlockStateProperties.LAYERS; @@ -66,7 +61,7 @@ public CopycatVerticalSliceBlock(Properties pProperties) { @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return false; } @@ -146,7 +141,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) BlockPos up = pos.relative(Direction.UP); // need to call updateShape before setBlock to schedule a tick for water world.setBlockAndUpdate(pos, state.setValue(LAYERS, state.getValue(LAYERS) - 1).updateShape(Direction.UP, world.getBlockState(up), world, pos, up)); - playRemoveSound(world, pos); + IWrenchable.playRemoveSound(world, pos); } return InteractionResult.SUCCESS; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_slope/CopycatVerticalSlopeBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_slope/CopycatVerticalSlopeBlock.java index 818fd3c94..2302f50be 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_slope/CopycatVerticalSlopeBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_slope/CopycatVerticalSlopeBlock.java @@ -9,16 +9,16 @@ import com.copycatsplus.copycats.utility.BlockUtils; import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.foundation.placement.PlacementHelpers; import com.simibubi.create.foundation.placement.PoleHelper; -import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.utility.Pair; +import net.createmod.catnip.data.Iterate; +import net.createmod.catnip.data.Pair; +import net.createmod.catnip.placement.PlacementHelpers; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; @@ -27,8 +27,6 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Mirror; -import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; @@ -62,11 +60,10 @@ public CopycatVerticalSlopeBlock(Properties pProperties) { } @Override - public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @NotNull Player player, @NotNull InteractionHand hand, - @NotNull BlockHitResult ray) { - return InteractionUtils.sequential( - () -> InteractionUtils.usePlacementHelper(placementHelperId, state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> InteractionUtils.usePlacementHelper(placementHelperId, stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -88,7 +85,7 @@ public Optional isCTBlocked(BlockAndTintGetter reader, BlockState state @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return false; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_stairs/CopycatVerticalStairBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_stairs/CopycatVerticalStairBlock.java index 6574272e1..66315d0c0 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_stairs/CopycatVerticalStairBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_stairs/CopycatVerticalStairBlock.java @@ -5,21 +5,19 @@ import com.copycatsplus.copycats.CCBlockStateProperties.VerticalStairShape; import com.copycatsplus.copycats.CCBlocks; import com.copycatsplus.copycats.CCShapes; -import com.copycatsplus.copycats.content.copycat.slice.CopycatSliceBlock; +import com.copycatsplus.copycats.content.copycat.stairs.CopycatStairsBlock; +import com.copycatsplus.copycats.content.copycat.stairs.CopycatStairsBlock.FaceShape; import com.copycatsplus.copycats.foundation.copycat.CCWaterloggedCopycatBlock; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.copycatsplus.copycats.foundation.copycat.ICustomCTBlocking; import com.copycatsplus.copycats.foundation.copycat.IStateType; -import com.copycatsplus.copycats.content.copycat.stairs.CopycatStairsBlock; -import com.copycatsplus.copycats.content.copycat.stairs.CopycatStairsBlock.FaceShape; import com.copycatsplus.copycats.utility.BlockUtils; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; -import net.minecraft.util.Mth; +import net.minecraft.core.Direction.AxisDirection; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; @@ -30,15 +28,19 @@ import net.minecraft.world.level.block.StairBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.*; + + +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.level.block.state.properties.EnumProperty; +import net.minecraft.world.level.block.state.properties.Half; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.NotNull; - import javax.annotation.ParametersAreNonnullByDefault; import java.util.Optional; -import static net.minecraft.core.Direction.*; + import static net.minecraft.world.level.block.StairBlock.HALF; @SuppressWarnings("deprecation") @@ -70,7 +72,7 @@ public BlockState getStateForPlacement(BlockPlaceContext context) { Direction facing = context.getHorizontalDirection(); Side side = context.getClickLocation().get(facing.getClockWise().getAxis()) - context.getClickedPos().get(facing.getClockWise().getAxis()) > 0.5 ? Side.RIGHT : Side.LEFT; - if (facing.getCounterClockWise().getAxisDirection() == Direction.AxisDirection.POSITIVE) { + if (facing.getCounterClockWise().getAxisDirection() == AxisDirection.POSITIVE) { side = side.getOpposite(); } BlockState blockState = defaultBlockState().setValue(FACING, facing).setValue(SIDE, side); diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_step/CopycatVerticalStepBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_step/CopycatVerticalStepBlock.java index 964c4bf07..70c155e8d 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_step/CopycatVerticalStepBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/vertical_step/CopycatVerticalStepBlock.java @@ -9,26 +9,23 @@ import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.foundation.placement.PlacementHelpers; import com.simibubi.create.foundation.placement.PoleHelper; -import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.utility.Pair; +import net.createmod.catnip.data.Iterate; +import net.createmod.catnip.data.Pair; +import net.createmod.catnip.placement.PlacementHelpers; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; -import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Mirror; -import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; @@ -61,17 +58,15 @@ public CopycatVerticalStepBlock(Properties pProperties) { } @Override - public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @NotNull Player player, @NotNull InteractionHand hand, - @NotNull BlockHitResult ray) { - return InteractionUtils.sequential( - () -> InteractionUtils.usePlacementHelper(placementHelperId, state, world, pos, player, hand, ray), - () -> super.use(state, world, pos, player, hand, ray) + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> InteractionUtils.usePlacementHelper(placementHelperId, stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } - @SuppressWarnings("deprecation") @Override - public boolean isPathfindable(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull PathComputationType pType) { + public boolean isPathfindable(@NotNull BlockState pState, @NotNull PathComputationType pType) { return false; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/wall/CopycatWallBlock.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/wall/CopycatWallBlock.java index 6b86ebc2a..49e68704c 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/wall/CopycatWallBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/wall/CopycatWallBlock.java @@ -6,13 +6,14 @@ import com.copycatsplus.copycats.foundation.copycat.IStateType; import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.foundation.block.IBE; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Vec3i; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; @@ -28,6 +29,7 @@ import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.WallSide; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -55,15 +57,18 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { return InteractionUtils.sequential( - () -> ICopycatBlock.super.use(state, level, pos, player, hand, hit), - () -> super.use(state, level, pos, player, hand, hit) + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) ); } @@ -84,9 +89,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { + public BlockState playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) { ICopycatBlock.super.playerWillDestroy(pLevel, pPos, pState, pPlayer); super.playerWillDestroy(pLevel, pPos, pState, pPlayer); + return pState; } @Override @@ -171,6 +177,16 @@ private boolean canConnectVertically(BlockState state) { return true; } + @Override + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + public boolean supportsExternalFaceHiding(BlockState state) { return true; } diff --git a/common/src/main/java/com/copycatsplus/copycats/content/copycat/wall/CopycatWallModelCore.java b/common/src/main/java/com/copycatsplus/copycats/content/copycat/wall/CopycatWallModelCore.java index a1ed1ba0b..e373aca0a 100644 --- a/common/src/main/java/com/copycatsplus/copycats/content/copycat/wall/CopycatWallModelCore.java +++ b/common/src/main/java/com/copycatsplus/copycats/content/copycat/wall/CopycatWallModelCore.java @@ -3,9 +3,8 @@ import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; import com.copycatsplus.copycats.foundation.copycat.model.assembly.AssemblyTransform; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.Direction; -import net.minecraft.world.level.block.LadderBlock; import net.minecraft.world.level.block.WallBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.WallSide; diff --git a/common/src/main/java/com/copycatsplus/copycats/datagen/CCDatagen.java b/common/src/main/java/com/copycatsplus/copycats/datagen/CCDatagen.java index cccd86738..744803899 100644 --- a/common/src/main/java/com/copycatsplus/copycats/datagen/CCDatagen.java +++ b/common/src/main/java/com/copycatsplus/copycats/datagen/CCDatagen.java @@ -1,10 +1,10 @@ package com.copycatsplus.copycats.datagen; -import com.copycatsplus.copycats.CopycatRegistrate; import com.copycatsplus.copycats.Copycats; import com.copycatsplus.copycats.foundation.tooltip.CopycatCharacteristics; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import com.simibubi.create.foundation.data.CreateRegistrate; import com.simibubi.create.foundation.utility.FilesHelper; import com.tterrag.registrate.providers.ProviderType; @@ -13,7 +13,7 @@ public class CCDatagen { - private static final CopycatRegistrate REGISTRATE = Copycats.getRegistrate(); + private static final CreateRegistrate REGISTRATE = Copycats.getRegistrate(); protected static void addExtraRegistrateData() { CCTagGen.addGenerators(); diff --git a/common/src/main/java/com/copycatsplus/copycats/datagen/CCLootGen.java b/common/src/main/java/com/copycatsplus/copycats/datagen/CCLootGen.java index a13ab9225..3a45c9c5f 100644 --- a/common/src/main/java/com/copycatsplus/copycats/datagen/CCLootGen.java +++ b/common/src/main/java/com/copycatsplus/copycats/datagen/CCLootGen.java @@ -3,9 +3,9 @@ import com.copycatsplus.copycats.content.copycat.board.CopycatBoardBlock; import com.copycatsplus.copycats.content.copycat.byte_panel.CopycatBytePanelBlock; import com.copycatsplus.copycats.content.copycat.bytes.CopycatByteBlock; -import com.simibubi.create.foundation.utility.Iterate; import com.tterrag.registrate.providers.loot.RegistrateBlockLootTables; import com.tterrag.registrate.util.nullness.NonNullBiConsumer; +import net.createmod.catnip.data.Iterate; import net.minecraft.advancements.critereon.StatePropertiesPredicate; import net.minecraft.core.Direction; import net.minecraft.world.level.block.Block; diff --git a/common/src/main/java/com/copycatsplus/copycats/datagen/CCTagGen.java b/common/src/main/java/com/copycatsplus/copycats/datagen/CCTagGen.java index b24447b56..0b7934346 100644 --- a/common/src/main/java/com/copycatsplus/copycats/datagen/CCTagGen.java +++ b/common/src/main/java/com/copycatsplus/copycats/datagen/CCTagGen.java @@ -19,9 +19,9 @@ public static void addGenerators() { private static void genBlockTags(RegistrateTagsProvider provIn) { TagGen.CreateTagsProvider prov = new TagGen.CreateTagsProvider<>(provIn, Block::builtInRegistryHolder); - prov.tag(TagKey.create(BuiltInRegistries.BLOCK.key(), new ResourceLocation(Mods.DIAGONAL_FENCES.id(), "non_diagonal_fences"))) + prov.tag(TagKey.create(BuiltInRegistries.BLOCK.key(), ResourceLocation.fromNamespaceAndPath(Mods.DIAGONAL_FENCES.id(), "non_diagonal_fences"))) .add(CCBlocks.COPYCAT_FENCE.get()); - prov.tag(TagKey.create(BuiltInRegistries.BLOCK.key(), new ResourceLocation(Mods.DIAGONAL_WALLS.id(), "non_diagonal_walls"))) + prov.tag(TagKey.create(BuiltInRegistries.BLOCK.key(), ResourceLocation.fromNamespaceAndPath(Mods.DIAGONAL_WALLS.id(), "non_diagonal_walls"))) .add(CCBlocks.COPYCAT_WALL.get()); // prov.tag(AllTags.AllBlockTags.COPYCAT_DENY.tag) // .addTag(AllTags.AllBlockTags.TRACKS.tag); diff --git a/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/CCStandardRecipes.java b/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/CCStandardRecipes.java index f4173784e..38d6a7ffb 100644 --- a/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/CCStandardRecipes.java +++ b/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/CCStandardRecipes.java @@ -12,6 +12,7 @@ import com.tterrag.registrate.util.entry.ItemProviderEntry; import com.tterrag.registrate.util.entry.RegistryEntry; import dev.architectury.injectables.annotations.ExpectPlatform; +import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; @@ -24,6 +25,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; +import java.util.concurrent.CompletableFuture; import java.util.function.Supplier; import java.util.stream.Collectors; @@ -234,7 +236,7 @@ public class CCStandardRecipes extends CopycatsRecipeProvider { GeneratedRecipe COPYCAT_PANE_CYCLE = conversionCycle(CCBlocks.COPYCAT_PANE, CCBlocks.COPYCAT_FLAT_PANE); - Set> blocksWithoutRecipe = Set.of( + Set> blocksWithoutRecipe = Set.of( CCBlocks.COPYCAT_BASE, CCBlocks.COPYCAT_GLASS_FLUID_PIPE ); @@ -259,7 +261,7 @@ static GeneratedRecipeBuilder create(ResourceLocation result) { throw new AssertionError(); } - static GeneratedRecipeBuilder create(ItemProviderEntry result) { + static GeneratedRecipeBuilder create(ItemProviderEntry result) { return create(result::get); } @@ -267,7 +269,7 @@ static GeneratedRecipeBuilder create(ItemLike result) { return create(() -> result); } - GeneratedRecipeBuilder.GeneratedRecipe copycat(ItemProviderEntry result, int resultCount) { + GeneratedRecipeBuilder.GeneratedRecipe copycat(ItemProviderEntry result, int resultCount) { if (result.get() instanceof ICopycatBlock) { copycatsWithRecipes.add((Block) result.get()); } @@ -280,7 +282,7 @@ GeneratedRecipeBuilder.GeneratedRecipe copycat(ItemProviderEntry base, ItemProviderEntry result, int resultCount) { + GeneratedRecipeBuilder.GeneratedRecipe copycatWithBaseItem(ItemProviderEntry base, ItemProviderEntry result, int resultCount) { if (result.get() instanceof ICopycatBlock) { copycatsWithRecipes.add((Block) result.get()); } @@ -292,7 +294,7 @@ GeneratedRecipeBuilder.GeneratedRecipe copycatWithBaseItem(ItemProviderEntry b.requires(base, resultCount).requires(AllItems.ZINC_INGOT)); } - GeneratedRecipeBuilder.GeneratedRecipe copycatWithBaseItem(ItemLike base, ItemProviderEntry result, int resultCount) { + GeneratedRecipeBuilder.GeneratedRecipe copycatWithBaseItem(ItemLike base, ItemProviderEntry result, int resultCount) { if (result.get() instanceof ICopycatBlock) { copycatsWithRecipes.add((Block) result.get()); } @@ -305,11 +307,11 @@ GeneratedRecipeBuilder.GeneratedRecipe copycatWithBaseItem(ItemLike base, ItemPr } @SafeVarargs - final GeneratedRecipe conversionCycle(ItemProviderEntry... cycle) { + final GeneratedRecipe conversionCycle(ItemProviderEntry... cycle) { GeneratedRecipe result = null; for (int i = 0; i < cycle.length; i++) { - ItemProviderEntry currentEntry = cycle[i]; - ItemProviderEntry nextEntry = cycle[(i + 1) % cycle.length]; + ItemProviderEntry currentEntry = cycle[i]; + ItemProviderEntry nextEntry = cycle[(i + 1) % cycle.length]; result = create(nextEntry).withSuffix("_from_conversion") .unlockedBy(currentEntry::get) .requiresFeature(currentEntry.getId()) @@ -319,11 +321,11 @@ final GeneratedRecipe conversionCycle(ItemProviderEntry... c return result; } - public CCStandardRecipes(PackOutput output) { - super(output); + public CCStandardRecipes(PackOutput output, CompletableFuture registries) { + super(output, registries); List missingRecipes = new LinkedList<>(); - for (RegistryEntry entry : CCBlocks.getAllRegisteredBlocksWithoutWrapped()) { + for (RegistryEntry entry : CCBlocks.getAllRegisteredBlocksWithoutWrapped()) { if (!blocksWithoutRecipe.contains(entry)) { if (!copycatsWithRecipes.contains(entry.get())) missingRecipes.add(entry.getId()); @@ -338,16 +340,16 @@ public enum TaggedIngredients { ZINC(CCTags.commonItemTag("ingots/zinc"), CCTags.commonItemTag("zinc_ingots")); - private final TagKey forge; + private final TagKey neoforge; private final TagKey fabric; - TaggedIngredients(TagKey forge, TagKey fabric) { - this.forge = forge; + TaggedIngredients(TagKey neoforge, TagKey fabric) { + this.neoforge = neoforge; this.fabric = fabric; } public TagKey getTag() { - return Platform.getCurrent().equals(Platform.FORGE) ? this.forge : this.fabric; + return Platform.getCurrent().equals(Platform.NEOFORGE) ? this.neoforge : this.fabric; } } } diff --git a/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/gen/CopycatsRecipeProvider.java b/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/gen/CopycatsRecipeProvider.java index 2ae438d41..869765f8b 100644 --- a/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/gen/CopycatsRecipeProvider.java +++ b/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/gen/CopycatsRecipeProvider.java @@ -1,28 +1,28 @@ package com.copycatsplus.copycats.datagen.recipes.gen; +import com.copycatsplus.copycats.CCBlocks; import com.copycatsplus.copycats.Copycats; +import com.copycatsplus.copycats.datagen.recipes.CCStandardRecipes; +import net.minecraft.advancements.critereon.ItemPredicate; +import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; -import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeCategory; +import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.data.recipes.SingleItemRecipeBuilder; +import net.minecraft.world.item.crafting.Ingredient; import org.jetbrains.annotations.NotNull; - import java.util.ArrayList; import java.util.List; -import java.util.function.Consumer; - +import java.util.concurrent.CompletableFuture; import static com.copycatsplus.copycats.datagen.recipes.gen.GeneratedRecipeBuilder.GeneratedRecipe; public abstract class CopycatsRecipeProvider extends RecipeProvider { protected static final List all = new ArrayList<>(); - public CopycatsRecipeProvider(PackOutput output) { - super(output); - } - - public void registerRecipes(@NotNull Consumer p_200404_1_) { - all.forEach(c -> c.register(p_200404_1_)); - Copycats.LOGGER.info(getName() + " registered " + all.size() + " recipe" + (all.size() == 1 ? "" : "s")); + public CopycatsRecipeProvider(PackOutput output, CompletableFuture registries) { + super(output, registries); } public static GeneratedRecipe register(GeneratedRecipe recipe) { @@ -31,8 +31,9 @@ public static GeneratedRecipe register(GeneratedRecipe recipe) { } @Override - public void buildRecipes(Consumer writer) { - all.forEach(recipe -> recipe.register(writer)); + public void buildRecipes(@NotNull RecipeOutput output) { + all.forEach(recipe -> recipe.register(output)); + Copycats.LOGGER.info("{} registered {} recipe{}", getName(), all.size(), all.size() == 1 ? "" : "s"); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/gen/GeneratedRecipeBuilder.java b/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/gen/GeneratedRecipeBuilder.java index 90787767e..8bcf0ddc4 100644 --- a/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/gen/GeneratedRecipeBuilder.java +++ b/common/src/main/java/com/copycatsplus/copycats/datagen/recipes/gen/GeneratedRecipeBuilder.java @@ -1,7 +1,7 @@ package com.copycatsplus.copycats.datagen.recipes.gen; import com.tterrag.registrate.util.entry.BlockEntry; -import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.data.recipes.ShapedRecipeBuilder; import net.minecraft.data.recipes.ShapelessRecipeBuilder; import net.minecraft.data.recipes.SimpleCookingRecipeBuilder; @@ -39,7 +39,7 @@ public interface GeneratedRecipeBuilder { GeneratedRecipeBuilder requiresFeature(ResourceLocation location, boolean invert); - GeneratedRecipe handleConditions(Consumer> recipe); + GeneratedRecipe handleConditions(Consumer recipe); GeneratedCookingRecipeBuilder viaCooking(Supplier item); @@ -80,6 +80,6 @@ public interface GeneratedStoneCuttingRecipeBuilder { @FunctionalInterface public interface GeneratedRecipe { - void register(Consumer consumer); + void register(RecipeOutput output); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CCCopycatBlock.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CCCopycatBlock.java index 7f8cf6abc..5ec7a31f3 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CCCopycatBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CCCopycatBlock.java @@ -4,6 +4,7 @@ import javax.annotation.ParametersAreNonnullByDefault; import com.copycatsplus.copycats.CCBlockEntityTypes; +import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.content.contraptions.StructureTransform; import com.simibubi.create.foundation.block.IBE; @@ -11,6 +12,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -34,7 +36,6 @@ * {@link ICopycatBlock} without extending this class. Check for copycats with instanceof checks * against {@link ICopycatBlock} instead. */ -@SuppressWarnings("deprecation") @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public abstract class CCCopycatBlock extends Block implements IBE, ICopycatBlock { @@ -50,13 +51,19 @@ public BlockEntityTicker getTicker(Level level, Block } @Override - public InteractionResult use(BlockState state, - Level level, - BlockPos pos, - Player player, - InteractionHand hand, - BlockHitResult hit) { - return ICopycatBlock.super.use(state, level, pos, player, hand, hit); + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + return InteractionUtils.sequential( + () -> ICopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> ICopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) + ); } @Override @@ -71,9 +78,10 @@ public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState } @Override - public void playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { + public BlockState playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { super.playerWillDestroy(level, pos, state, player); ICopycatBlock.super.playerWillDestroy(level, pos, state, player); + return state; } @SuppressWarnings("deprecation") diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CCCopycatBlockEntity.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CCCopycatBlockEntity.java index cb6f65da8..a914f0747 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CCCopycatBlockEntity.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CCCopycatBlockEntity.java @@ -9,6 +9,7 @@ import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.HolderGetter; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; @@ -98,9 +99,9 @@ public void setCTEnabledInternal(boolean value) { } @Override - public void invalidate() { - super.invalidate(); - ICopycatBlockEntity.super.invalidate(); + public void onLoad() { + super.onLoad(); + ICopycatBlockEntity.super.onLoad(); } @Override @@ -113,21 +114,21 @@ public ItemRequirement getRequiredItems(BlockState state) { } @Override - public void read(CompoundTag tag, boolean clientPacket) { - super.read(tag, clientPacket); - ICopycatBlockEntity.read(this, tag, clientPacket); + public void read(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.read(tag, registries, clientPacket); + ICopycatBlockEntity.read(this, tag, registries, clientPacket); } @Override - public void writeSafe(CompoundTag tag) { - super.writeSafe(tag); - ICopycatBlockEntity.writeSafe(this, tag); + public void writeSafe(CompoundTag tag, HolderLookup.Provider registries) { + super.writeSafe(tag, registries); + ICopycatBlockEntity.writeSafe(this, tag, registries); } @Override - public void write(CompoundTag tag, boolean clientPacket) { - super.write(tag, clientPacket); - ICopycatBlockEntity.write(this, tag, clientPacket); + public void write(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.write(tag, registries, clientPacket); + ICopycatBlockEntity.write(this, tag, registries, clientPacket); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CopycatMaterialStore.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CopycatMaterialStore.java deleted file mode 100644 index 732914db4..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CopycatMaterialStore.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.copycatsplus.copycats.foundation.copycat; - -import com.copycatsplus.copycats.compat.FlywheelCompat; -import com.copycatsplus.copycats.compat.Mods; -import com.copycatsplus.copycats.compat.SodiumCompat; -import com.copycatsplus.copycats.foundation.copycat.model.kinetic.WrappedRenderWorld; -import com.copycatsplus.copycats.utility.Platform; -import com.mojang.datafixers.util.Either; -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.ChunkPos; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.chunk.LevelChunk; - -import java.util.Collections; -import java.util.Map; -import java.util.WeakHashMap; -import java.util.concurrent.ConcurrentHashMap; - -/** - * Thread-safe store for copycat materials. Useful for cross-thread access of copycat materials during rendering/lighting. - */ -public class CopycatMaterialStore { - private final Map>>> materialMap = new ConcurrentHashMap<>(); - - private static final Map STORES = Collections.synchronizedMap(new WeakHashMap<>()); - - private void setMaterial(BlockPos pos, BlockState state) { - ChunkPos chunkPos = new ChunkPos(pos); - materialMap.computeIfAbsent(chunkPos, p -> new ConcurrentHashMap<>()).put(pos, Either.left(state)); - } - - private void setMaterial(BlockPos pos, Map states) { - ChunkPos chunkPos = new ChunkPos(pos); - materialMap.computeIfAbsent(chunkPos, p -> new ConcurrentHashMap<>()).put(pos, Either.right(states)); - } - - private Either> getMaterial(BlockPos pos) { - return materialMap.getOrDefault(new ChunkPos(pos), Map.of()).getOrDefault(pos, Either.left(Blocks.AIR.defaultBlockState())); - } - - public void unloadChunk(ChunkPos chunk) { - materialMap.remove(chunk); - } - - private static CopycatMaterialStore get(BlockGetter level) { - if (Platform.Environment.CLIENT.isCurrent() && level instanceof WrappedRenderWorld wrapped) { - level = wrapped.getLevel(); - } - if (Platform.Environment.CLIENT.isCurrent() && Mods.SODIUM.getLoaded()) { - try { - level = SodiumCompat.unwrapSodiumLevel(level); - } catch (Exception ex) { - // Ignore, since Sodium might not be installed - } - } - if (level instanceof LevelChunk chunk) { - level = chunk.getLevel(); - } - if (Platform.Environment.CLIENT.isCurrent() && Mods.FLYWHEEL.getLoaded()) { - try { - level = FlywheelCompat.unwrapFlywheelLevel(level); - } catch (Exception ex) { - // Ignore, since Flywheel might not be installed - } - } - return STORES.computeIfAbsent(level, l -> new CopycatMaterialStore()); - } - - public static void setMaterial(BlockGetter level, BlockPos pos, BlockState state) { - get(level).setMaterial(pos, state); - } - - public static void setMaterial(BlockGetter level, BlockPos pos, Map states) { - get(level).setMaterial(pos, states); - } - - public static Either> getMaterial(BlockGetter level, BlockPos pos) { - return get(level).getMaterial(pos); - } - - public static void unloadLevel(BlockGetter level) { - STORES.remove(level); - } - - public static void unloadChunk(BlockGetter level, ChunkPos chunk) { - get(level).unloadChunk(chunk); - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CopycatTransformableState.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CopycatTransformableState.java index ce3372331..e48e6fbd1 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CopycatTransformableState.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/CopycatTransformableState.java @@ -1,13 +1,12 @@ package com.copycatsplus.copycats.foundation.copycat; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.foundation.utility.VecHelper; +import net.createmod.catnip.math.VecHelper; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Vec3i; import net.minecraft.world.phys.Vec3; -import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.function.Consumer; diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/ICopycatBlock.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/ICopycatBlock.java index ff6d8df53..55dc1ce37 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/ICopycatBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/ICopycatBlock.java @@ -7,12 +7,12 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.AllTags; -import com.simibubi.create.content.contraptions.ITransformableBlock; +import com.simibubi.create.api.contraption.transformable.TransformableBlock; import com.simibubi.create.content.contraptions.StructureTransform; import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import com.simibubi.create.foundation.block.IBE; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.MethodsReturnNonnullByDefault; @@ -25,6 +25,7 @@ import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; @@ -36,6 +37,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.*; import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.NotNull; @@ -56,7 +58,8 @@ * {@link net.minecraft.world.level.block.EntityBlock#getTicker}, * {@link IBE#getBlockEntityClass} and * {@link IBE#getBlockEntityType} in the concrete class, and redirect calls of - * {@link ICopycatBlock#use}, + * {@link ICopycatBlock#useItemOn}, + * {@link ICopycatBlock#useWithoutItem}, * {@link ICopycatBlock#hidesNeighborFace}, * {@link ICopycatBlock#rotate}, * {@link ICopycatBlock#mirror}, @@ -72,7 +75,7 @@ */ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public interface ICopycatBlock extends IWrenchable, IStateType, ITransformableBlock { +public interface ICopycatBlock extends IWrenchable, IStateType, TransformableBlock { @Nullable default ICopycatBlockEntity getCopycatBlockEntity(BlockGetter worldIn, BlockPos pos) { @@ -102,14 +105,14 @@ default boolean isCTEnabled(BlockState state, BlockAndTintGetter level, BlockPos return fbe.isCTEnabled(); } - default InteractionResult toggleCT(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { - if (pPlayer.isShiftKeyDown() && pPlayer.getItemInHand(pHand).equals(ItemStack.EMPTY)) { - if (!canToggleCT(pState, pLevel, pPos)) + default InteractionResult toggleCT(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + if (player.isShiftKeyDown()) { + if (!canToggleCT(state, level, pos)) return InteractionResult.PASS; - BlockEntity be = pLevel.getBlockEntity(pPos); + BlockEntity be = level.getBlockEntity(pos); if (!(be instanceof ICopycatBlockEntity fbe)) return InteractionResult.PASS; - if (!canToggleCT(pState, pLevel, pPos)) + if (!canToggleCT(state, level, pos)) return InteractionResult.PASS; fbe.setCTEnabled(!fbe.isCTEnabled()); BlockEntityUtils.redraw((BlockEntity) fbe); @@ -208,61 +211,62 @@ default BlockState prepareMaterial(Level pLevel, BlockPos pPos, BlockState pStat return material; } - default InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray) { + default InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + return toggleCT(state, level, pos, player, hitResult); + } + + default ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { // prioritize wrench interactions over others - if (player.getItemInHand(hand).is(AllTags.AllItemTags.WRENCH.tag)) { - InteractionResult result = AllItems.WRENCH.get().useOn(new UseOnContext(player, hand, ray)); + if (stack.is(AllTags.AllItemTags.WRENCH.tag)) { + InteractionResult result = AllItems.WRENCH.get().useOn(new UseOnContext(player, hand, hitResult)); + if (result.indicateItemUse()) + player.swing(hand); if (result.consumesAction()) - return result; + return ItemInteractionResult.SUCCESS; } - InteractionResult result = toggleCT(state, world, pos, player, hand, ray); - if (result.consumesAction()) - return result; - if (player == null || !player.mayBuild()) - return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; - Direction face = ray.getDirection(); - ItemStack itemInHand = player.getItemInHand(hand); - BlockState materialIn = getAcceptedBlockState(world, pos, itemInHand, face); + Direction face = hitResult.getDirection(); + BlockState materialIn = getAcceptedBlockState(level, pos, stack, face); if (materialIn != null) - materialIn = prepareMaterial(world, pos, state, player, hand, ray, materialIn); + materialIn = prepareMaterial(level, pos, state, player, hand, hitResult, materialIn); if (materialIn == null) - return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; BlockState material = materialIn; - ICopycatBlockEntity copycatBE = getCopycatBlockEntity(world, pos); + ICopycatBlockEntity copycatBE = getCopycatBlockEntity(level, pos); if (copycatBE == null) - return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; if (copycatBE.getMaterial() .is(material.getBlock())) { if (!copycatBE.cycleMaterial()) - return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; copycatBE.getLevel() .playSound(null, copycatBE.getBlockPos(), SoundEvents.ITEM_FRAME_ADD_ITEM, SoundSource.BLOCKS, .75f, .95f); - return InteractionResult.SUCCESS; + return ItemInteractionResult.SUCCESS; } if (copycatBE.hasCustomMaterial()) - return InteractionResult.PASS; - if (world.isClientSide()) - return InteractionResult.SUCCESS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + if (level.isClientSide()) + return ItemInteractionResult.SUCCESS; copycatBE.setMaterial(material); - copycatBE.setConsumedItem(itemInHand); + copycatBE.setConsumedItem(stack); copycatBE.getLevel() .playSound(null, copycatBE.getBlockPos(), material.getSoundType() .getPlaceSound(), SoundSource.BLOCKS, 1, .75f); if (player.isCreative()) - return InteractionResult.SUCCESS; + return ItemInteractionResult.SUCCESS; - itemInHand.shrink(1); - if (itemInHand.isEmpty()) + stack.shrink(1); + if (stack.isEmpty()) player.setItemInHand(hand, ItemStack.EMPTY); - return InteractionResult.SUCCESS; + return ItemInteractionResult.SUCCESS; } default void setPlacedBy(Level worldIn, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { @@ -288,6 +292,8 @@ default void setPlacedBy(Level worldIn, BlockPos pos, BlockState state, @Nullabl offhandItem.shrink(1); if (offhandItem.isEmpty()) placer.setItemInHand(InteractionHand.OFF_HAND, ItemStack.EMPTY); + //TODO: Figure out why sometimes the blocks when placed with the placement helper dont render so we can remove this + BlockEntityUtils.redraw((BlockEntity) copycatBE); } /** @@ -310,11 +316,12 @@ interface OnRemoveHandler { void handle(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving); } - default void playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { + default BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { if (player.isCreative()) { ICopycatBlockEntity copycatBE = getCopycatBlockEntity(level, pos); if (copycatBE != null) copycatBE.setConsumedItem(ItemStack.EMPTY); } + return state; } static BlockState getAppearance(ICopycatBlock block, BlockState state, BlockAndTintGetter level, BlockPos pos, Direction side, @@ -352,14 +359,14 @@ static ItemRequirement getRequiredItemsForLayer(BlockState state, IntegerPropert /** * DO NOT override the {@link Block#rotate} implementation with this if the default {@link ICopycatBlock#transform} implementation is used. */ - default @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + default @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { return transform(pState, new StructureTransform(BlockPos.ZERO, Direction.Axis.Y, pRot, Mirror.NONE)); } /** * DO NOT override the {@link Block#mirror} implementation with this if the default {@link ICopycatBlock#transform} implementation is used. */ - default @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + default BlockState mirror(BlockState pState, Mirror pMirror) { return transform(pState, new StructureTransform(BlockPos.ZERO, null, Rotation.NONE, pMirror)); } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/ICopycatBlockEntity.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/ICopycatBlockEntity.java index 54b5d9b16..6c354be22 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/ICopycatBlockEntity.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/ICopycatBlockEntity.java @@ -3,18 +3,20 @@ import com.copycatsplus.copycats.utility.BlockEntityUtils; import com.copycatsplus.copycats.utility.ItemUtils; import com.simibubi.create.AllBlocks; -import com.simibubi.create.content.contraptions.ITransformableBlockEntity; +import com.simibubi.create.api.contraption.transformable.TransformableBlockEntity; +import com.simibubi.create.api.schematic.nbt.PartialSafeNBT; +import com.simibubi.create.api.schematic.requirement.SpecialBlockEntityItemRequirement; import com.simibubi.create.content.contraptions.StructureTransform; import com.simibubi.create.content.redstone.RoseQuartzLampBlock; -import com.simibubi.create.content.schematics.requirement.ISpecialBlockEntityItemRequirement; import com.simibubi.create.content.schematics.requirement.ItemRequirement; import com.simibubi.create.foundation.blockEntity.IMergeableBE; -import com.simibubi.create.foundation.utility.IPartialSafeNBT; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.HolderGetter; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.component.DataComponentPatch; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; import net.minecraft.world.item.ItemStack; @@ -25,6 +27,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.neoforged.neoforge.server.ServerLifecycleHooks; import org.jetbrains.annotations.ApiStatus; import javax.annotation.ParametersAreNonnullByDefault; @@ -33,7 +36,7 @@ * An interface with implementation for all simple copycat block entities. *

* Implementors should create a field to store the material, consumed item and CT toggle, and redirect calls of - * {@link ICopycatBlockEntity#invalidate}, + * {@link ICopycatBlockEntity#onLoad}, * {@link ICopycatBlockEntity#read}, * {@link ICopycatBlockEntity#writeSafe} and * {@link ICopycatBlockEntity#write} to this interface. @@ -46,7 +49,7 @@ */ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public interface ICopycatBlockEntity extends ISpecialBlockEntityItemRequirement, ITransformableBlockEntity, IPartialSafeNBT, IMergeableBE { +public interface ICopycatBlockEntity extends SpecialBlockEntityItemRequirement, TransformableBlockEntity, PartialSafeNBT, IMergeableBE { void notifyUpdate(); @@ -86,6 +89,10 @@ default void init() { setCTEnabledInternal(true); } + default void onLoad() { + BlockEntityUtils.updateLight((BlockEntity) this); + } + default ICopycatBlock getBlock() { Block block = getBlockState().getBlock(); if (block instanceof ICopycatBlock copycatBlock) @@ -158,10 +165,6 @@ default void setCTEnabled(boolean value) { notifyUpdate(); } - default void invalidate() { - CopycatMaterialStore.setMaterial(getLevel(), getBlockPos(), Blocks.AIR.defaultBlockState()); - } - @Override default ItemRequirement getRequiredItems(BlockState state) { if (getConsumedItem().isEmpty()) @@ -180,18 +183,18 @@ default void accept(BlockEntity other) { } @Override - default void transform(StructureTransform transform) { + default void transform(BlockEntity blockEntity, StructureTransform transform) { setMaterialInternal(transform.apply(getMaterial())); notifyUpdate(); } - static void read(ICopycatBlockEntity self, CompoundTag tag, boolean clientPacket) { + static void read(ICopycatBlockEntity self, CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { if (tag.contains("EnableCT")) // need to check because copycats migrated from C:Connected don't have this tag self.setCTEnabled(tag.getBoolean("EnableCT")); else self.setCTEnabled(true); - self.setConsumedItem(ItemStack.of(tag.getCompound("Item"))); + self.setConsumedItem(ItemStack.parseOptional(registries, (tag.getCompound("Item")))); BlockState prevMaterial = self.getMaterial(); if (!tag.contains("Material")) { @@ -219,20 +222,20 @@ static void read(ICopycatBlockEntity self, CompoundTag tag, boolean clientPacket BlockEntityUtils.redraw((BlockEntity) self); // not calling self.redraw() because Extended Cogwheels overwrites it to be protected } - static void writeSafe(ICopycatBlockEntity self, CompoundTag tag) { + static void writeSafe(ICopycatBlockEntity self, CompoundTag tag, HolderLookup.Provider registries) { ItemStack stackWithoutNBT = self.getConsumedItem().copy(); - stackWithoutNBT.setTag(null); + ItemStack stackWithoutComponents = new ItemStack(stackWithoutNBT.getItemHolder(), stackWithoutNBT.getCount(), DataComponentPatch.EMPTY); BlockEntityUtils.saveMetadata((BlockEntity) self, tag); - write(tag, stackWithoutNBT, self.getMaterial(), self.isCTEnabled()); + write(tag, stackWithoutComponents, self.getMaterial(), registries, self.isCTEnabled()); } - static void write(ICopycatBlockEntity self, CompoundTag tag, boolean clientPacket) { - write(tag, self.getConsumedItem(), self.getMaterial(), self.isCTEnabled()); + static void write(ICopycatBlockEntity self, CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + write(tag, self.getConsumedItem(), self.getMaterial(), registries, self.isCTEnabled()); } @ApiStatus.Internal - static void write(CompoundTag tag, ItemStack stack, BlockState material, boolean enableCT) { - tag.put("Item", ItemUtils.serializeNBT(stack)); + static void write(CompoundTag tag, ItemStack stack, BlockState material, HolderLookup.Provider registries, boolean enableCT) { + tag.put("Item", ItemUtils.serializeNBT(stack, registries)); tag.put("Material", NbtUtils.writeBlockState(material)); tag.putBoolean("EnableCT", enableCT); } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/MigrationManager.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/MigrationManager.java index a15a68969..6e31bfa06 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/MigrationManager.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/MigrationManager.java @@ -36,10 +36,10 @@ public static StructureBlockInfo migrateStructure(StructureBlockInfo info) { if (state.getBlock() instanceof MultiStateCopycatBlock && nbt != null && nbt.contains("Material")) { BlockPos pos = info.pos(); CopycatBlockEntity be = AllBlockEntityTypes.COPYCAT.create(pos, state); - be.load(nbt); + be.loadWithComponents(nbt, be.getLevel().registryAccess()); MultiStateCopycatBlockEntity multiBe = CCBlockEntityTypes.MULTI_STATE_COPYCAT.create(pos, state); multiBe.migrateData((ICopycatBlockEntity) be); - nbt = multiBe.saveWithId(); + nbt = multiBe.saveWithId(be.getLevel().registryAccess()); return new StructureTemplate.StructureBlockInfo(pos, state, nbt); } else if (state.getBlock() instanceof CCCopycatBlock && nbt != null && @@ -47,8 +47,8 @@ public static StructureBlockInfo migrateStructure(StructureBlockInfo info) { nbt.getString("id").equals(AllBlockEntityTypes.COPYCAT.getId().toString())) { BlockPos pos = info.pos(); CCCopycatBlockEntity be = CCBlockEntityTypes.COPYCAT.create(pos, state); - be.load(nbt); - nbt = be.saveWithId(); + be.loadWithComponents(nbt, be.getLevel().registryAccess()); + nbt = be.saveWithId(be.getLevel().registryAccess()); return new StructureTemplate.StructureBlockInfo(pos, state, nbt); } return info; @@ -61,21 +61,21 @@ public static BlockEntity migrateBlockEntity(LevelChunk chunk, BlockEntity block BlockState state = chunk.getBlockState(pos); if (isCopycatAndNeedingConversion(state, blockEntity)) { if (CCBlocks.getAllRegisteredMultiStateBlocks().stream().map(RegistryEntry::get).collect(Collectors.toSet()).contains(state.getBlock())) { - CompoundTag oldTag = blockEntity.saveWithFullMetadata(); + CompoundTag oldTag = blockEntity.saveWithFullMetadata(blockEntity.getLevel().registryAccess()); // Create and initialize the new BlockEntity MultiStateCopycatBlockEntity newBlockEntity = CCBlockEntityTypes.MULTI_STATE_COPYCAT.create(pos, state); - newBlockEntity.load(oldTag); + newBlockEntity.loadWithComponents(oldTag, blockEntity.getLevel().registryAccess()); // Migrate data from the old BlockEntity newBlockEntity.migrateData((ICopycatBlockEntity) blockEntity); return newBlockEntity; } else { - CompoundTag oldTag = blockEntity.saveWithFullMetadata(); + CompoundTag oldTag = blockEntity.saveWithFullMetadata(blockEntity.getLevel().registryAccess()); CCCopycatBlockEntity newBlockEntity = CCBlockEntityTypes.COPYCAT.create(pos, state); - newBlockEntity.load(oldTag); + newBlockEntity.loadWithComponents(oldTag, blockEntity.getLevel().registryAccess()); return newBlockEntity; } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVRotate.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVRotate.java index ff8008851..ccba7e141 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVRotate.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVRotate.java @@ -4,8 +4,8 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.core.Direction; -import static com.simibubi.create.foundation.block.render.SpriteShiftEntry.getUnInterpolatedU; -import static com.simibubi.create.foundation.block.render.SpriteShiftEntry.getUnInterpolatedV; +import static net.createmod.catnip.render.SpriteShiftEntry.*; + /** * Rotate the UV coordinates of a quad around a pivot point. @@ -29,8 +29,8 @@ public boolean transformQuad(MutableQuad quad, TextureAtlasSprite sprite) { double cos = Math.cos(Math.toRadians(rotation)); double sin = Math.sin(Math.toRadians(rotation)); - quad.vertices.get(vertex).uv.u = sprite.getU(u * cos - v * sin + pivotU); - quad.vertices.get(vertex).uv.v = sprite.getV(u * sin + v * cos + pivotV); + quad.vertices.get(vertex).uv.u = sprite.getU((float) (u * cos - v * sin + pivotU)); + quad.vertices.get(vertex).uv.v = sprite.getV((float) (u * sin + v * cos + pivotV)); } } return true; diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVScale.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVScale.java index f81110e2f..7cbaa9aa8 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVScale.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVScale.java @@ -4,8 +4,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.core.Direction; -import static com.simibubi.create.foundation.block.render.SpriteShiftEntry.getUnInterpolatedU; -import static com.simibubi.create.foundation.block.render.SpriteShiftEntry.getUnInterpolatedV; +import static net.createmod.catnip.render.SpriteShiftEntry.*; /** * Scale the UV coordinates of a quad around a pivot point. diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVTranslate.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVTranslate.java index 2110a420a..2460dcc48 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVTranslate.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVTranslate.java @@ -4,8 +4,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.core.Direction; -import static com.simibubi.create.foundation.block.render.SpriteShiftEntry.getUnInterpolatedU; -import static com.simibubi.create.foundation.block.render.SpriteShiftEntry.getUnInterpolatedV; +import static net.createmod.catnip.render.SpriteShiftEntry.*; /** * Translate the UV coordinates of a quad. diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVUpdate.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVUpdate.java index 4ee0b7ecc..7344a384d 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVUpdate.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/quad/QuadUVUpdate.java @@ -6,8 +6,7 @@ import java.util.List; -import static com.simibubi.create.foundation.block.render.SpriteShiftEntry.getUnInterpolatedU; -import static com.simibubi.create.foundation.block.render.SpriteShiftEntry.getUnInterpolatedV; +import static net.createmod.catnip.render.SpriteShiftEntry.*; /** * Wraps other {@link QuadTransform}s such that the UV coordinates are updated after the wrapped transforms are applied. diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/CopycatInstance.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/CopycatInstance.java new file mode 100644 index 000000000..e08a03178 --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/CopycatInstance.java @@ -0,0 +1,10 @@ +package com.copycatsplus.copycats.foundation.copycat.model.kinetic; + +import dev.engine_room.flywheel.lib.instance.AbstractInstance; + +public record CopycatInstance(KineticCopycatRenderData renderData, + T instance) { + public static CopycatInstance of(KineticCopycatRenderData renderData, T instance) { + return new CopycatInstance(renderData, instance); + } +} diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/CopycatInstanceManager.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/CopycatInstanceManager.java new file mode 100644 index 000000000..b16068b67 --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/CopycatInstanceManager.java @@ -0,0 +1,79 @@ +package com.copycatsplus.copycats.foundation.copycat.model.kinetic; + +import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; +import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; +import dev.engine_room.flywheel.lib.instance.AbstractInstance; +import dev.engine_room.flywheel.lib.visual.AbstractBlockEntityVisual; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Consumer; + +/** + * Manages multiple instances for a copycat block entity and automatically refreshes them when the block entity changes. + * + * @param The block entity type. + * @param The instance type. + */ +public abstract class CopycatInstanceManager { + protected final AbstractBlockEntityVisual visual; + protected final B blockEntity; + protected Map> copycatInstances = new HashMap<>(); + + private ICopycatBlockEntity singleStateBE; + private IMultiStateCopycatBlockEntity multiStateBE; + + public CopycatInstanceManager(AbstractBlockEntityVisual visual, B blockEntity, String... keys) { + this.visual = visual; + this.blockEntity = blockEntity; + if (this.blockEntity instanceof IMultiStateCopycatBlockEntity multi) { + this.multiStateBE = multi; + } else if (this.blockEntity instanceof ICopycatBlockEntity single) { + this.singleStateBE = single; + } else { + throw new IllegalArgumentException("Block entity must implement either IMultiStateCopycatBlockEntity or ICopycatBlockEntity"); + } + for (String key : keys) { + addModel(key); + } + } + + private void addModel(String key) { + CopycatInstance newInstance = createInstance(key); + newInstance.instance().setChanged(); + copycatInstances.put(key, newInstance); + } + + private BlockState getMaterial(String key) { + if (singleStateBE != null) { + return singleStateBE.getMaterial(); + } else { + return multiStateBE.getMaterialItemStorage().getMaterialItem(key).material(); + } + } + + public void update(float pt) { + for (Map.Entry> entry : copycatInstances.entrySet()) { + KineticCopycatRenderData renderData = entry.getValue().renderData(); + if (!renderData.state().equalsState(blockEntity.getBlockState()) || !renderData.material().equals(getMaterial(entry.getKey()))) { + entry.getValue().instance().delete(); + CopycatInstance newInstance = createInstance(entry.getKey()); + entry.setValue(newInstance); + newInstance.instance().setChanged(); + visual.updateLight(pt); + } else { + updateInstance(entry.getValue()); + } + } + } + + public void forEach(Consumer> consumer) { + copycatInstances.values().forEach(consumer); + } + + public abstract void updateInstance(CopycatInstance instance); + + public abstract CopycatInstance createInstance(String key); +} diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/ICopycatPartialModel.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/ICopycatPartialModel.java index cf48e4e85..e9c064286 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/ICopycatPartialModel.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/ICopycatPartialModel.java @@ -14,7 +14,7 @@ * Cogwheel should use separate partial models for the shaftless cogwheel and the shaft, so that the shaft model can be reused by * Copycat Shafts. *

- * Use {@link com.jozufozu.flywheel.core.PartialModel} instead if dynamic assembly is not required. + * Use {@link dev.engine_room.flywheel.lib.model.baked.PartialModel} instead if dynamic assembly is not required. */ public interface ICopycatPartialModel { diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IKineticCopycatBlockInstance.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IKineticCopycatBlockInstance.java deleted file mode 100644 index 844209695..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IKineticCopycatBlockInstance.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.copycatsplus.copycats.foundation.copycat.model.kinetic; - -import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; -import com.copycatsplus.copycats.utility.ChatUtils; -import com.jozufozu.flywheel.api.Instancer; -import com.jozufozu.flywheel.api.Material; -import com.jozufozu.flywheel.api.MaterialManager; -import com.jozufozu.flywheel.backend.Backend; -import com.jozufozu.flywheel.backend.RenderLayer; -import com.jozufozu.flywheel.config.BackendType; -import com.simibubi.create.content.kinetics.base.flwdata.RotatingData; -import com.simibubi.create.foundation.render.AllMaterialSpecs; -import net.minecraft.client.renderer.RenderType; - -import javax.annotation.Nullable; - -/** - * An interface with implementation for kinetic copycats with instancing support. - *

- * Implementors should create a field to store the render data and redirect calls of - * {@link IKineticCopycatBlockInstance#getRotatingMaterial}, - * {@link IKineticCopycatBlockInstance#getModel} and - * {@link IKineticCopycatBlockInstance#shouldReset} to this interface. - */ -public interface IKineticCopycatBlockInstance { - - @Nullable - KineticCopycatRenderData getRenderData(); - - MaterialManager getMaterialManager(); - - void setRenderData(KineticCopycatRenderData renderData); - - ICopycatBlockEntity getBlockEntity(); - - default Material getRotatingMaterial() { - RenderType type = RenderType.translucent(); - RenderLayer layer = RenderLayer.getLayer(type); - if (layer == null) layer = RenderLayer.TRANSPARENT; - - // workaround for flywheel crash when transparent layer is used in batching backend - if (Backend.getBackendType() == BackendType.BATCHING && type == RenderType.translucent()) { - type = RenderType.cutoutMipped(); - ChatUtils.sendWarningOnce( - "flywheel_batching_translucent", - "Translucent textures may appear slightly broken when using the Flywheel batching backend. Please switch to the instancing backend instead." - ); - } - - return getMaterialManager().state(layer, type) - .material(AllMaterialSpecs.ROTATING); - } - - default Instancer getModel(ICopycatPartialModel partialModel) { - KineticCopycatRenderData renderData = KineticCopycatRenderData.of(partialModel, getBlockEntity()); - setRenderData(renderData); - return getRotatingMaterial().model(renderData, () -> KineticCopycatRenderer.getInstanceModel(partialModel, getBlockEntity(), renderData)); - } - - default boolean shouldReset() { - if (getRenderData() == null) - return true; - if (!getRenderData().material().equals(getBlockEntity().getMaterial())) - return true; - if (!getRenderData().state().equalsState(getBlockEntity().getBlockState())) - return true; - return false; - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IKineticCopycatBlockRenderer.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IKineticCopycatBlockRenderer.java index 574e6b1df..95953a51b 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IKineticCopycatBlockRenderer.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IKineticCopycatBlockRenderer.java @@ -2,7 +2,7 @@ import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; -import com.simibubi.create.foundation.render.SuperByteBuffer; +import net.createmod.catnip.render.SuperByteBuffer; /** * An interface with implementation for kinetic copycats renderers. @@ -12,10 +12,10 @@ public interface IKineticCopycatBlockRenderer { default SuperByteBuffer getRotatedModel(ICopycatPartialModel partialModel, ICopycatBlockEntity be) { - return KineticCopycatRenderer.getBuffer(partialModel, be); + return KineticCopycatRenderer.getRenderedBuffer(partialModel, be); } default SuperByteBuffer getRotatedModel(ICopycatPartialModel partialModel, IMultiStateCopycatBlockEntity be, String property) { - return KineticCopycatRenderer.getBuffer(partialModel, be, property); + return KineticCopycatRenderer.getRenderedBuffer(partialModel, be, property); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IMultiStateKineticCopycatBlockInstance.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IMultiStateKineticCopycatBlockInstance.java deleted file mode 100644 index 09c903dcb..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/IMultiStateKineticCopycatBlockInstance.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.copycatsplus.copycats.foundation.copycat.model.kinetic; - -import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; -import com.copycatsplus.copycats.utility.ChatUtils; -import com.jozufozu.flywheel.api.Instancer; -import com.jozufozu.flywheel.api.Material; -import com.jozufozu.flywheel.api.MaterialManager; -import com.jozufozu.flywheel.backend.Backend; -import com.jozufozu.flywheel.backend.RenderLayer; -import com.jozufozu.flywheel.config.BackendType; -import com.jozufozu.flywheel.core.materials.FlatLit; -import com.simibubi.create.content.kinetics.base.flwdata.RotatingData; -import com.simibubi.create.foundation.render.AllMaterialSpecs; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.core.BlockPos; -import org.jetbrains.annotations.ApiStatus; - -import java.util.HashMap; -import java.util.Map; - -/** - * An interface with implementation for multi-state kinetic copycats with instancing support. - *

- * Implementors should create a field to store the render data and redirect calls of - * {@link IMultiStateKineticCopycatBlockInstance#getRotatingMaterial}, - * {@link IMultiStateKineticCopycatBlockInstance#update}, - * {@link IMultiStateKineticCopycatBlockInstance#updateLight}, - * {@link IMultiStateKineticCopycatBlockInstance#remove}, - * {@link IMultiStateKineticCopycatBlockInstance#shouldReset} to this interface. - */ -public interface IMultiStateKineticCopycatBlockInstance { - - Map getRenderData(); - - @ApiStatus.OverrideOnly - void setRenderDataInternal(Map renderData); - - Map getRotatingData(); - - @ApiStatus.OverrideOnly - void setRotatingDataInternal(Map rotatingData); - - default void initializeData() { - setRenderDataInternal(new HashMap<>()); - setRotatingDataInternal(new HashMap<>()); - } - - @ApiStatus.OverrideOnly - RotatingData setupInternal(RotatingData key); - - @ApiStatus.OverrideOnly - void updateRotationInternal(RotatingData instance); - - @ApiStatus.OverrideOnly - void relightInternal(BlockPos pos, FlatLit... models); - - default void initModel(ICopycatPartialModel model, String property) { - getRotatingData().put(property, setupInternal(getModel(model, property).createInstance())); - } - - MaterialManager getMaterialManager(); - - IMultiStateCopycatBlockEntity getBlockEntity(); - - default Material getRotatingMaterial() { - RenderType type = RenderType.translucent(); - RenderLayer layer = RenderLayer.getLayer(type); - if (layer == null) layer = RenderLayer.TRANSPARENT; - - // workaround for flywheel crash when transparent layer is used in batching backend - if (Backend.getBackendType() == BackendType.BATCHING && type == RenderType.translucent()) { - type = RenderType.cutoutMipped(); - ChatUtils.sendWarningOnce( - "flywheel_batching_translucent", - "Translucent textures may appear slightly broken when using the Flywheel batching backend. Please switch to the instancing backend instead." - ); - } - - return getMaterialManager().state(layer, type) - .material(AllMaterialSpecs.ROTATING); - } - - default Instancer getModel(ICopycatPartialModel partialModel, String property) { - KineticCopycatRenderData renderData = KineticCopycatRenderData.of(partialModel, getBlockEntity(), property); - getRenderData().put(property, renderData); - return getRotatingMaterial().model(renderData, () -> KineticCopycatRenderer.getInstanceModel(partialModel, getBlockEntity(), renderData)); - } - - default void update() { - for (Map.Entry entry : getRotatingData().entrySet()) { - updateRotationInternal(entry.getValue()); - } - } - - default void updateLight() { - for (Map.Entry entry : getRotatingData().entrySet()) { - relightInternal(getBlockEntity().getBlockPos(), entry.getValue()); - } - } - - default void remove() { - for (Map.Entry entry : getRotatingData().entrySet()) { - entry.getValue().delete(); - } - } - - default boolean shouldReset() { - if (getRenderData() == null) - return true; - for (Map.Entry entry : getRenderData().entrySet()) { - if (!entry.getValue().material().equals(getBlockEntity().getMaterialItemStorage().getMaterialItem(entry.getKey()).material())) - return true; - if (!entry.getValue().state().equalsState(getBlockEntity().getBlockState())) - return true; - } - return false; - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/KineticCopycatRenderData.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/KineticCopycatRenderData.java index d4135fe34..50a4befc8 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/KineticCopycatRenderData.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/KineticCopycatRenderData.java @@ -3,8 +3,8 @@ import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; import com.copycatsplus.copycats.utility.ChatUtils; -import com.jozufozu.flywheel.backend.Backend; -import com.jozufozu.flywheel.config.BackendType; +import dev.engine_room.flywheel.api.backend.BackendManager; +import dev.engine_room.flywheel.backend.Backends; import net.minecraft.client.Minecraft; import net.minecraft.world.level.block.state.BlockState; @@ -44,13 +44,6 @@ public static KineticCopycatRenderData of(ICopycatPartialModel partialModel, IMu } private static KineticCopycatRenderData of(ICopycatPartialModel partialModel, ICopycatBlockEntity be, BlockState material) { - if (Backend.getBackendType() != BackendType.INSTANCING && - Minecraft.getInstance().getBlockColors().getColor(material, null, null, 0) != -1) { - ChatUtils.sendWarningOnce( - "flywheel_block_color", - "Block colors may be incorrect due to the current Flywheel rendering backend. Please switch to the instancing backend to fix this." - ); - } return new KineticCopycatRenderData(partialModel, PartialModelState.fromBlockState(be.getBlockState(), partialModel.getProperties()), material); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/KineticCopycatRenderer.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/KineticCopycatRenderer.java index c67b7b962..4ca99ab76 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/KineticCopycatRenderer.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/KineticCopycatRenderer.java @@ -3,12 +3,10 @@ import com.copycatsplus.copycats.CopycatsClient; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; -import com.jozufozu.flywheel.core.model.BlockModel; -import com.jozufozu.flywheel.core.model.ShadeSeparatedBufferedData; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.foundation.render.SuperByteBuffer; -import com.simibubi.create.foundation.render.SuperByteBufferCache; import dev.architectury.injectables.annotations.ExpectPlatform; +import dev.engine_room.flywheel.api.model.Model; +import net.createmod.catnip.render.*; import net.minecraft.client.resources.model.BakedModel; /** @@ -16,41 +14,43 @@ */ public class KineticCopycatRenderer { public static final SuperByteBufferCache.Compartment KINETIC_COPYCAT = new SuperByteBufferCache.Compartment<>(); + private static final RendererReloadCache MODEL_CACHE = new RendererReloadCache<>(); - public static SuperByteBuffer getBuffer(ICopycatPartialModel partialModel, ICopycatBlockEntity be) { + public static SuperByteBuffer getRenderedBuffer(ICopycatPartialModel partialModel, ICopycatBlockEntity be) { return CopycatsClient.BUFFER_CACHE.get(KINETIC_COPYCAT, KineticCopycatRenderData.of(partialModel, be), - () -> copycatRender(partialModel, be) + () -> renderBuffer(partialModel.getModel(), be, new PoseStack()) ); } - public static SuperByteBuffer getBuffer(ICopycatPartialModel partialModel, IMultiStateCopycatBlockEntity be, String property) { + public static SuperByteBuffer getRenderedBuffer(ICopycatPartialModel partialModel, IMultiStateCopycatBlockEntity be, String property) { return CopycatsClient.BUFFER_CACHE.get(KINETIC_COPYCAT, KineticCopycatRenderData.of(partialModel, be, property), - () -> copycatRender(partialModel, be) + () -> renderBuffer(partialModel.getModel(), be, new PoseStack()) ); } - public static BlockModel getInstanceModel(ICopycatPartialModel partialModel, ICopycatBlockEntity be, KineticCopycatRenderData renderData) { - ShadeSeparatedBufferedData data = getCopycatBuffer(partialModel.getModel(), be); - BlockModel blockModel = new BlockModel(data, renderData.toString()); - data.release(); - return blockModel; + public static Model getInstancedModel(ICopycatPartialModel partialModel, ICopycatBlockEntity be) { + return MODEL_CACHE.get( + KineticCopycatRenderData.of(partialModel, be), + data -> instancedModel(partialModel.getModel(), be) + ); } - public static SuperByteBuffer copycatRender(ICopycatPartialModel partialModel, ICopycatBlockEntity be) { - ShadeSeparatedBufferedData bufferedData = getCopycatBuffer(partialModel.getModel(), be); - SuperByteBuffer sbb = new SuperByteBuffer(bufferedData); - bufferedData.release(); - return sbb; + public static Model getInstancedModel(ICopycatPartialModel partialModel, IMultiStateCopycatBlockEntity be, String property) { + return MODEL_CACHE.get( + KineticCopycatRenderData.of(partialModel, be, property), + data -> instancedModel(partialModel.getModel(), be) + ); } - public static ShadeSeparatedBufferedData getCopycatBuffer(BakedModel partialModel, ICopycatBlockEntity be) { - return getCopycatBuffer(partialModel, be, new PoseStack()); + @ExpectPlatform + public static SuperByteBuffer renderBuffer(BakedModel model, ICopycatBlockEntity be, PoseStack ms) { + return null; } @ExpectPlatform - public static ShadeSeparatedBufferedData getCopycatBuffer(BakedModel model, ICopycatBlockEntity be, PoseStack ms) { + public static Model instancedModel(BakedModel model, ICopycatBlockEntity be) { return null; } } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/RendererReloadCache.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/RendererReloadCache.java new file mode 100644 index 000000000..d842288ba --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/RendererReloadCache.java @@ -0,0 +1,38 @@ +package com.copycatsplus.copycats.foundation.copycat.model.kinetic; + +import dev.engine_room.flywheel.api.event.ReloadLevelRendererEvent; +import org.jetbrains.annotations.ApiStatus; + +import java.util.Collections; +import java.util.Map; +import java.util.Set; +import java.util.WeakHashMap; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; + +public final class RendererReloadCache { + private static final Set> ALL = Collections.newSetFromMap(new WeakHashMap<>()); + private final Map map = new ConcurrentHashMap<>(); + + public RendererReloadCache() { + synchronized (ALL) { + ALL.add(this); + } + } + + public final U get(T key, Function factory) { + return map.computeIfAbsent(key, factory); + } + + public final void clear() { + map.clear(); + } + + @ApiStatus.Internal + public static void onReloadLevelRenderer(ReloadLevelRendererEvent e) { + for (RendererReloadCache cache : ALL) { + cache.clear(); + } + } +} + diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/WrappedRenderWorld.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/WrappedRenderWorld.java index efa9b12de..71c146699 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/WrappedRenderWorld.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/WrappedRenderWorld.java @@ -2,25 +2,20 @@ import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; -import com.jozufozu.flywheel.core.virtual.VirtualEmptyBlockGetter; +import com.simibubi.create.foundation.virtualWorld.VirtualRenderWorld; import net.minecraft.client.Minecraft; -import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.SectionPos; import net.minecraft.core.registries.Registries; -import net.minecraft.world.level.*; +import net.minecraft.world.level.BlockAndTintGetter; +import net.minecraft.world.level.ColorResolver; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.Biomes; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.chunk.DataLayer; -import net.minecraft.world.level.chunk.LightChunk; -import net.minecraft.world.level.chunk.LightChunkGetter; -import net.minecraft.world.level.lighting.LayerLightEventListener; -import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.Fluids; +import net.neoforged.neoforge.client.model.data.ModelData; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -29,85 +24,26 @@ * A virtual world to render the kinetic copycat models in. */ @ApiStatus.Internal -public class WrappedRenderWorld implements VirtualEmptyBlockGetter { +public class WrappedRenderWorld extends VirtualRenderWorld { protected final BlockAndTintGetter level; protected final BlockPos targetPos; - protected final LevelLightEngine lightEngine; protected final BlockState material; + protected ModelData modelData; public WrappedRenderWorld(ICopycatBlockEntity be) { + super(be.getLevel()); this.level = be.getLevel(); this.targetPos = be.getBlockPos(); this.material = be.getMaterial(); - lightEngine = new LevelLightEngine(new LightChunkGetter() { - @Override - @Nullable - public LightChunk getChunkForLighting(int p_63023_, int p_63024_) { - return null; - } - - @Override - public @NotNull BlockGetter getLevel() { - return WrappedRenderWorld.this; - } - }, false, false) { - private final LayerLightEventListener blockListener = createStaticListener(15); - private final LayerLightEventListener skyListener = createStaticListener(15); - - @Override - public @NotNull LayerLightEventListener getLayerListener(@NotNull LightLayer layer) { - return layer == LightLayer.BLOCK ? blockListener : skyListener; - } - - @Override - public int getRawBrightness(BlockPos blockPos, int amount) { - return 15; - } - }; } - private static LayerLightEventListener createStaticListener(int light) { - return new LayerLightEventListener() { - @Override - public void checkBlock(@NotNull BlockPos pos) { - } - - @Override - public boolean hasLightWork() { - return false; - } - - @Override - public int runLightUpdates() { - return 0; - } - - @Override - public void updateSectionStatus(@NotNull SectionPos pos, boolean isSectionEmpty) { - } - - @Override - public void setLightEnabled(@NotNull ChunkPos pos, boolean lightEnabled) { - } - - @Override - public void propagateLightSources(@NotNull ChunkPos pos) { - } - - @Override - public DataLayer getDataLayerData(@NotNull SectionPos pos) { - return null; - } - - @Override - public int getLightValue(@NotNull BlockPos pos) { - return light; - } - }; + public BlockAndTintGetter getWrappedLevel() { + return this.level; } - public BlockAndTintGetter getLevel() { - return level; + public WrappedRenderWorld withModelData(ModelData modelData) { + this.modelData = modelData; + return this; } @Override @@ -140,33 +76,21 @@ public int getMinBuildHeight() { } @Override - public float getShade(@NotNull Direction direction, boolean shaded) { - return 1f; + public float getShade(@NotNull Direction direction, boolean shade) { + return 1; } @Override - public @NotNull LevelLightEngine getLightEngine() { - return lightEngine; - } - - @Override - public int getBrightness(LightLayer lightType, BlockPos blockPos) { - return 15; - } - - @Override - public int getRawBrightness(BlockPos blockPos, int amount) { - return 15; + public int getBlockTint(BlockPos pos, ColorResolver resolver) { + Biome plainsBiome = Minecraft.getInstance().getConnection().registryAccess().registryOrThrow(Registries.BIOME).getOrThrow(Biomes.PLAINS); + return resolver.getColor(plainsBiome, pos.getX(), pos.getZ()); } @Override - public int getBlockTint(@NotNull BlockPos pos, @NotNull ColorResolver resolver) { - ClientPacketListener connection = Minecraft.getInstance().getConnection(); - if (connection == null) - return GrassColor.getDefaultColor(); - Biome plainsBiome = connection.registryAccess().registry(Registries.BIOME).map(r -> r.get(Biomes.PLAINS)).orElse(null); - if (plainsBiome == null) - return GrassColor.getDefaultColor(); - return resolver.getColor(plainsBiome, pos.getX(), pos.getZ()); + public @NotNull ModelData getModelData(@NotNull BlockPos pos) { + if (this.modelData != null && pos.equals(targetPos)) { + return this.modelData; + } + return super.getModelData(pos); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/IMultiStateCopycatBlock.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/IMultiStateCopycatBlock.java index c10b06f80..4892d493a 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/IMultiStateCopycatBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/IMultiStateCopycatBlock.java @@ -8,12 +8,10 @@ import com.copycatsplus.copycats.foundation.copycat.CopycatExternalContext; import com.copycatsplus.copycats.foundation.copycat.StateType; import com.copycatsplus.copycats.foundation.copycat.model.ScaledBlockAndTintGetter; -import com.copycatsplus.copycats.foundation.copycat.model.assembly.CopycatRenderContext; import com.copycatsplus.copycats.network.CCPackets; import com.copycatsplus.copycats.network.FillCopycatPacket; import com.copycatsplus.copycats.utility.BlockEntityUtils; import com.copycatsplus.copycats.utility.BlockFaceUtils; -import com.google.common.collect.ImmutableMap; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.AllTags; @@ -32,6 +30,7 @@ import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -50,7 +49,6 @@ import javax.annotation.ParametersAreNonnullByDefault; import java.util.Optional; import java.util.Set; -import java.util.function.Function; import java.util.stream.IntStream; /** @@ -60,7 +58,8 @@ * {@link net.minecraft.world.level.block.EntityBlock#getTicker}, * {@link IBE#getBlockEntityClass} and * {@link IBE#getBlockEntityType} in the concrete class, and redirect calls of - * {@link IMultiStateCopycatBlock#use}, + * {@link IMultiStateCopycatBlock#useWithoutItem}, + * {@link IMultiStateCopycatBlock#useItemOn}, * {@link IMultiStateCopycatBlock#setPlacedBy}, * {@link ICopycatBlock#hidesNeighborFace}, * {@link IMultiStateCopycatBlock#rotate}, @@ -187,11 +186,11 @@ default String getPropertyFromRender(String renderingProperty, } @Override - default InteractionResult toggleCT(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { - if (player.isShiftKeyDown() && player.getItemInHand(hand).equals(ItemStack.EMPTY)) { + default InteractionResult toggleCT(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + if (player.isShiftKeyDown()) { if (!canToggleCT(state, level, pos)) return InteractionResult.PASS; - String property = getPropertyFromInteraction(state, level, pos, hit, true); + String property = getPropertyFromInteraction(state, level, pos, hitResult, true); IMultiStateCopycatBlockEntity be = getCopycatBlockEntity(level, pos); if (be == null) return InteractionResult.PASS; @@ -254,73 +253,71 @@ default BlockState getAcceptedBlockState(String property, Level pLevel, BlockPos } @Override - default InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + default ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { // prioritize wrench interactions over others - if (player.getItemInHand(hand).is(AllTags.AllItemTags.WRENCH.tag)) { - InteractionResult result = AllItems.WRENCH.get().useOn(new UseOnContext(player, hand, hit)); + if (stack.is(AllTags.AllItemTags.WRENCH.tag)) { + InteractionResult result = AllItems.WRENCH.get().useOn(new UseOnContext(player, hand, hitResult)); + if (result.indicateItemUse()) + player.swing(hand); if (result.consumesAction()) - return result; + return ItemInteractionResult.CONSUME; } - InteractionResult result = toggleCT(state, level, pos, player, hand, hit); - if (result.consumesAction()) - return result; - if (player == null || !player.mayBuild()) - return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; - String property = getPropertyFromInteraction(state, level, pos, hit, true); + String property = getPropertyFromInteraction(state, level, pos, hitResult, true); - Direction face = hit.getDirection(); - ItemStack itemInHand = player.getItemInHand(hand); - BlockState material = getAcceptedBlockState(property, level, pos, itemInHand, face); + Direction face = hitResult.getDirection(); + BlockState material = getAcceptedBlockState(property, level, pos, stack, face); if (material != null) - material = prepareMaterial(level, pos, state, player, hand, hit, material); + material = prepareMaterial(level, pos, state, player, hand, hitResult, material); if (material == null) - return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; IMultiStateCopycatBlockEntity copycatBE = getCopycatBlockEntity(level, pos); if (copycatBE == null) - return InteractionResult.PASS; - if (!partExists(state, property)) return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + if (!partExists(state, property)) + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; if (copycatBE.getMaterialItemStorage().getMaterialItem(property).material() .is(material.getBlock())) { if (!copycatBE.cycleMaterial(property)) - return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; copycatBE.getLevel() .playSound(null, copycatBE.getBlockPos(), SoundEvents.ITEM_FRAME_ADD_ITEM, SoundSource.BLOCKS, .75f, .95f); - return InteractionResult.SUCCESS; + return ItemInteractionResult.SUCCESS; } if (copycatBE.getMaterialItemStorage().hasCustomMaterial(property)) - return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; if (level.isClientSide()) { if (CCKeys.FILL_COPYCAT.isPressed()) { fillEmptyParts(level, pos, state, material); - CCPackets.PACKETS.send(new FillCopycatPacket(pos, material, property)); + CCPackets.network().sendToServer(new FillCopycatPacket(pos, material, property)); } - return InteractionResult.SUCCESS; + return ItemInteractionResult.SUCCESS; } - boolean freeToApply = copycatBE.getMaterialItemStorage().getAllConsumedItems().stream().anyMatch(s -> s.getItem() == itemInHand.getItem()); + boolean freeToApply = copycatBE.getMaterialItemStorage().getAllConsumedItems().stream().anyMatch(s -> s.getItem() == stack.getItem()); copycatBE.setMaterial(property, material); if (!freeToApply) - copycatBE.setConsumedItem(property, itemInHand); + copycatBE.setConsumedItem(property, stack); copycatBE.getLevel() .playSound(null, copycatBE.getBlockPos(), material.getSoundType() .getPlaceSound(), SoundSource.BLOCKS, 1, .75f); if (player.isCreative()) - return InteractionResult.SUCCESS; + return ItemInteractionResult.SUCCESS; if (!freeToApply) - itemInHand.shrink(1); - if (itemInHand.isEmpty()) + stack.shrink(1); + if (stack.isEmpty()) player.setItemInHand(hand, ItemStack.EMPTY); - return InteractionResult.SUCCESS; + return ItemInteractionResult.SUCCESS; } @Override @@ -357,6 +354,8 @@ default void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable break; } } + //TODO: Figure out why sometimes the blocks when placed with the placement helper dont render so we can remove this + BlockEntityUtils.redraw((BlockEntity) copycatBE); } /** @@ -376,12 +375,13 @@ default void onRemove(BlockState state, Level level, BlockPos pos, BlockState ne } @Override - default void playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { + default BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { if (player.isCreative()) { IMultiStateCopycatBlockEntity copycatBE = getCopycatBlockEntity(level, pos); if (copycatBE != null) copycatBE.getMaterialItemStorage().getAllProperties().forEach(key -> copycatBE.getMaterialItemStorage().getMaterialItem(key).setConsumedItem(ItemStack.EMPTY)); } + return state; } default void fillEmptyParts(Level level, BlockPos pos, BlockState state, BlockState material) { diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/IMultiStateCopycatBlockEntity.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/IMultiStateCopycatBlockEntity.java index e71df18a6..d05a5c33c 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/IMultiStateCopycatBlockEntity.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/IMultiStateCopycatBlockEntity.java @@ -6,10 +6,11 @@ import com.simibubi.create.content.contraptions.StructureTransform; import com.simibubi.create.content.redstone.RoseQuartzLampBlock; import com.simibubi.create.content.schematics.requirement.ItemRequirement; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.core.HolderLookup; import net.minecraft.core.Vec3i; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; @@ -31,7 +32,7 @@ * An interface with implementation for all multi-state copycat block entities. *

* Implementors should create a field to store the materials and redirect calls of - * {@link IMultiStateCopycatBlockEntity#invalidate}, + * {@link IMultiStateCopycatBlockEntity#onLoad}, * {@link IMultiStateCopycatBlockEntity#read}, * {@link IMultiStateCopycatBlockEntity#writeSafe} and * {@link IMultiStateCopycatBlockEntity#write} to this interface. @@ -230,7 +231,7 @@ default ItemRequirement getRequiredItems(BlockState state) { } @Override - default void transform(StructureTransform transform) { + default void transform(BlockEntity blockEntity, StructureTransform transform) { getBlock().transformStorage(this.getBlockState(), this, transform); for (String key : getMaterialItemStorage().getAllProperties()) { getMaterialItemStorage().getMaterialItem(key).setMaterial(transform.apply(getMaterialItemStorage().getMaterialItem(key).material())); @@ -238,21 +239,21 @@ default void transform(StructureTransform transform) { notifyUpdate(); } - static void read(IMultiStateCopycatBlockEntity self, CompoundTag tag, boolean clientPacket) { + static void read(IMultiStateCopycatBlockEntity self, CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { if (self.getBlockState().getBlock() instanceof IMultiStateCopycatBlock) { - boolean anyUpdated = self.getMaterialItemStorage().deserialize(tag.getCompound("material_data")); + boolean anyUpdated = self.getMaterialItemStorage().deserialize(tag.getCompound("material_data"), registries); if (anyUpdated) BlockEntityUtils.redraw((BlockEntity) self); // not calling self.redraw() because Extended Cogwheels overwrites it to be protected } } - static void writeSafe(IMultiStateCopycatBlockEntity self, CompoundTag tag) { + static void writeSafe(IMultiStateCopycatBlockEntity self, CompoundTag tag, HolderLookup.Provider registries) { BlockEntityUtils.saveMetadata((BlockEntity) self, tag); - tag.put("material_data", self.getMaterialItemStorage().serializeSafe()); + tag.put("material_data", self.getMaterialItemStorage().serializeSafe(registries)); } - static void write(IMultiStateCopycatBlockEntity self, CompoundTag tag, boolean clientPacket) { - tag.put("material_data", self.getMaterialItemStorage().serialize()); + static void write(IMultiStateCopycatBlockEntity self, CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + tag.put("material_data", self.getMaterialItemStorage().serialize(registries)); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MaterialItemStorage.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MaterialItemStorage.java index a66425b7a..03ceea04f 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MaterialItemStorage.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MaterialItemStorage.java @@ -2,11 +2,14 @@ import com.copycatsplus.copycats.utility.ItemUtils; import com.simibubi.create.AllBlocks; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.component.DataComponentPatch; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.server.ServerLifecycleHooks; import javax.annotation.Nullable; import java.util.*; @@ -99,22 +102,22 @@ public void remapStorage(Function keyMapper) { storage = newStorage; } - public CompoundTag serialize() { + public CompoundTag serialize(HolderLookup.Provider registries) { CompoundTag root = new CompoundTag(); - storage.forEach((key, materialItem) -> root.put(key, materialItem.serialize())); + storage.forEach((key, materialItem) -> root.put(key, materialItem.serialize(registries))); return root; } - public CompoundTag serializeSafe() { + public CompoundTag serializeSafe(HolderLookup.Provider registries) { CompoundTag root = new CompoundTag(); - storage.forEach((key, materialItem) -> root.put(key, materialItem.serializeSafe())); + storage.forEach((key, materialItem) -> root.put(key, materialItem.serializeSafe(registries))); return root; } - public boolean deserialize(CompoundTag tag) { + public boolean deserialize(CompoundTag tag, HolderLookup.Provider registries) { AtomicBoolean anyUpdated = new AtomicBoolean(false); tag.getAllKeys().forEach(key -> { - MaterialItem newVersion = MaterialItem.deserialize(tag.getCompound(key)); + MaterialItem newVersion = MaterialItem.deserialize(tag.getCompound(key), registries); MaterialItem oldVersion = storage.put(key, newVersion); if (oldVersion != null && (newVersion.material() != oldVersion.material() || newVersion.enableCT() != oldVersion.enableCT()) && @@ -144,28 +147,27 @@ public MaterialItem(BlockState material, ItemStack consumedItem, boolean enableC this.enableCT = enableCT; } - public CompoundTag serialize() { + public CompoundTag serialize(HolderLookup.Provider registries) { CompoundTag root = new CompoundTag(); root.put("material", NbtUtils.writeBlockState(material)); - root.put("consumedItem", ItemUtils.serializeNBT(consumedItem)); + root.put("consumedItem", ItemUtils.serializeNBT(consumedItem, registries)); root.putBoolean("enableCT", enableCT); return root; } - public CompoundTag serializeSafe() { + public CompoundTag serializeSafe(HolderLookup.Provider registries) { CompoundTag root = new CompoundTag(); root.put("material", NbtUtils.writeBlockState(material)); - ItemStack stackEmpty = consumedItem.copy(); - stackEmpty.setTag(null); - root.put("consumedItem", ItemUtils.serializeNBT(stackEmpty)); + ItemStack stackWithoutComponents = new ItemStack(consumedItem.getItemHolder(), consumedItem.getCount(), DataComponentPatch.EMPTY); + root.put("consumedItem", ItemUtils.serializeNBT(stackWithoutComponents, registries)); root.putBoolean("enableCT", enableCT); return root; } - public static MaterialItem deserialize(CompoundTag tag) { + public static MaterialItem deserialize(CompoundTag tag, HolderLookup.Provider registries) { return new MaterialItem( NbtUtils.readBlockState(BuiltInRegistries.BLOCK.asLookup(), tag.getCompound("material")), - ItemStack.of(tag.getCompound("consumedItem")), + ItemStack.parseOptional(registries, tag.getCompound("consumedItem")), !tag.contains("enableCT") || tag.getBoolean("enableCT") ); } diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MultiStateCopycatBlock.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MultiStateCopycatBlock.java index 0fbc08d68..17a5f0d40 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MultiStateCopycatBlock.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MultiStateCopycatBlock.java @@ -2,12 +2,14 @@ import com.copycatsplus.copycats.CCBlockEntityTypes; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; +import com.copycatsplus.copycats.utility.InteractionUtils; import com.simibubi.create.content.contraptions.StructureTransform; import com.simibubi.create.foundation.block.IBE; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -31,7 +33,6 @@ * {@link IMultiStateCopycatBlock} without extending this class. Check for multi-state copycats with instanceof checks * against {@link IMultiStateCopycatBlock} instead. */ -@SuppressWarnings("deprecation") @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public abstract class MultiStateCopycatBlock extends Block implements IMultiStateCopycatBlock, IBE { @@ -47,8 +48,19 @@ public BlockEntityTicker getTicker(Level p_153212_, B } @Override - public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { - return IMultiStateCopycatBlock.super.use(state, level, pos, player, hand, hit); + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + return InteractionUtils.sequential( + () -> IMultiStateCopycatBlock.super.useWithoutItem(state, level, pos, player, hitResult), + () -> super.useWithoutItem(state, level, pos, player, hitResult) + ); + } + + @Override + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return InteractionUtils.sequentialItem( + () -> IMultiStateCopycatBlock.super.useItemOn(stack, state, level, pos, player, hand, hitResult), + () -> super.useItemOn(stack, state, level, pos, player, hand, hitResult) + ); } @Override @@ -63,9 +75,10 @@ public void onRemove(BlockState state, Level world, BlockPos pos, BlockState new } @Override - public void playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { + public BlockState playerWillDestroy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull Player player) { super.playerWillDestroy(level, pos, state, player); IMultiStateCopycatBlock.super.playerWillDestroy(level, pos, state, player); + return state; } @SuppressWarnings("deprecation") diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MultiStateCopycatBlockEntity.java b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MultiStateCopycatBlockEntity.java index eb84ec03f..3e002aa2e 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MultiStateCopycatBlockEntity.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/copycat/multistate/MultiStateCopycatBlockEntity.java @@ -8,6 +8,7 @@ import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; @@ -46,9 +47,9 @@ public void setMaterialItemStorageInternal(MaterialItemStorage storage) { } @Override - public void invalidate() { - super.invalidate(); - IMultiStateCopycatBlockEntity.super.invalidate(); + public void onLoad() { + super.onLoad(); + IMultiStateCopycatBlockEntity.super.onLoad(); } @Override @@ -61,21 +62,21 @@ public ItemRequirement getRequiredItems(BlockState state) { } @Override - public void read(CompoundTag tag, boolean clientPacket) { - super.read(tag, clientPacket); - IMultiStateCopycatBlockEntity.read(this, tag, clientPacket); + public void read(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.read(tag, registries, clientPacket); + IMultiStateCopycatBlockEntity.read(this, tag, registries, clientPacket); } @Override - public void writeSafe(CompoundTag tag) { - super.writeSafe(tag); - IMultiStateCopycatBlockEntity.writeSafe(this, tag); + public void writeSafe(CompoundTag tag, HolderLookup.Provider registries) { + super.writeSafe(tag, registries); + IMultiStateCopycatBlockEntity.writeSafe(this, tag, registries); } @Override - public void write(CompoundTag tag, boolean clientPacket) { - super.write(tag, clientPacket); - IMultiStateCopycatBlockEntity.write(this, tag, clientPacket); + public void write(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.write(tag, registries, clientPacket); + IMultiStateCopycatBlockEntity.write(this, tag, registries, clientPacket); } public void migrateData(ICopycatBlockEntity copycatBlockEntity) { diff --git a/common/src/main/java/com/copycatsplus/copycats/foundation/tooltip/CopycatDescription.java b/common/src/main/java/com/copycatsplus/copycats/foundation/tooltip/CopycatDescription.java index c79550228..823bf705f 100644 --- a/common/src/main/java/com/copycatsplus/copycats/foundation/tooltip/CopycatDescription.java +++ b/common/src/main/java/com/copycatsplus/copycats/foundation/tooltip/CopycatDescription.java @@ -2,12 +2,12 @@ import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.item.TooltipModifier; -import com.simibubi.create.foundation.utility.Components; -import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.utility.Lang; -import com.simibubi.create.foundation.utility.Pair; +import com.simibubi.create.foundation.utility.CreateLang; import com.tterrag.registrate.util.nullness.NonNullConsumer; import dev.architectury.injectables.annotations.ExpectPlatform; +import net.createmod.catnip.data.Iterate; +import net.createmod.catnip.data.Pair; +import net.createmod.catnip.lang.FontHelper; import net.minecraft.client.gui.screens.Screen; import net.minecraft.locale.Language; import net.minecraft.network.chat.Component; @@ -66,19 +66,19 @@ private void loadDescriptions(Item item) { longDescription.addAll(pair.getSecond()); } - String[] holdDesc = Lang.translateDirect("tooltip.holdForDescription", "$") + String[] holdDesc = CreateLang.translateDirect("tooltip.holdForDescription", "$") .getString() .split("\\$"); - MutableComponent keyShift = Lang.translateDirect("tooltip.keyShift"); + MutableComponent keyShift = CreateLang.translateDirect("tooltip.keyShift"); for (boolean shift : Iterate.falseAndTrue) { - MutableComponent tabBuilder = Components.empty(); - tabBuilder.append(Components.literal(holdDesc[0]).withStyle(DARK_GRAY)); + MutableComponent tabBuilder = Component.empty(); + tabBuilder.append(Component.literal(holdDesc[0]).withStyle(DARK_GRAY)); tabBuilder.append(keyShift.plainCopy() .withStyle(shift ? WHITE : GRAY)); if (holdDesc.length > 1) - tabBuilder.append(Components.literal(holdDesc[1]).withStyle(DARK_GRAY)); + tabBuilder.append(Component.literal(holdDesc[1]).withStyle(DARK_GRAY)); (shift ? longDescription : shortDescription).add(0, tabBuilder); - (shift ? longDescription : shortDescription).add(1, Components.immutableEmpty()); + (shift ? longDescription : shortDescription).add(1, Component.empty()); } } @@ -122,8 +122,8 @@ private void populateDescriptions() { continue; descriptions.put(characteristics, Pair.of( - List.of(Components.literal("- " + cachedLanguage.getOrDefault(titleKey)).withStyle(GRAY)), - TooltipHelper.cutStringTextComponent(String.format(cachedLanguage.getOrDefault(descKey), cachedArgs.get(characteristics.getSerializedName()).toArray()), TooltipHelper.Palette.STANDARD_CREATE) + List.of(Component.literal("- " + cachedLanguage.getOrDefault(titleKey)).withStyle(GRAY)), + TooltipHelper.cutStringTextComponent(String.format(cachedLanguage.getOrDefault(descKey), cachedArgs.get(characteristics.getSerializedName()).toArray()), FontHelper.Palette.STANDARD_CREATE) )); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/compat/diagonalblocks/DiagonalBlockTypeImplMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/compat/diagonalblocks/DiagonalBlockTypeImplMixin.java index edf228fca..7e14526df 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/compat/diagonalblocks/DiagonalBlockTypeImplMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/compat/diagonalblocks/DiagonalBlockTypeImplMixin.java @@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @ModMixin(requiredMods = {Mods.DIAGONAL_WALLS, Mods.DIAGONAL_FENCES, Mods.DIAGONAL_WINDOWS}) -@Mixin(DiagonalBlockTypeImpl.class) +@Mixin(value = DiagonalBlockTypeImpl.class, remap = false) public class DiagonalBlockTypeImplMixin { @Inject(method = "isTarget", at = @At("HEAD"), cancellable = true) diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/compat/rubidium/BlockOcclusionCacheMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/compat/rubidium/BlockOcclusionCacheMixin.java index b2d74029a..bb93900fc 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/compat/rubidium/BlockOcclusionCacheMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/compat/rubidium/BlockOcclusionCacheMixin.java @@ -17,7 +17,7 @@ * Makes sure that copycat blocks are not occluded by Rubidium */ @ModMixin(requiredMods = Mods.SODIUM) -@Mixin(targets = "me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.BlockOcclusionCache") +@Mixin(targets = "net.caffeinemc.mods.sodium.client.render.chunk.compile.pipeline.BlockOcclusionCache") @Pseudo public class BlockOcclusionCacheMixin { diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/compat/rubidium/BlockRendererMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/compat/rubidium/BlockRendererMixin.java index 0060ffbe2..d524604c5 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/compat/rubidium/BlockRendererMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/compat/rubidium/BlockRendererMixin.java @@ -4,16 +4,14 @@ import com.copycatsplus.copycats.foundation.annotation.ModMixin; import com.copycatsplus.copycats.foundation.copycat.CopycatExternalContext; import com.copycatsplus.copycats.foundation.copycat.multistate.MultiStateTextureAtlasSprite; -import me.jellysquid.mods.sodium.client.model.color.ColorProvider; -import me.jellysquid.mods.sodium.client.model.quad.BakedQuadView; -import me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.BlockRenderContext; -import me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.BlockRenderer; -import net.minecraft.world.level.block.state.BlockState; +import net.caffeinemc.mods.sodium.client.render.chunk.compile.pipeline.BlockRenderer; +import net.caffeinemc.mods.sodium.client.render.frapi.mesh.MutableQuadViewImpl; +import net.caffeinemc.mods.sodium.client.render.texture.SpriteFinderCache; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Pseudo; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; /** * Record the currently rendering property for multi-state blocks so that block colors can be displayed properly. @@ -21,32 +19,32 @@ * Rubidium compatible version of {@link com.copycatsplus.copycats.mixin.foundation.copycat.multistate.ModelBlockRendererMixin}. */ @ModMixin(requiredMods = {Mods.RUBIDIUM, Mods.SODIUM}) -@Mixin(BlockRenderer.class) +@Mixin(value = BlockRenderer.class, remap = false) @Pseudo public class BlockRendererMixin { @Inject( - method = "getVertexColors", + method = "colorizeQuad", at = @At( value = "INVOKE", - target = "Lme/jellysquid/mods/sodium/client/model/color/ColorProvider;getColors(Lme/jellysquid/mods/sodium/client/world/WorldSlice;Lnet/minecraft/core/BlockPos;Ljava/lang/Object;Lme/jellysquid/mods/sodium/client/model/quad/ModelQuadView;[I)V" + target = "Lnet/caffeinemc/mods/sodium/client/model/color/ColorProvider;getColors(Lnet/caffeinemc/mods/sodium/client/world/LevelSlice;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/BlockPos$MutableBlockPos;Ljava/lang/Object;Lnet/caffeinemc/mods/sodium/client/model/quad/ModelQuadView;[I)V" ), require = 0 ) - private void beforeColor(BlockRenderContext ctx, ColorProvider colorProvider, BakedQuadView quad, CallbackInfoReturnable cir) { - if (quad.getSprite() instanceof MultiStateTextureAtlasSprite sprite) + private void beforeColor(MutableQuadViewImpl quad, int colorIndex, CallbackInfo ci) { + if (quad.sprite(SpriteFinderCache.forBlockAtlas()) instanceof MultiStateTextureAtlasSprite sprite) CopycatExternalContext.setPropertyForBlockColor(sprite.getProperty()); } @Inject( - method = "getVertexColors", + method = "colorizeQuad", at = @At( value = "INVOKE", - target = "Lme/jellysquid/mods/sodium/client/model/color/ColorProvider;getColors(Lme/jellysquid/mods/sodium/client/world/WorldSlice;Lnet/minecraft/core/BlockPos;Ljava/lang/Object;Lme/jellysquid/mods/sodium/client/model/quad/ModelQuadView;[I)V", + target = "Lnet/caffeinemc/mods/sodium/client/model/color/ColorProvider;getColors(Lnet/caffeinemc/mods/sodium/client/world/LevelSlice;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/BlockPos$MutableBlockPos;Ljava/lang/Object;Lnet/caffeinemc/mods/sodium/client/model/quad/ModelQuadView;[I)V", shift = At.Shift.AFTER ), require = 0 ) - private void afterColor(BlockRenderContext ctx, ColorProvider colorProvider, BakedQuadView quad, CallbackInfoReturnable cir) { + private void afterColor(MutableQuadViewImpl quad, int colorIndex, CallbackInfo ci) { CopycatExternalContext.setPropertyForBlockColor(null); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/cogwheel/CogWheelBlockItemMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/cogwheel/CogWheelBlockItemMixin.java index 8ad3423b1..5dfc1a0a0 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/cogwheel/CogWheelBlockItemMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/cogwheel/CogWheelBlockItemMixin.java @@ -22,7 +22,7 @@ /** * Skip the placement helper in cogwheels if the player is trying to fill a copycat cogwheel */ -@Mixin(value = CogwheelBlockItem.class, priority = 1200) +@Mixin(value = CogwheelBlockItem.class, priority = 1200, remap = false) // Use a higher priority because this may be overwritten by other mods public class CogWheelBlockItemMixin { @Inject( diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/door/BlockHelperMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/door/BlockHelperMixin.java index 7a342a388..532fb9ae9 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/door/BlockHelperMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/door/BlockHelperMixin.java @@ -21,7 +21,7 @@ public class BlockHelperMixin { @Inject( method = "placeSchematicBlock", - at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/entity/BlockEntity;loadStatic(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/world/level/block/entity/BlockEntity;") + at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/entity/BlockEntity;loadStatic(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/core/HolderLookup$Provider;)Lnet/minecraft/world/level/block/entity/BlockEntity;") ) private static void placeSchematicBlock(Level world, BlockState state, BlockPos target, ItemStack stack, CompoundTag data, CallbackInfo ci) { BlockEntity existingBlockEntity = world.getBlockEntity(target); diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/door/SchematicannonBlockEntityMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/door/SchematicannonBlockEntityMixin.java index bcfefedd5..0a9198782 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/door/SchematicannonBlockEntityMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/door/SchematicannonBlockEntityMixin.java @@ -19,7 +19,7 @@ /** * Force the schematicannon to place both the upper and lower halves of copycat doors */ -@Mixin(SchematicannonBlockEntity.class) +@Mixin(value = SchematicannonBlockEntity.class, remap = false) public class SchematicannonBlockEntityMixin { @Inject( method = "shouldIgnoreBlockState", diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/panel/CopycatPanelBlockMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/panel/CopycatPanelBlockMixin.java index bfedc91ce..278e99ba0 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/panel/CopycatPanelBlockMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/panel/CopycatPanelBlockMixin.java @@ -9,14 +9,20 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; +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.CallbackInfoReturnable; @@ -24,7 +30,7 @@ /** * Add CT toggle to Create's {@link CopycatPanelBlock}. */ -@Mixin(CopycatPanelBlock.class) +@Mixin(value = CopycatPanelBlock.class, remap = false) public abstract class CopycatPanelBlockMixin extends WaterloggedCopycatBlock implements ICopycatBlock { public CopycatPanelBlockMixin(Properties pProperties) { super(pProperties); @@ -37,18 +43,20 @@ public BlockState getAppearance(BlockState state, BlockAndTintGetter level, Bloc return super.getAppearance(state, level, pos, side, queryState, queryPos); } - @Inject( - at = @At("HEAD"), - method = "use", - cancellable = true - ) - public void use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray, CallbackInfoReturnable cir) { - InteractionResult toggleResult = toggleCT(state, world, pos, player, hand, ray); - if (toggleResult.consumesAction()) cir.setReturnValue(toggleResult); + @Override + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + return toggleCT(state, level, pos, player, hitResult); + } + + @Override + @Unique + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); } @Nullable @Override + @Unique public CopycatBlockEntity getBlockEntity(BlockGetter worldIn, BlockPos pos) { return super.getBlockEntity(worldIn, pos); } @@ -88,6 +96,18 @@ private void canConnectTexturesToward(BlockAndTintGetter reader, BlockPos fromPo cir.setReturnValue(checkConnection(reader, fromPos, toPos, fromState)); } + @Override + @Unique + public @NotNull BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror) { + return super.mirror(pState, pMirror); + } + + @Override + @Unique + public @NotNull BlockState rotate(@NotNull BlockState pState, Rotation pRot) { + return super.rotate(pState, pRot); + } + public boolean supportsExternalFaceHiding(BlockState state) { return true; } diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/slab/WalkNodeEvaluatorMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/slab/WalkNodeEvaluatorMixin.java index b400d19ba..785f63ee1 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/slab/WalkNodeEvaluatorMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/slab/WalkNodeEvaluatorMixin.java @@ -20,7 +20,7 @@ public class WalkNodeEvaluatorMixin { @WrapOperation( at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;getBlock()Lnet/minecraft/world/level/block/Block;"), - method = "getBlockPathTypeRaw", + method = "getPathTypeFromState", require = 0 // Fail silently if target is overwritten by optimization mods ) private static Block getWrappedBlock(BlockState instance, Operation original) { diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/sliding_door/SlidingDoorBlockEntityAccessor.java b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/sliding_door/SlidingDoorBlockEntityAccessor.java index b299c6bbb..cab929c59 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/sliding_door/SlidingDoorBlockEntityAccessor.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/sliding_door/SlidingDoorBlockEntityAccessor.java @@ -1,7 +1,7 @@ package com.copycatsplus.copycats.mixin.copycat.sliding_door; import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlockEntity; -import com.simibubi.create.foundation.utility.animation.LerpedFloat; +import net.createmod.catnip.animation.LerpedFloat; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/step/CopycatStepBlockMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/step/CopycatStepBlockMixin.java index e39cd6a07..0c540d9cc 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/step/CopycatStepBlockMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/copycat/step/CopycatStepBlockMixin.java @@ -13,7 +13,9 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; @@ -23,6 +25,7 @@ import net.minecraft.world.phys.BlockHitResult; import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; +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.CallbackInfoReturnable; @@ -43,18 +46,20 @@ public BlockState getAppearance(BlockState state, BlockAndTintGetter level, Bloc return super.getAppearance(state, level, pos, side, queryState, queryPos); } - @Inject( - at = @At("HEAD"), - method = "use", - cancellable = true - ) - public void use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray, CallbackInfoReturnable cir) { - InteractionResult toggleResult = toggleCT(state, world, pos, player, hand, ray); - if (toggleResult.consumesAction()) cir.setReturnValue(toggleResult); + @Override + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + return toggleCT(state, level, pos, player, hitResult); + } + + @Override + @Unique + public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); } @Nullable @Override + @Unique public CopycatBlockEntity getBlockEntity(BlockGetter worldIn, BlockPos pos) { return super.getBlockEntity(worldIn, pos); } diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/entity/CatMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/entity/CatMixin.java index 0e4df1b76..0bacec562 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/entity/CatMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/entity/CatMixin.java @@ -3,11 +3,15 @@ import com.copycatsplus.copycats.CCBlocks; import com.copycatsplus.copycats.CCCatVariants; import com.simibubi.create.AllTags; +import net.minecraft.core.Holder; +import net.minecraft.core.Registry; import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.InteractionHand; @@ -29,6 +33,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import java.util.Objects; +import java.util.Optional; /** * Add a copycat variant to cats. @@ -36,56 +41,56 @@ @Mixin(Cat.class) public abstract class CatMixin extends TamableAnimal { @Shadow - public abstract CatVariant getVariant(); + protected abstract void usePlayerItem(Player pPlayer, InteractionHand pHand, ItemStack pStack); @Shadow - public abstract void setVariant(CatVariant pVariant); + public abstract Holder getVariant(); @Shadow - protected abstract void usePlayerItem(Player pPlayer, InteractionHand pHand, ItemStack pStack); + public abstract void setVariant(Holder variant); protected CatMixin(EntityType pEntityType, Level pLevel) { super(pEntityType, pLevel); } @Unique - private static final EntityDataAccessor DATA_NATURAL_VARIANT_ID = SynchedEntityData.defineId(Cat.class, EntityDataSerializers.CAT_VARIANT); + private static final EntityDataAccessor> DATA_NATURAL_VARIANT_ID = SynchedEntityData.defineId(Cat.class, EntityDataSerializers.CAT_VARIANT); @Unique - public CatVariant getNaturalVariant() { + public Holder getNaturalVariant() { return this.entityData.get(DATA_NATURAL_VARIANT_ID); } @Unique - public void setNaturalVariant(CatVariant pVariant) { + public void setNaturalVariant(Holder pVariant) { this.entityData.set(DATA_NATURAL_VARIANT_ID, pVariant); } @Inject( at = @At("RETURN"), - method = "defineSynchedData()V" + method = "defineSynchedData" ) - private void defineNaturalVariant(CallbackInfo ci) { - this.entityData.define(DATA_NATURAL_VARIANT_ID, BuiltInRegistries.CAT_VARIANT.getOrThrow(CatVariant.ALL_BLACK)); + private void defineNaturalVariant(SynchedEntityData.Builder builder, CallbackInfo ci) { + builder.define(DATA_NATURAL_VARIANT_ID, BuiltInRegistries.CAT_VARIANT.getHolderOrThrow(CatVariant.ALL_BLACK)); } @Inject( at = @At("RETURN"), method = "addAdditionalSaveData(Lnet/minecraft/nbt/CompoundTag;)V" ) - private void addNaturalVariantData(CompoundTag pCompound, CallbackInfo ci) { - pCompound.putString("NaturalVariant", Objects.requireNonNull(BuiltInRegistries.CAT_VARIANT.getKey(this.getNaturalVariant())).toString()); + private void addNaturalVariantData(CompoundTag compound, CallbackInfo ci) { + compound.putString("NaturalVariant", this.getNaturalVariant().unwrapKey().orElse(CatVariant.ALL_BLACK).location().toString()); } @Inject( at = @At("RETURN"), method = "readAdditionalSaveData(Lnet/minecraft/nbt/CompoundTag;)V" ) - private void readNaturalVariantData(CompoundTag pCompound, CallbackInfo ci) { - CatVariant catvariant = BuiltInRegistries.CAT_VARIANT.get(ResourceLocation.tryParse(pCompound.getString("NaturalVariant"))); - if (catvariant != null) { - this.setNaturalVariant(catvariant); - } + private void readNaturalVariantData(CompoundTag compound, CallbackInfo ci) { + Optional> catVariant = Optional.ofNullable(ResourceLocation.tryParse(compound.getString("NaturalVariant"))).map((arg) -> ResourceKey.create(Registries.CAT_VARIANT, arg)); + Registry registry = BuiltInRegistries.CAT_VARIANT; + Objects.requireNonNull(registry); + catVariant.flatMap(registry::getHolder).ifPresent(this::setNaturalVariant); } @Inject( @@ -106,19 +111,19 @@ private void useCopycat(Player pPlayer, InteractionHand pHand, ItemStack pStack, private void copycatInteract(Player pPlayer, InteractionHand pHand, CallbackInfoReturnable cir) { ItemStack stack = pPlayer.getItemInHand(pHand); if (stack.is(CCBlocks.COPYCAT_BLOCK.asItem())) { - CatVariant currentVariant = getVariant(); - if (currentVariant.equals(CCCatVariants.COPY_CAT.value())) return; + Holder currentVariant = getVariant(); + if (currentVariant.equals(CCCatVariants.COPY_CAT)) return; if (!level().isClientSide()) { this.setNaturalVariant(currentVariant); - this.setVariant(CCCatVariants.COPY_CAT.value()); + this.setVariant(CCCatVariants.COPY_CAT); this.usePlayerItem(pPlayer, pHand, stack); this.setPersistenceRequired(); } cir.setReturnValue(InteractionResult.sidedSuccess(level().isClientSide())); } else if (stack.is(AllTags.AllItemTags.WRENCH.tag)) { - CatVariant currentVariant = getVariant(); - if (!currentVariant.equals(CCCatVariants.COPY_CAT.value())) return; + Holder currentVariant = getVariant(); + if (!currentVariant.equals(CCCatVariants.COPY_CAT)) return; if (!level().isClientSide()) { this.setVariant(this.getNaturalVariant()); diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BearingContraptionMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BearingContraptionMixin.java index 673580d29..f259d5f91 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BearingContraptionMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BearingContraptionMixin.java @@ -18,7 +18,7 @@ /** * Allow sail-like blocks in copycats to function in windmills */ -@Mixin(BearingContraption.class) +@Mixin(value = BearingContraption.class, remap = false) public class BearingContraptionMixin { @Inject( method = "getSailBlock", diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BlockStateBaseCacheMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BlockStateBaseCacheMixin.java index c101a479f..b10852d4d 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BlockStateBaseCacheMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BlockStateBaseCacheMixin.java @@ -18,7 +18,7 @@ public class BlockStateBaseCacheMixin { @Unique - private static final ResourceLocation COPYCAT_BASE = new ResourceLocation(Mods.CREATE.id(), "copycat_base"); + private static final ResourceLocation COPYCAT_BASE = ResourceLocation.fromNamespaceAndPath(Mods.CREATE.id(), "copycat_base"); @WrapOperation( method = "", diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BlockStateBaseMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BlockStateBaseMixin.java index 2aa6b58b3..2bfc6902e 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BlockStateBaseMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/BlockStateBaseMixin.java @@ -14,7 +14,7 @@ public class BlockStateBaseMixin { @Unique - private static final ResourceLocation COPYCAT_BASE = new ResourceLocation(Mods.CREATE.id(), "copycat_base"); + private static final ResourceLocation COPYCAT_BASE = ResourceLocation.fromNamespaceAndPath(Mods.CREATE.id(), "copycat_base"); @Inject( method = "canOcclude", diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/ConnectedTextureBehaviourMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/ConnectedTextureBehaviourMixin.java index ff5bf2913..5017c49f6 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/ConnectedTextureBehaviourMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/ConnectedTextureBehaviourMixin.java @@ -24,7 +24,7 @@ /** * Implementation for {@link ICustomCTBlocking}. */ -@Mixin(value = ConnectedTextureBehaviour.class) +@Mixin(value = ConnectedTextureBehaviour.class, remap = false) public class ConnectedTextureBehaviourMixin { @Inject( at = @At("HEAD"), @@ -56,7 +56,8 @@ private void isCopycatBlockable(BlockState state, BlockAndTintGetter reader, Blo @WrapOperation( at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/Block;isFaceFull(Lnet/minecraft/world/phys/shapes/VoxelShape;Lnet/minecraft/core/Direction;)Z"), - method = "isBeingBlocked" + method = "isBeingBlocked", + remap = true ) private boolean isFaceFull(VoxelShape shape, Direction face, Operation original, BlockState state, BlockAndTintGetter reader, BlockPos pos, BlockPos otherPos, Direction face2) { diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/CopycatBlockEntityMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/CopycatBlockEntityMixin.java index 450a30596..fe3cedf41 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/CopycatBlockEntityMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/CopycatBlockEntityMixin.java @@ -4,6 +4,7 @@ import com.simibubi.create.content.decoration.copycat.CopycatBlockEntity; import com.simibubi.create.foundation.blockEntity.SmartBlockEntity; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -20,18 +21,14 @@ *

* Also implement {@link ICopycatBlockEntity} to unify instanceof checks. */ -@Mixin(value = CopycatBlockEntity.class) -public abstract class CopycatBlockEntityMixin extends SmartBlockEntity implements ICopycatBlockEntity { +@Mixin(value = CopycatBlockEntity.class, remap = false) +public abstract class CopycatBlockEntityMixin implements ICopycatBlockEntity { @Shadow private BlockState material; @Shadow private ItemStack consumedItem; - public CopycatBlockEntityMixin(BlockEntityType type, BlockPos pos, BlockState state) { - super(type, pos, state); - } - @Unique private boolean copycats$enableCT = true; @@ -55,19 +52,25 @@ public void setCTEnabledInternal(boolean value) { this.copycats$enableCT = value; } + @Override + @Unique + public void onLoad() { + ICopycatBlockEntity.super.onLoad(); + } + @Inject( at = @At("HEAD"), - method = "write(Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/level/block/state/BlockState;)V" + method = "write(Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/core/HolderLookup$Provider;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/level/block/state/BlockState;)V" ) - private void writeCT(CompoundTag tag, ItemStack stack, BlockState material, CallbackInfo ci) { + private void writeCT(CompoundTag tag, HolderLookup.Provider registries, ItemStack stack, BlockState material, CallbackInfo ci) { tag.putBoolean("EnableCT", copycats$enableCT); } @Inject( at = @At("HEAD"), - method = "read(Lnet/minecraft/nbt/CompoundTag;Z)V" + method = "read" ) - private void readCT(CompoundTag tag, boolean clientPacket, CallbackInfo ci) { + private void readCT(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket, CallbackInfo ci) { if (tag.contains("EnableCT")) // need to check because copycats migrated from C:Connected don't have this tag copycats$enableCT = tag.getBoolean("EnableCT"); else diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/CopycatBlockMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/CopycatBlockMixin.java index 7e126453c..e8ec74aea 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/CopycatBlockMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/CopycatBlockMixin.java @@ -20,7 +20,7 @@ *

* Also patch its implementation to consider our copycats. */ -@Mixin(CopycatBlock.class) +@Mixin(value = CopycatBlock.class, remap = false) public class CopycatBlockMixin implements ICopycatBlock { @Inject( method = "getAcceptedBlockState", diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/TransparentGhostBlockRendererMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/TransparentGhostBlockRendererMixin.java new file mode 100644 index 000000000..c5c21690c --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/TransparentGhostBlockRendererMixin.java @@ -0,0 +1,25 @@ +package com.copycatsplus.copycats.mixin.foundation.copycat; + +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import net.createmod.ponder.render.VirtualRenderHelper; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.block.state.BlockState; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + +import java.util.List; + +@Mixin(targets = "net.createmod.catnip.ghostblock.GhostBlockRenderer$TransparentGhostBlockRenderer") +public class TransparentGhostBlockRendererMixin { + @WrapOperation( + method = "renderModel", + at = @At(value = "INVOKE", target = "Lnet/minecraft/client/resources/model/BakedModel;getQuads(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/Direction;Lnet/minecraft/util/RandomSource;)Ljava/util/List;") + ) + private List renderModel(BakedModel instance, BlockState blockState, Direction direction, RandomSource randomSource, Operation> original) { + return instance.getQuads(blockState, direction, randomSource, VirtualRenderHelper.VIRTUAL_DATA, null); + } +} diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/migration/ContraptionMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/migration/ContraptionMixin.java index ea60bbb34..3088f1d19 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/migration/ContraptionMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/migration/ContraptionMixin.java @@ -16,7 +16,7 @@ /** * Migrate copycat block entities to multi-state copycat block entities when loading contraptions. */ -@Mixin(Contraption.class) +@Mixin(value = Contraption.class, remap = false) public class ContraptionMixin { @Inject( method = "readStructureBlockInfo", diff --git a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/multistate/AirCurrentMixin.java b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/multistate/AirCurrentMixin.java index a01803588..b9349c3c3 100644 --- a/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/multistate/AirCurrentMixin.java +++ b/common/src/main/java/com/copycatsplus/copycats/mixin/foundation/copycat/multistate/AirCurrentMixin.java @@ -12,7 +12,7 @@ /** * Allow fans to blow through copycat blocks */ -@Mixin(AirCurrent.class) +@Mixin(value = AirCurrent.class, remap = false) public class AirCurrentMixin { @Redirect(method = "getFlowLimit", at = @At(value = "INVOKE", target = "Lcom/simibubi/create/content/decoration/copycat/CopycatBlock;getMaterial(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/level/block/state/BlockState;")) diff --git a/common/src/main/java/com/copycatsplus/copycats/network/CCPackets.java b/common/src/main/java/com/copycatsplus/copycats/network/CCPackets.java index ceedcd3a9..c30b6bb90 100644 --- a/common/src/main/java/com/copycatsplus/copycats/network/CCPackets.java +++ b/common/src/main/java/com/copycatsplus/copycats/network/CCPackets.java @@ -1,12 +1,51 @@ package com.copycatsplus.copycats.network; import com.copycatsplus.copycats.Copycats; +import net.createmod.catnip.net.base.BasePacketPayload; +import net.createmod.catnip.net.base.CatnipPacketRegistry; +import net.createmod.catnip.platform.CatnipServices; +import net.createmod.catnip.platform.services.NetworkHelper; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; -public class CCPackets { +import java.util.Locale; - //TODO: Increase version on updates - public static final PacketSystem PACKETS = PacketSystem.builder(Copycats.MODID, 2) +public enum CCPackets implements BasePacketPayload.PacketTypeProvider { + CONFIG_SYNC(ConfigSyncPacket.class, ConfigSyncPacket.STREAM_CODEC), + FILL_COPYCAT(FillCopycatPacket.class, FillCopycatPacket.STREAM_CODEC) + ; +/* //TODO: Increase version on updates + public static final PacketSystem;PACKETS = PacketSystem.builder(Copycats.MODID, 2) .s2c(ConfigSyncPacket.class, ConfigSyncPacket::new) .c2s(FillCopycatPacket.class, FillCopycatPacket::new) - .build(); + .build();*/ + + private final CatnipPacketRegistry.PacketType type; + + CCPackets(Class clazz, StreamCodec codec) { + String name = this.name().toLowerCase(Locale.ROOT); + this.type = new CatnipPacketRegistry.PacketType<>( + new CustomPacketPayload.Type<>(Copycats.asResource(name)), + clazz, codec + ); + } + + @Override + @SuppressWarnings("unchecked") + public CustomPacketPayload.Type getType() { + return (CustomPacketPayload.Type) this.type.type(); + } + + public static NetworkHelper network() { + return CatnipServices.NETWORK; + } + + public static void register() { + CatnipPacketRegistry packetRegistry = new CatnipPacketRegistry(Copycats.MODID, 3); + for (CCPackets packet : CCPackets.values()) { + packetRegistry.registerPacket(packet.type); + } + packetRegistry.registerAllPackets(); + } } diff --git a/common/src/main/java/com/copycatsplus/copycats/network/ConfigSyncPacket.java b/common/src/main/java/com/copycatsplus/copycats/network/ConfigSyncPacket.java index e60131e2a..c92d4d646 100644 --- a/common/src/main/java/com/copycatsplus/copycats/network/ConfigSyncPacket.java +++ b/common/src/main/java/com/copycatsplus/copycats/network/ConfigSyncPacket.java @@ -2,29 +2,43 @@ import com.copycatsplus.copycats.Copycats; import com.copycatsplus.copycats.config.CCConfigs; +import com.copycatsplus.copycats.config.SyncConfigBase; import com.copycatsplus.copycats.utility.Platform; -import net.minecraft.client.Minecraft; +import io.netty.buffer.ByteBuf; +import net.createmod.catnip.codecs.stream.CatnipStreamCodecBuilders; +import net.createmod.catnip.codecs.stream.CatnipStreamCodecs; +import net.createmod.catnip.config.ConfigBase; +import net.createmod.catnip.net.base.ClientboundPacketPayload; +import net.minecraft.client.player.LocalPlayer; import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.fml.config.ModConfig; +import net.minecraft.network.codec.StreamCodec; +import net.neoforged.fml.config.ModConfig; -public record ConfigSyncPacket(CompoundTag config, ModConfig.Type type) implements PacketSystem.S2CPacket { +public record ConfigSyncPacket(CompoundTag config, ModConfig.Type configType) implements ClientboundPacketPayload { - public ConfigSyncPacket(FriendlyByteBuf buf) { - this(buf.readAnySizeNbt(), buf.readEnum(ModConfig.Type.class)); - } + public static final StreamCodec CONFIG_TYPE_CODEC = CatnipStreamCodecBuilders.ofEnum(ModConfig.Type.class); - @Override - public void write(FriendlyByteBuf buffer) { - buffer.writeNbt(config); - buffer.writeEnum(type); - } + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + CatnipStreamCodecs.COMPOUND_AS_TAG, ConfigSyncPacket::config, + CONFIG_TYPE_CODEC, ConfigSyncPacket::configType, + ((tag, type) -> tag instanceof CompoundTag comp ? new ConfigSyncPacket(comp, type) : null) + ); @Override - public void handle(Minecraft mc) { + public void handle(LocalPlayer localPlayer) { Platform.Environment.CLIENT.runIfCurrent(() -> () -> { - CCConfigs.byType(type()).setSyncConfig(config); - Copycats.LOGGER.debug("Sync Config: Received and applied server config " + config.toString()); + ConfigBase config = CCConfigs.byType(configType); + if (config instanceof SyncConfigBase syncConfig) { + syncConfig.setSyncConfig(this.config); + Copycats.LOGGER.debug("Sync Config: Received and applied server config {}", config.toString()); + } else { + Copycats.LOGGER.warn("Sync Config: Received data for non-synchronized config, ignoring {}", config.toString()); + } }); } + + @Override + public PacketTypeProvider getTypeProvider() { + return CCPackets.CONFIG_SYNC; + } } diff --git a/common/src/main/java/com/copycatsplus/copycats/network/FillCopycatPacket.java b/common/src/main/java/com/copycatsplus/copycats/network/FillCopycatPacket.java index 9f788f62a..307869e6f 100644 --- a/common/src/main/java/com/copycatsplus/copycats/network/FillCopycatPacket.java +++ b/common/src/main/java/com/copycatsplus/copycats/network/FillCopycatPacket.java @@ -1,8 +1,14 @@ package com.copycatsplus.copycats.network; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlock; +import io.netty.buffer.ByteBuf; +import net.createmod.catnip.codecs.stream.CatnipStreamCodecBuilders; +import net.createmod.catnip.codecs.stream.CatnipStreamCodecs; +import net.createmod.catnip.net.base.ServerboundPacketPayload; import net.minecraft.core.BlockPos; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; @@ -15,17 +21,14 @@ * Every part except the specified one will be filled. The specified part will be filled by the server-bound * item use packet. */ -public record FillCopycatPacket(BlockPos pos, BlockState material, String property) implements PacketSystem.C2SPacket { - public FillCopycatPacket(FriendlyByteBuf buf) { - this(buf.readBlockPos(), buf.readById(Block.BLOCK_STATE_REGISTRY), buf.readUtf()); - } +public record FillCopycatPacket(BlockPos pos, BlockState material, String property) implements ServerboundPacketPayload { - @Override - public void write(FriendlyByteBuf buffer) { - buffer.writeBlockPos(pos); - buffer.writeId(Block.BLOCK_STATE_REGISTRY, material); - buffer.writeUtf(property); - } + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + CatnipStreamCodecs.NULLABLE_BLOCK_POS, FillCopycatPacket::pos, + CatnipStreamCodecs.BLOCK_STATE, FillCopycatPacket::material, + CatnipStreamCodecBuilders.nullable(ByteBufCodecs.stringUtf8(256)), FillCopycatPacket::property, + FillCopycatPacket::new + ); @Override public void handle(ServerPlayer sender) { @@ -37,4 +40,9 @@ public void handle(ServerPlayer sender) { copycatBlock.fillEmptyParts(level, pos, state, material); copycatBlock.getCopycatBlockEntity(level, pos).setMaterial(property, prevMaterial); } + + @Override + public PacketTypeProvider getTypeProvider() { + return CCPackets.FILL_COPYCAT; + } } diff --git a/common/src/main/java/com/copycatsplus/copycats/network/PacketSystem.java b/common/src/main/java/com/copycatsplus/copycats/network/PacketSystem.java deleted file mode 100644 index 9c69084ff..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/network/PacketSystem.java +++ /dev/null @@ -1,246 +0,0 @@ -package com.copycatsplus.copycats.network; - -import com.copycatsplus.copycats.Copycats; -import com.simibubi.create.foundation.networking.SimplePacketBase; -import com.simibubi.create.foundation.utility.Components; -import dev.architectury.injectables.annotations.ExpectPlatform; -import io.netty.buffer.Unpooled; -import it.unimi.dsi.fastutil.objects.Object2IntMap; -import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.Minecraft; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import org.jetbrains.annotations.ApiStatus.Internal; - -import java.util.ArrayList; -import java.util.List; -import java.util.function.Function; - -/* Copied from Steam 'N' Rails github as they were the only ones i coud find with a good multiloader packet implementation*/ -/** - * Manages sending and receiving registered packets. - *

- *     C2S -> Client-to-Server
- *     S2C -> Server-to-Client
- * 
- */ -public abstract class PacketSystem { - public final String id; - public final int version; - - public final ResourceLocation c2sPacket; - public final ResourceLocation s2cPacket; - - private final List> s2cPackets; - private final Object2IntMap> s2cTypes; - private final List> c2sPackets; - private final Object2IntMap> c2sTypes; - - protected PacketSystem(String id, int version, - List> s2cPackets, - Object2IntMap> s2cTypes, - List> c2sPackets, - Object2IntMap> c2sTypes) { - this.id = id; - this.version = version; - - this.s2cPackets = s2cPackets; - this.s2cTypes = s2cTypes; - - this.c2sPackets = c2sPackets; - this.c2sTypes = c2sTypes; - - c2sPacket = new ResourceLocation(id, "c2s"); - s2cPacket = new ResourceLocation(id, "s2c"); - } - - /** - * Send the given C2S packet to the server. - */ - @Environment(EnvType.CLIENT) - public void send(C2SPacket packet) { - int i = idOfC2S(packet); - if (i != -1) { - FriendlyByteBuf buf = new FriendlyByteBuf(Unpooled.buffer()); - buf.writeVarInt(i); - packet.write(buf); - doSendC2S(buf); - } else { - throw new IllegalArgumentException("Cannot send unregistered C2SPacket: " + packet); - } - } - - /** - * Send one of Create's packets to the server. - */ - @Environment(EnvType.CLIENT) - public abstract void send(SimplePacketBase packet); - - /** - * Send the given S2C packet to the given player. - */ - public void sendTo(ServerPlayer player, S2CPacket packet) { - sendTo(PlayerSelection.of(player), packet); - } - - /** - * Send the given Create packet to the given player. - */ - public abstract void sendTo(ServerPlayer player, SimplePacketBase packet); - - /** - * Send the given S2C packet to the given players. - */ - public void sendTo(PlayerSelection selection, S2CPacket packet) { - int i = idOfS2C(packet); - if (i != -1) { - FriendlyByteBuf buf = new FriendlyByteBuf(Unpooled.buffer()); - buf.writeVarInt(i); - packet.write(buf); - selection.accept(s2cPacket, buf); - } else { - throw new IllegalArgumentException("Cannot send unregistered S2CPacket: " + packet); - } - } - - /** - * Send the given Create packet to the given players. - */ - public abstract void sendTo(PlayerSelection selection, SimplePacketBase packet); - - @Environment(EnvType.CLIENT) - public abstract void registerS2CListener(); - public abstract void registerC2SListener(); - - @Environment(EnvType.CLIENT) - protected abstract void doSendC2S(FriendlyByteBuf buf); - - protected int idOfC2S(C2SPacket packet) { - return c2sTypes.getOrDefault(packet.getClass(), -1); - } - - protected int idOfS2C(S2CPacket packet) { - return s2cTypes.getOrDefault(packet.getClass(), -1); - } - - @Environment(EnvType.CLIENT) - @Internal - public void handleS2CPacket(Minecraft mc, FriendlyByteBuf buf) { - int i = buf.readVarInt(); - if (i < 0 || i >= s2cPackets.size()) { - Copycats.LOGGER.error("Invalid S2C Packet {}, ignoring", i); - return; - } - Function factory = s2cPackets.get(i); - S2CPacket packet = factory.apply(buf); - mc.execute(() -> packet.handle(mc)); - } - - @Internal - public void handleC2SPacket(ServerPlayer sender, FriendlyByteBuf buf) { - int i = buf.readVarInt(); - if (i < 0 || i >= c2sPackets.size()) { - Copycats.LOGGER.error("Invalid C2S Packet {}, ignoring", i); - return; - } - Function factory = c2sPackets.get(i); - C2SPacket packet = factory.apply(buf); - sender.server.execute(() -> packet.handle(sender)); - } - - @ExpectPlatform - @Internal - public static PacketSystem create(String id, int version, - List> s2cPackets, - Object2IntMap> s2cTypes, - List> c2sPackets, - Object2IntMap> c2sTypes) { - throw new AssertionError(); - } - - /** - * Start building a new PacketSet. Starts with a version sync packet. - */ - public static Builder builder(String id, int version) { - return new Builder(id, version).s2c(CheckVersionPacket.class, CheckVersionPacket::new); - } - - /** - * Send the player a packet with the current network version. If they do not match, the player will disconnect. - */ - public void onPlayerJoin(ServerPlayer player) { - sendTo(player, new CheckVersionPacket(version)); - } - - public record CheckVersionPacket(int serverVersion) implements S2CPacket { - public CheckVersionPacket(FriendlyByteBuf buf) { - this(buf.readVarInt()); - } - - @Override - public void write(FriendlyByteBuf buffer) { - buffer.writeVarInt(serverVersion); - } - - @Override - public void handle(Minecraft mc) { - if (CCPackets.PACKETS.version == serverVersion) - return; - Component error = Components.literal("Create: Copycats+ on the client uses a different network format than the server.") - .append(" You should use the same version of the mod on both sides."); - mc.getConnection().onDisconnect(error); - } - } - - public static class Builder { - public final String id; - public final int version; - - private final List> s2cPackets = new ArrayList<>(); - private final Object2IntMap> s2cTypes = new Object2IntOpenHashMap<>(); - private final List> c2sPackets = new ArrayList<>(); - private final Object2IntMap> c2sTypes = new Object2IntOpenHashMap<>(); - - protected Builder(String id, int version) { - this.id = id; - this.version = version; - } - - public Builder s2c(Class clazz, Function factory) { - s2cPackets.add(factory); - s2cTypes.put(clazz, s2cPackets.indexOf(factory)); - return this; - } - - public Builder c2s(Class clazz, Function factory) { - c2sPackets.add(factory); - c2sTypes.put(clazz, c2sPackets.indexOf(factory)); - return this; - } - - public PacketSystem build() { - return create(id, version, s2cPackets, s2cTypes, c2sPackets, c2sTypes); - } - } - - /** - * A Packet that is written on the client and handled on the server. - */ - public interface C2SPacket { - void write(FriendlyByteBuf buffer); - void handle(ServerPlayer sender); - } - - /** - * A Packet that is written on the server and handled on the client. - */ - public interface S2CPacket { - void write(FriendlyByteBuf buffer); - @Environment(EnvType.CLIENT) - void handle(Minecraft mc); - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/network/PlayerSelection.java b/common/src/main/java/com/copycatsplus/copycats/network/PlayerSelection.java deleted file mode 100644 index 096f9bde8..000000000 --- a/common/src/main/java/com/copycatsplus/copycats/network/PlayerSelection.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.copycatsplus.copycats.network; - -import dev.architectury.injectables.annotations.ExpectPlatform; -import net.minecraft.core.BlockPos; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.level.block.entity.BlockEntity; - -import java.util.function.Predicate; - -/** - * Find players to send S2C packets to. - */ -public abstract class PlayerSelection { - public abstract void accept(ResourceLocation id, FriendlyByteBuf buffer); - - @ExpectPlatform - public static PlayerSelection all() { - throw new AssertionError(); - } - - @ExpectPlatform - public static PlayerSelection allWith(Predicate condition) { - throw new AssertionError(); - } - - @ExpectPlatform - public static PlayerSelection of(ServerPlayer player) { - throw new AssertionError(); - } - - @ExpectPlatform - public static PlayerSelection tracking(BlockEntity be) { - throw new AssertionError(); - } - - @ExpectPlatform - public static PlayerSelection tracking(ServerLevel level, BlockPos pos) { - throw new AssertionError(); - } - - @ExpectPlatform - public static PlayerSelection trackingAndSelf(ServerPlayer player) { - throw new AssertionError(); - } -} diff --git a/common/src/main/java/com/copycatsplus/copycats/utility/BlockEntityUtils.java b/common/src/main/java/com/copycatsplus/copycats/utility/BlockEntityUtils.java index 6a12c7c18..d0b6bc760 100644 --- a/common/src/main/java/com/copycatsplus/copycats/utility/BlockEntityUtils.java +++ b/common/src/main/java/com/copycatsplus/copycats/utility/BlockEntityUtils.java @@ -1,6 +1,5 @@ package com.copycatsplus.copycats.utility; -import com.copycatsplus.copycats.foundation.copycat.CopycatMaterialStore; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; import com.copycatsplus.copycats.mixin.foundation.copycat.BlockEntityAccessor; @@ -8,10 +7,10 @@ import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; -import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.common.world.AuxiliaryLightManager; import javax.annotation.ParametersAreNonnullByDefault; @@ -24,11 +23,6 @@ public class BlockEntityUtils { public static void redraw(BlockEntity blockEntity) { Level level = blockEntity.getLevel(); if (level != null) { - if (blockEntity instanceof IMultiStateCopycatBlockEntity multiStateBE) { - CopycatMaterialStore.setMaterial(level, blockEntity.getBlockPos(), multiStateBE.getMaterialItemStorage().getMaterialMap()); - } else if (blockEntity instanceof ICopycatBlockEntity copycatBE) { - CopycatMaterialStore.setMaterial(level, blockEntity.getBlockPos(), copycatBE.getMaterial()); - } if (level.isClientSide()) { requestModelDataUpdate(blockEntity); } else { @@ -49,17 +43,26 @@ public static void requestModelDataUpdate(BlockEntity blockEntity) { } - private static void updateLight(BlockEntity blockEntity) { + public static void updateLight(BlockEntity blockEntity) { Level level = blockEntity.getLevel(); if (level != null) { BlockPos pos = blockEntity.getBlockPos(); - ProfilerFiller profilerFiller = level.getProfiler(); - profilerFiller.push("updateSkyLightSources"); - level.getChunk(pos).getSkyLightSources().update(level, pos.getX() & 0xF, pos.getY(), pos.getZ() & 0xF); - profilerFiller.popPush("queueCheckLight"); - level.getChunkSource().getLightEngine().checkBlock(pos); - profilerFiller.pop(); - level.getChunk(pos).setUnsaved(true); + AuxiliaryLightManager lightManager = level.getAuxLightManager(pos); + if (lightManager != null) + lightManager.setLightAt(pos, getLightEmission(blockEntity)); + } + } + + private static int getLightEmission(BlockEntity blockEntity) { + if (blockEntity instanceof IMultiStateCopycatBlockEntity multiStateBE) { + int light = 0; + for (BlockState material : multiStateBE.getMaterialItemStorage().getAllMaterials()) { + light = Math.max(light, material.getLightEmission(multiStateBE.getLevel(), multiStateBE.getBlockPos())); + } + return light; + } else if (blockEntity instanceof ICopycatBlockEntity copycatBE) { + return copycatBE.getMaterial().getLightEmission(copycatBE.getLevel(), copycatBE.getBlockPos()); } + return 0; } } diff --git a/common/src/main/java/com/copycatsplus/copycats/utility/BlockUtils.java b/common/src/main/java/com/copycatsplus/copycats/utility/BlockUtils.java index b52751575..e12c6e6b9 100644 --- a/common/src/main/java/com/copycatsplus/copycats/utility/BlockUtils.java +++ b/common/src/main/java/com/copycatsplus/copycats/utility/BlockUtils.java @@ -2,7 +2,7 @@ import com.mojang.math.OctahedralGroup; import com.simibubi.create.content.contraptions.StructureTransform; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.core.Direction; import net.minecraft.world.level.block.Mirror; import net.minecraft.world.level.block.Rotation; diff --git a/common/src/main/java/com/copycatsplus/copycats/utility/InteractionUtils.java b/common/src/main/java/com/copycatsplus/copycats/utility/InteractionUtils.java index 8c4f48690..1f78bce0f 100644 --- a/common/src/main/java/com/copycatsplus/copycats/utility/InteractionUtils.java +++ b/common/src/main/java/com/copycatsplus/copycats/utility/InteractionUtils.java @@ -1,20 +1,23 @@ package com.copycatsplus.copycats.utility; -import com.simibubi.create.foundation.placement.IPlacementHelper; -import com.simibubi.create.foundation.placement.PlacementHelpers; +import dev.architectury.injectables.annotations.ExpectPlatform; +import net.createmod.catnip.placement.IPlacementHelper; +import net.createmod.catnip.placement.PlacementHelpers; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; +import net.minecraft.world.entity.ai.attributes.AttributeInstance; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; +import java.util.function.Supplier; import javax.annotation.ParametersAreNonnullByDefault; -import java.util.function.Supplier; @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault @@ -33,19 +36,37 @@ public static InteractionResult sequential(Supplier... handle return InteractionResult.PASS; } + /** + * Sequentially runs a list of handlers until one consumes the action. + */ + @SafeVarargs + public static ItemInteractionResult sequentialItem(Supplier... handlers) { + for (Supplier handler : handlers) { + ItemInteractionResult result = handler.get(); + if (result.consumesAction()) { + return result; + } + } + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + } + /** * Handles the use action with a registered placement helper. */ - public static InteractionResult usePlacementHelper(int placementHelperId, BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray) { + public static ItemInteractionResult usePlacementHelper(int placementHelperId, ItemStack heldItem, BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray) { if (!player.isShiftKeyDown() && player.mayBuild()) { - ItemStack heldItem = player.getItemInHand(hand); IPlacementHelper placementHelper = PlacementHelpers.get(placementHelperId); if (placementHelper.matchesItem(heldItem)) { placementHelper.getOffset(player, world, state, pos, ray) .placeInWorld(world, (BlockItem) heldItem.getItem(), player, hand, ray); - return InteractionResult.SUCCESS; + return ItemInteractionResult.SUCCESS; } } - return InteractionResult.PASS; + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + } + + @ExpectPlatform + public static AttributeInstance getPlayerReach(Player player) { + throw new AssertionError("This shouldn't ever be seen"); } } diff --git a/common/src/main/java/com/copycatsplus/copycats/utility/ItemUtils.java b/common/src/main/java/com/copycatsplus/copycats/utility/ItemUtils.java index 339b7f3fe..c7797bf31 100644 --- a/common/src/main/java/com/copycatsplus/copycats/utility/ItemUtils.java +++ b/common/src/main/java/com/copycatsplus/copycats/utility/ItemUtils.java @@ -2,6 +2,7 @@ import com.simibubi.create.content.schematics.requirement.ItemRequirement; import dev.architectury.injectables.annotations.ExpectPlatform; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.Tag; import net.minecraft.world.item.ItemStack; import org.jetbrains.annotations.NotNull; @@ -23,7 +24,7 @@ public static ItemStack copyStackWithSize(ItemStack itemStack, int size) { */ @ExpectPlatform @NotNull - public static Tag serializeNBT(ItemStack stack) { + public static Tag serializeNBT(ItemStack stack, HolderLookup.Provider registries) { //noinspection DataFlowIssue return null; } diff --git a/common/src/main/java/com/copycatsplus/copycats/utility/Platform.java b/common/src/main/java/com/copycatsplus/copycats/utility/Platform.java index ade3ee474..6b309fa15 100644 --- a/common/src/main/java/com/copycatsplus/copycats/utility/Platform.java +++ b/common/src/main/java/com/copycatsplus/copycats/utility/Platform.java @@ -6,7 +6,7 @@ import java.util.function.Supplier; public enum Platform { - FORGE, FABRIC; + NEOFORGE, FABRIC; public static final Platform CURRENT = getCurrent(); diff --git a/common/src/main/java/com/copycatsplus/copycats/utility/TriFunction.java b/common/src/main/java/com/copycatsplus/copycats/utility/TriFunction.java new file mode 100644 index 000000000..f3bc9f3fb --- /dev/null +++ b/common/src/main/java/com/copycatsplus/copycats/utility/TriFunction.java @@ -0,0 +1,35 @@ +package com.copycatsplus.copycats.utility; + +import java.util.Objects; +import java.util.function.Function; + +@FunctionalInterface +public interface TriFunction { + + /** + * Applies this function to the given arguments. + * + * @param t the first function argument + * @param u the second function argument + * @return the function result + */ + R apply(T t, U u, P p); + + /** + * Returns a composed function that first applies this function to + * its input, and then applies the {@code after} function to the result. + * If evaluation of either function throws an exception, it is relayed to + * the caller of the composed function. + * + * @param the type of output of the {@code after} function, and of the + * composed function + * @param after the function to apply after this function is applied + * @return a composed function that first applies this function and then + * applies the {@code after} function + * @throws NullPointerException if after is null + */ + default TriFunction andThen(Function after) { + Objects.requireNonNull(after); + return (T t, U u, P p) -> after.apply(apply(t, u, p)); + } +} diff --git a/common/src/main/java/com/copycatsplus/copycats/utility/shape/ExtensibleVoxelShape.java b/common/src/main/java/com/copycatsplus/copycats/utility/shape/ExtensibleVoxelShape.java index 3b9ca6f90..febfeefaa 100644 --- a/common/src/main/java/com/copycatsplus/copycats/utility/shape/ExtensibleVoxelShape.java +++ b/common/src/main/java/com/copycatsplus/copycats/utility/shape/ExtensibleVoxelShape.java @@ -17,5 +17,5 @@ public ExtensibleVoxelShape(VoxelShape voxelProvider) { } @Override - protected abstract DoubleList getCoords(Direction.Axis axis); + public abstract DoubleList getCoords(Direction.Axis axis); } diff --git a/common/src/main/java/com/copycatsplus/copycats/utility/shape/OutlinedVoxelShape.java b/common/src/main/java/com/copycatsplus/copycats/utility/shape/OutlinedVoxelShape.java index dd8b4acec..84e5cbfe9 100644 --- a/common/src/main/java/com/copycatsplus/copycats/utility/shape/OutlinedVoxelShape.java +++ b/common/src/main/java/com/copycatsplus/copycats/utility/shape/OutlinedVoxelShape.java @@ -1,8 +1,8 @@ package com.copycatsplus.copycats.utility.shape; import com.copycatsplus.copycats.mixin.copycat.VoxelShapeAccessor; -import com.simibubi.create.foundation.utility.Pair; import it.unimi.dsi.fastutil.doubles.DoubleList; +import net.createmod.catnip.data.Pair; import net.minecraft.core.Direction; import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.Shapes; @@ -24,7 +24,7 @@ public OutlinedVoxelShape(VoxelShape collisionShape, List> outl } @Override - protected DoubleList getCoords(Direction.Axis axis) { + public DoubleList getCoords(Direction.Axis axis) { return ((VoxelShapeAccessor) this.collisionShape).copycats$callGetCoords(axis); } diff --git a/common/src/main/resources/architectury.common.json b/common/src/main/resources/architectury.common.json new file mode 100644 index 000000000..a679703a1 --- /dev/null +++ b/common/src/main/resources/architectury.common.json @@ -0,0 +1,3 @@ +{ + "accessWidener": "copycats.accesswidener" +} \ No newline at end of file diff --git a/common/src/main/resources/copycats-common.mixins.json b/common/src/main/resources/copycats-common.mixins.json index 71fb9e12c..b34d6b025 100644 --- a/common/src/main/resources/copycats-common.mixins.json +++ b/common/src/main/resources/copycats-common.mixins.json @@ -35,6 +35,7 @@ "foundation.copycat.CopycatBlockEntityMixin", "foundation.copycat.CopycatBlockMixin", "foundation.copycat.RotatedPillarCTBehaviourMixin", + "foundation.copycat.TransparentGhostBlockRendererMixin", "foundation.copycat.kinetic.CreateClientMixin", "foundation.copycat.migration.ContraptionMixin", "foundation.copycat.migration.LevelChunkMixin", diff --git a/common/src/main/resources/copycats.accesswidener b/common/src/main/resources/copycats.accesswidener new file mode 100644 index 000000000..47d94df89 --- /dev/null +++ b/common/src/main/resources/copycats.accesswidener @@ -0,0 +1,2 @@ +accessWidener v2 named +accessible method net/minecraft/core/Holder$Reference bindValue (Ljava/lang/Object;)V \ No newline at end of file diff --git a/fabric/build.gradle b/fabric/build.gradle index 1b6ab7cce..7b5f00318 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -9,7 +9,6 @@ architectury { } loom { - runs { client { vmArg "-XX:+AllowEnhancedClassRedefinition" @@ -46,7 +45,8 @@ dependencies { modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" modApi "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}" - modImplementation("com.simibubi.create:create-fabric-${minecraft_version}:${create_fabric_version}") + //TODO: Re-add Create when theres a 1.21 version + /*modImplementation("com.simibubi.create:create-fabric-${minecraft_version}:${create_fabric_version}")*/ // because create fabric is a bit broken I think modApi("fuzs.forgeconfigapiport:forgeconfigapiport-fabric:${config_port_version}") @@ -90,7 +90,6 @@ shadowJar { } remapJar { - injectAccessWidener = true inputFile.set(shadowJar.archiveFile) dependsOn shadowJar archiveClassifier = null diff --git a/fabric/src/main/java/com/copycatsplus/copycats/config/fabric/CCConfigsImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/config/fabric/CCConfigsImpl.java index 6c0dc54c8..3f9cd408c 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/config/fabric/CCConfigsImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/config/fabric/CCConfigsImpl.java @@ -1,10 +1,7 @@ package com.copycatsplus.copycats.config.fabric; import com.copycatsplus.copycats.Copycats; -import com.copycatsplus.copycats.config.CCConfigs; -import com.copycatsplus.copycats.config.CClient; -import com.copycatsplus.copycats.config.CCommon; -import com.copycatsplus.copycats.config.SyncConfigBase; +import com.copycatsplus.copycats.config.*; import com.simibubi.create.foundation.config.ConfigBase; import fuzs.forgeconfigapiport.api.config.v2.ForgeConfigRegistry; import fuzs.forgeconfigapiport.api.config.v2.ModConfigEvents; @@ -31,6 +28,7 @@ public static void onReload(ModConfig modConfig) { public static void register() { client = register(CClient::new, ModConfig.Type.CLIENT); common = register(CCommon::new, ModConfig.Type.COMMON); + server = register(CServer::new, ModConfig.Type.SERVER); for (Map.Entry pair : CONFIGS.entrySet()) ForgeConfigRegistry.INSTANCE.register(Copycats.MODID, pair.getKey(), pair.getValue().specification); diff --git a/fabric/src/main/java/com/copycatsplus/copycats/config/fabric/SyncConfigBaseImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/config/fabric/SyncConfigBaseImpl.java index 7e520383a..a6064c288 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/config/fabric/SyncConfigBaseImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/config/fabric/SyncConfigBaseImpl.java @@ -4,7 +4,6 @@ import com.copycatsplus.copycats.config.SyncConfigBase; import com.copycatsplus.copycats.network.CCPackets; import com.copycatsplus.copycats.network.ConfigSyncPacket; -import com.copycatsplus.copycats.network.PlayerSelection; import io.github.fabricators_of_create.porting_lib.util.ServerLifecycleHooks; import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; import net.minecraft.server.level.ServerPlayer; diff --git a/fabric/src/main/java/com/copycatsplus/copycats/datagen/fabric/CCDatagenImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/datagen/fabric/CCDatagenImpl.java index fe7da11a1..3378a4e77 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/datagen/fabric/CCDatagenImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/datagen/fabric/CCDatagenImpl.java @@ -24,6 +24,6 @@ public void onInitializeDataGenerator(FabricDataGenerator generator) { ); FabricDataGenerator.Pack pack = generator.createPack(); Copycats.getRegistrate().setupDatagen(pack, helper); - Copycats.gatherData(pack); + Copycats.gatherData(pack, lookupProvider); } } diff --git a/fabric/src/main/java/com/copycatsplus/copycats/datagen/recipes/fabric/GeneratedRecipeBuilderFabric.java b/fabric/src/main/java/com/copycatsplus/copycats/datagen/recipes/fabric/GeneratedRecipeBuilderFabric.java index 975165a61..2c3e40b4e 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/datagen/recipes/fabric/GeneratedRecipeBuilderFabric.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/datagen/recipes/fabric/GeneratedRecipeBuilderFabric.java @@ -105,7 +105,7 @@ private ResourceLocation clean(ResourceLocation loc) { String path = loc.getPath(); while (path.contains("//")) path = path.replaceAll("//", "/"); - return new ResourceLocation(loc.getNamespace(), path); + return ResourceLocation.fromNamespaceAndPath(loc.getNamespace(), path); } private ResourceLocation createSimpleLocation(String recipeType) { @@ -151,7 +151,7 @@ public GeneratedRecipeBuilder requiresFeature(ResourceLocation location, boolean } @Override - public GeneratedRecipe handleConditions(Consumer> recipe) { + public GeneratedRecipe handleConditions(Consumer recipe) { return CopycatsRecipeProvider.register(consumer -> { if (!recipeConditions.isEmpty()) { ConditionalRecipe.Builder b = ConditionalRecipe.builder(); diff --git a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCBuilderTransformersImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCBuilderTransformersImpl.java index c602fe9d9..c3e7fb2a7 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCBuilderTransformersImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCBuilderTransformersImpl.java @@ -17,7 +17,7 @@ public static NonNullUnaryOperator> copy .blockstate((c, p) -> p.simpleBlock(c.get(), p.models() .getExistingFile(p.mcLoc("air")))) .initialProperties(SharedProperties::softMetal) - .properties(p -> p.noOcclusion().mapColor(MapColor.NONE).forceSolidOn()) + .properties(p -> p.noOcclusion().mapColor(MapColor.METAL).forceSolidOn()) // fabric: only render base model on cutout. When rendering the wrapped model's material is copied. .addLayer(() -> RenderType::cutout) .color(() -> ICopycatBlock::wrappedColor) @@ -29,7 +29,7 @@ public static NonNullUnaryOperator> mult .blockstate((c, p) -> p.simpleBlock(c.get(), p.models() .getExistingFile(p.mcLoc("air")))) .initialProperties(SharedProperties::softMetal) - .properties(p -> p.noOcclusion().mapColor(MapColor.NONE).forceSolidOn()) + .properties(p -> p.noOcclusion().mapColor(MapColor.METAL).forceSolidOn()) .addLayer(() -> RenderType::solid) .addLayer(() -> RenderType::cutout) .addLayer(() -> RenderType::cutoutMipped) diff --git a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCCreativeTabsImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCCreativeTabsImpl.java index 187092575..7ddfe7cf9 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCCreativeTabsImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCCreativeTabsImpl.java @@ -2,7 +2,6 @@ import com.copycatsplus.copycats.CCBlocks; import com.copycatsplus.copycats.CCCreativeTabs; -import com.copycatsplus.copycats.CopycatRegistrate; import com.copycatsplus.copycats.Copycats; import com.copycatsplus.copycats.config.FeatureToggle; import com.simibubi.create.AllCreativeModeTabs; diff --git a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCKeysImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCKeysImpl.java index 91e130535..babee5c39 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCKeysImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/fabric/CCKeysImpl.java @@ -20,6 +20,11 @@ public static void register() { ClientTickEvents.END_CLIENT_TICK.register(client -> fixBinds()); } + private static int getBoundCode(CCKeys key) { + return KeyBindingHelper.getBoundKeyOf(key.keybind) + .getValue(); + } + // fabric: from create: sometimes after opening the toolbox menu, alt gets stuck as pressed until a screen is opened. // why is this needed? why did this only just now break? Good questions! I wish I knew. public static void fixBinds() { @@ -27,7 +32,7 @@ public static void fixBinds() { for (CCKeys key : CCKeys.values()) { if (key.keybind == null || key.keybind.isUnbound()) continue; - key.keybind.setDown(InputConstants.isKeyDown(window, key.getBoundCode())); + key.keybind.setDown(InputConstants.isKeyDown(window, getBoundCode(key))); } } } diff --git a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CopycatRegistrateImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/fabric/CopycatRegistrateImpl.java deleted file mode 100644 index 757e9cddb..000000000 --- a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CopycatRegistrateImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.copycatsplus.copycats.fabric; - -import com.copycatsplus.copycats.CopycatRegistrate; -import com.copycatsplus.copycats.fabric.mixin_interfaces.CreateRegistrateAccessor; -import com.simibubi.create.foundation.data.CreateRegistrate; -import net.minecraft.resources.ResourceKey; -import net.minecraft.world.item.CreativeModeTab; - -public class CopycatRegistrateImpl extends CopycatRegistrate { - - protected CopycatRegistrateImpl(String modid) { - super(modid); - } - - - public static CreateRegistrate setTab(Tab tab) { - ((CreateRegistrateAccessor) getInstance()).copycats$setCreativeTab((ResourceKey) tab); - return getInstance(); - } -} diff --git a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CopycatsImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/fabric/CopycatsImpl.java index 000a5fcb3..d68a6b114 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/fabric/CopycatsImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/fabric/CopycatsImpl.java @@ -17,6 +17,7 @@ public class CopycatsImpl implements ModInitializer { public void onInitialize() { CCCreativeTabsImpl.register(); Copycats.init(); + Copycats.getRegistrate().register(); CCCraftingConditions.register(); ServerLifecycleEvents.SERVER_STARTING.register(this::serverStarting); @@ -28,10 +29,6 @@ private void serverStarting(MinecraftServer server) { LogicalSidedProvider.setServer(() -> server); } - public static void finalizeRegistrate() { - Copycats.getRegistrate().register(); - } - static void onChunkUnload(LevelAccessor level, LevelChunk chunk) { CopycatMaterialStore.unloadChunk(level, chunk.getPos()); } diff --git a/fabric/src/main/java/com/copycatsplus/copycats/fabric/mixin/featuretoggle/SubMenuConfigScreenMixin.java b/fabric/src/main/java/com/copycatsplus/copycats/fabric/mixin/featuretoggle/SubMenuConfigScreenMixin.java index 667282e8f..6254c1686 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/fabric/mixin/featuretoggle/SubMenuConfigScreenMixin.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/fabric/mixin/featuretoggle/SubMenuConfigScreenMixin.java @@ -6,7 +6,6 @@ import com.copycatsplus.copycats.utility.Platform; import com.copycatsplus.copycats.network.CCPackets; import com.copycatsplus.copycats.network.ConfigSyncPacket; -import com.copycatsplus.copycats.network.PlayerSelection; import com.simibubi.create.foundation.config.ui.ConfigScreen; import com.simibubi.create.foundation.config.ui.SubMenuConfigScreen; import net.fabricmc.api.EnvType; diff --git a/fabric/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/fabric/KineticCopycatRendererImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/fabric/KineticCopycatRendererImpl.java index 0ba987e57..682ec1422 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/fabric/KineticCopycatRendererImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/fabric/KineticCopycatRendererImpl.java @@ -2,8 +2,10 @@ import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.model.kinetic.WrappedRenderWorld; -import com.jozufozu.flywheel.core.model.ShadeSeparatedBufferedData; import com.mojang.blaze3d.vertex.PoseStack; +import dev.engine_room.flywheel.api.model.Model; +import dev.engine_room.flywheel.lib.model.baked.BakedModelBuilder; +import net.createmod.catnip.render.SuperByteBuffer; import net.fabricmc.fabric.api.rendering.data.v1.RenderAttachedBlockView; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; @@ -11,7 +13,7 @@ import org.jetbrains.annotations.Nullable; public class KineticCopycatRendererImpl { - public static ShadeSeparatedBufferedData getCopycatBuffer(BakedModel model, ICopycatBlockEntity be, PoseStack ms) { + public static SuperByteBuffer renderBuffer(BakedModel model, ICopycatBlockEntity be, PoseStack ms) { return new BakedModelWithDataBuilder(model) .withRenderWorld(new WrappedRenderWorldFabric(be)) .withRenderPos(be.getBlockPos()) @@ -20,6 +22,13 @@ public static ShadeSeparatedBufferedData getCopycatBuffer(BakedModel model, ICop .build(); } + public static Model instancedModel(BakedModel model, ICopycatBlockEntity be) { + return BakedModelBuilder.create(model) + .level(new WrappedRenderWorldFabric(be)) + .pos(be.getBlockPos()) + .build(); + } + @SuppressWarnings("deprecation") private static class WrappedRenderWorldFabric extends WrappedRenderWorld implements RenderAttachedBlockView { public WrappedRenderWorldFabric(ICopycatBlockEntity be) { diff --git a/fabric/src/main/java/com/copycatsplus/copycats/network/fabric/PacketSystemImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/network/fabric/PacketSystemImpl.java index a6024475c..14a81bfd3 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/network/fabric/PacketSystemImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/network/fabric/PacketSystemImpl.java @@ -1,7 +1,5 @@ package com.copycatsplus.copycats.network.fabric; -import com.copycatsplus.copycats.network.PacketSystem; -import com.copycatsplus.copycats.network.PlayerSelection; import com.simibubi.create.AllPackets; import com.simibubi.create.foundation.networking.SimplePacketBase; import it.unimi.dsi.fastutil.objects.Object2IntMap; diff --git a/fabric/src/main/java/com/copycatsplus/copycats/network/fabric/PlayerSelectionImpl.java b/fabric/src/main/java/com/copycatsplus/copycats/network/fabric/PlayerSelectionImpl.java index 3cdd4b700..4192a6953 100644 --- a/fabric/src/main/java/com/copycatsplus/copycats/network/fabric/PlayerSelectionImpl.java +++ b/fabric/src/main/java/com/copycatsplus/copycats/network/fabric/PlayerSelectionImpl.java @@ -1,6 +1,5 @@ package com.copycatsplus.copycats.network.fabric; -import com.copycatsplus.copycats.network.PlayerSelection; import io.github.fabricators_of_create.porting_lib.util.ServerLifecycleHooks; import net.fabricmc.fabric.api.networking.v1.PlayerLookup; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 25b127e40..adabcfc8d 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -22,7 +22,7 @@ "com.copycatsplus.copycats.datagen.fabric.CCDatagenImpl" ], "jei_mod_plugin": [ - "com.copycatsplus.copycats.compat.CopycatsJEI" + "com.copycatsplus.copycats.compat.recipe_viewers.CopycatsJEI" ], "additional-placements-generators": [ "com.copycatsplus.copycats.compat.AdditionalPlacementsCompat" diff --git a/forge/build.gradle b/forge/build.gradle deleted file mode 100644 index 7eeaa5f9a..000000000 --- a/forge/build.gradle +++ /dev/null @@ -1,149 +0,0 @@ -plugins { - id "com.github.johnrengelman.shadow" version "7.1.2" - id 'me.modmuss50.mod-publish-plugin' version "0.5.1" -} - -loom { - forge { - mixinConfig "copycats-common.mixins.json" - mixinConfig "copycats-forge.mixins.json" - } - - runs { - client { - vmArg "-XX:+AllowEnhancedClassRedefinition" - programArgs "--username=Dev" - } - server { - vmArg "-XX:+AllowEnhancedClassRedefinition" - } - data { - data() - name "Data Generation" - programArgs "--all", "--mod", "copycats" - programArgs "--output", file("src/generated/resources").absolutePath - programArgs "--existing", project(":common").file("src/main/resources").absolutePath - programArgs "--existing-mod", "create" - } - } - -} -architectury { - platformSetupLoomIde() - forge() -} - - -configurations { - common - shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files. - compileClasspath.extendsFrom common - runtimeClasspath.extendsFrom common - developmentForge.extendsFrom common -} - -dependencies { - forge "net.minecraftforge:forge:${forge_version}" - - // Create and its dependencies - modImplementation("com.simibubi.create:create-${minecraft_version}:${create_forge_version}:slim") { transitive = false } - modImplementation("com.tterrag.registrate:Registrate:${registrate_forge_version}") - modImplementation("com.jozufozu.flywheel:flywheel-forge-${minecraft_version}:${flywheel_forge_version}") - - modLocalRuntime("curse.maven:jade-324717:${jade_forge_curse_id}") - modLocalRuntime("mezz.jei:jei-${minecraft_version}-forge:${jei_forge_version}") - - modLocalRuntime("curse.maven:embeddium-908741:${embeddium_forge_curse_id}") - modImplementation("curse.maven:additional-placements-674852:${additionalplacements_forge_curse_id}") - modImplementation("curse.maven:athena-841890:${athena_forge_curse_id}") - // modLocalRuntime("curse.maven:create-industry-693815:${tfmg_forge_curse_id}") - modLocalRuntime("curse.maven:starlight-forge-526854:4631193") -// modLocalRuntime("curse.maven:create-extended-cogs-739973:${extended_cogwheels_forge_curse_id}") - - modCompileOnly("curse.maven:double-slabs-350179:${double_slabs_forge_curse_id}") - modLocalRuntime("curse.maven:spark-361579:${spark_forge_curse_id}") - modCompileOnly("curse.maven:selene-499980:${moonlight_curse_forge_id}") - modCompileOnly("curse.maven:vertical-slabs-compat-724387:${vertical_slabs_curse_forge_id}") - - compileOnly("io.github.llamalad7:mixinextras-common:${mixin_extras_version}") - annotationProcessor(implementation(include("io.github.llamalad7:mixinextras-forge:${mixin_extras_version}"))) - - common(project(path: ":common", configuration: "namedElements")) { transitive false } - shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false } -} - -processResources { - inputs.property "version", project.version - - filesMatching("META-INF/mods.toml") { - expand "version": project.version - } -} - -shadowJar { - exclude "fabric.mod.json" - - configurations = [project.configurations.shadowCommon] - archiveClassifier = "dev-shadow" -} - -remapJar { - inputFile.set(shadowJar.archiveFile) - dependsOn shadowJar - archiveClassifier.set(null) -} - -sourceSets { - main { - resources.srcDir 'src/generated/resources' - } -} - -jar { - archiveClassifier.set("dev") -} - -sourcesJar { - def commonSources = project(":common").sourcesJar - dependsOn commonSources - from commonSources.archiveFile.map { zipTree(it) } -} - -components.java { - withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { - skip() - } -} - -tasks.publishMods.dependsOn(tasks.assemble) -tasks.publishMods.mustRunAfter(tasks.build) - -publishMods { - changelog = "Check out the detailed changelog at https://github.com/copycats-plus/copycats/blob/multiloader/CHANGELOG.md" - type = STABLE - file = tasks.remapJar.archiveFile - displayName = file.map { it.asFile.name.substring(0, it.asFile.name.lastIndexOf('.')) } - modLoaders.add("forge") - modLoaders.add("neoforge") - - modrinth { - accessToken = project.findProperty("MODRINTH_TOKEN") - projectId = "UT2M39wf" - minecraftVersions.add(minecraft_version) - - requires { - id = "LNytGWDc" - } - optional { - id = "u6dRKJwZ" - } - } - - curseforge { - accessToken = project.findProperty("CURSEFORGE_TOKEN") - projectId = "968398" - minecraftVersions.add(minecraft_version) - } - - dryRun = Boolean.parseBoolean(doDryRun) -} \ No newline at end of file diff --git a/forge/gradle.properties b/forge/gradle.properties deleted file mode 100644 index 32f842a63..000000000 --- a/forge/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -loom.platform=forge \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_beam.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_beam.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_beam.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_block.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_block.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_block.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_board.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_board.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_board.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_byte.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_byte.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_byte.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_fence.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_fence.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_fence.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_fence_gate.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_fence_gate.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_fence_gate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_half_layer.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_half_layer.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_half_layer.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_half_panel.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_half_panel.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_half_panel.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_heavy_weighted_pressure_plate.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_heavy_weighted_pressure_plate.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_heavy_weighted_pressure_plate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_layer.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_layer.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_layer.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_light_weighted_pressure_plate.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_light_weighted_pressure_plate.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_light_weighted_pressure_plate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_slab.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_slab.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_slab.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_slice.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_slice.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_slice.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_stairs.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_stairs.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_stairs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_stone_button.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_stone_button.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_stone_button.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_stone_pressure_plate.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_stone_pressure_plate.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_stone_pressure_plate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_trapdoor.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_trapdoor.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_trapdoor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slice.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slice.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slice.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_step.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_step.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_step.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_wall.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_wall.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_wall.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_button.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_button.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_button.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_pressure_plate.json b/forge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_pressure_plate.json deleted file mode 100644 index 2c8f02f06..000000000 --- a/forge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_pressure_plate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "minecraft:block/air" - } - } -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_beam.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_beam.json deleted file mode 100644 index 1da5c4a8d..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_beam.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/beam" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_block.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_block.json deleted file mode 100644 index ff22d37fe..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/block" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_board.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_board.json deleted file mode 100644 index 54ed557c5..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_board.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/board" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_box.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_box.json deleted file mode 100644 index 796b406c3..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_box.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/box" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_byte.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_byte.json deleted file mode 100644 index bdc1cb14d..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_byte.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/byte" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_catwalk.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_catwalk.json deleted file mode 100644 index 798f7bdd4..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_catwalk.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/catwalk" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_fence.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_fence.json deleted file mode 100644 index b8c0cf2bb..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/fence" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_fence_gate.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_fence_gate.json deleted file mode 100644 index aeface7de..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/fence_gate" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_half_layer.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_half_layer.json deleted file mode 100644 index 82c4fe7a1..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_half_layer.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/half_layer" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_half_panel.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_half_panel.json deleted file mode 100644 index 96be5e757..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_half_panel.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/half_panel" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_heavy_weighted_pressure_plate.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_heavy_weighted_pressure_plate.json deleted file mode 100644 index 2c6a175cc..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_heavy_weighted_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/pressure_plate" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_layer.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_layer.json deleted file mode 100644 index 44c7c2cc6..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_layer.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/layer" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_light_weighted_pressure_plate.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_light_weighted_pressure_plate.json deleted file mode 100644 index 2c6a175cc..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_light_weighted_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/pressure_plate" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_slab.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_slab.json deleted file mode 100644 index e87d4add9..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/slab" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_slice.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_slice.json deleted file mode 100644 index 140115304..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_slice.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/slice" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_stairs.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_stairs.json deleted file mode 100644 index 2dc71af80..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/stairs" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_stone_button.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_stone_button.json deleted file mode 100644 index 3b4726846..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_stone_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/button" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_stone_pressure_plate.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_stone_pressure_plate.json deleted file mode 100644 index 2c6a175cc..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_stone_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/pressure_plate" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_trapdoor.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_trapdoor.json deleted file mode 100644 index 1e47a6e18..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/trapdoor" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_slice.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_slice.json deleted file mode 100644 index d1a85714d..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_slice.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/vertical_slice" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_step.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_step.json deleted file mode 100644 index e620b1b70..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_step.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/vertical_step" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_wall.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_wall.json deleted file mode 100644 index 951a998a2..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/wall" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_wooden_button.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_wooden_button.json deleted file mode 100644 index 3b4726846..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_wooden_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/button" -} \ No newline at end of file diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_wooden_pressure_plate.json b/forge/src/generated/resources/assets/copycats/models/item/copycat_wooden_pressure_plate.json deleted file mode 100644 index 2c6a175cc..000000000 --- a/forge/src/generated/resources/assets/copycats/models/item/copycat_wooden_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "copycats:block/copycat_base/pressure_plate" -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_beam.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_beam.json deleted file mode 100644 index 31c3e066c..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_beam.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_beam" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_beam" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_beam", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_block.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_block.json deleted file mode 100644 index 2311b5cf0..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_block.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_block" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_block" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_block", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_block_from_slabs.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_block_from_slabs.json deleted file mode 100644 index b8e9d7e3e..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_block_from_slabs.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "copycats:copycat_slab" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_block_from_slabs" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_block_from_slabs" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_block", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_board.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_board.json deleted file mode 100644 index 118e60d48..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_board.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_board" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_board" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_board", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_box.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_box.json deleted file mode 100644 index b44ac8391..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_box.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "copycats:copycat_board" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_box" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_box" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_box", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_byte.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_byte.json deleted file mode 100644 index 33de9cfd6..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_byte.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_byte" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_byte" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_byte", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_byte_panel.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_byte_panel.json deleted file mode 100644 index 183392521..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_byte_panel.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_byte_panel" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_byte_panel" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_byte_panel", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_catwalk.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_catwalk.json deleted file mode 100644 index 25c06e3cf..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_catwalk.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "copycats:copycat_board" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_catwalk" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_catwalk" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_catwalk", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_cogwheel.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_cogwheel.json deleted file mode 100644 index 4dd821fc8..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_cogwheel.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "create:cogwheel" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_cogwheel" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_cogwheel" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_cogwheel", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_corner_slice.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_corner_slice.json deleted file mode 100644 index aba4bd2a8..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_corner_slice.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_corner_slice" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_corner_slice" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_corner_slice", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_door.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_door.json deleted file mode 100644 index 148ecce3d..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_door.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_door" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_door" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_door", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_fence.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_fence.json deleted file mode 100644 index d05488506..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_fence.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_fence" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_fence" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_fence", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_fence_gate.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_fence_gate.json deleted file mode 100644 index 280948cd0..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_fence_gate.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_fence_gate" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_fence_gate" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_fence_gate", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_flat_pane.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_flat_pane.json deleted file mode 100644 index 23ff7718f..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_flat_pane.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_flat_pane" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_flat_pane" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_flat_pane", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_flat_pane_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_flat_pane_from_conversion.json deleted file mode 100644 index f5ef2091f..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_flat_pane_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_pane" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_flat_pane_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_flat_pane_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_pane", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_flat_pane", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_fluid_pipe.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_fluid_pipe.json deleted file mode 100644 index 99f17291d..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_fluid_pipe.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "create:fluid_pipe" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_fluid_pipe" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_fluid_pipe" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_fluid_pipe", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_folding_door.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_folding_door.json deleted file mode 100644 index 1f102b60d..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_folding_door.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_folding_door" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_folding_door" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_folding_door", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_folding_door_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_folding_door_from_conversion.json deleted file mode 100644 index b2c8c2500..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_folding_door_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_sliding_door" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_folding_door_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_folding_door_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_sliding_door", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_folding_door", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_ghost_block.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_ghost_block.json deleted file mode 100644 index bc78a129a..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_ghost_block.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_ghost_block" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_ghost_block" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_ghost_block", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_half_layer.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_half_layer.json deleted file mode 100644 index fe9026e9e..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_half_layer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_half_layer" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_half_layer" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_layer", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_half_layer_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_half_layer_from_conversion.json deleted file mode 100644 index d605fa424..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_half_layer_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_stacked_half_layer" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_half_layer_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_half_layer_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stacked_half_layer", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_layer", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_half_panel.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_half_panel.json deleted file mode 100644 index a15d410d3..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_half_panel.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_half_panel" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_half_panel" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_panel", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_heavy_weighted_pressure_plate.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_heavy_weighted_pressure_plate.json deleted file mode 100644 index 44fb72eb0..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_heavy_weighted_pressure_plate.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_heavy_weighted_pressure_plate" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_heavy_weighted_pressure_plate" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_heavy_weighted_pressure_plate", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_iron_door.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_iron_door.json deleted file mode 100644 index 7a59a96b0..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_iron_door.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "minecraft:iron_door" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_iron_door" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_iron_door" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_iron_door", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_iron_trapdoor.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_iron_trapdoor.json deleted file mode 100644 index c24c3acf0..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_iron_trapdoor.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_iron_trapdoor" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_iron_trapdoor" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_iron_trapdoor", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_ladder.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_ladder.json deleted file mode 100644 index 0bd613c80..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_ladder.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_ladder" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_ladder" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_ladder", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_large_cogwheel.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_large_cogwheel.json deleted file mode 100644 index 5761bc171..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_large_cogwheel.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "create:large_cogwheel" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_large_cogwheel" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_large_cogwheel" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_large_cogwheel", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_layer.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_layer.json deleted file mode 100644 index 6460ddff6..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_layer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_layer" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_layer" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_layer", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_layer_from_half_layers.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_layer_from_half_layers.json deleted file mode 100644 index fae8e88b7..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_layer_from_half_layers.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_half_layer" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_layer_from_half_layers" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_layer_from_half_layers" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_layer", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_light_weighted_pressure_plate.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_light_weighted_pressure_plate.json deleted file mode 100644 index a52dafd96..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_light_weighted_pressure_plate.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_light_weighted_pressure_plate" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_light_weighted_pressure_plate" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_light_weighted_pressure_plate", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_pane.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_pane.json deleted file mode 100644 index 1b556d57e..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_pane.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_pane" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_pane" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_pane", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_pane_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_pane_from_conversion.json deleted file mode 100644 index 1312d29c7..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_pane_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_flat_pane" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_pane_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_pane_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_flat_pane", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_pane", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_panel_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_panel_from_conversion.json deleted file mode 100644 index d4b4c27d2..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_panel_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_trapdoor" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_panel_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_panel_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_trapdoor", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "create:copycat_panel", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_panel_from_half_panels.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_panel_from_half_panels.json deleted file mode 100644 index 23c9c9507..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_panel_from_half_panels.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_half_panel" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_panel_from_half_panels" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_panel_from_half_panels" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_panel", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_shaft.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_shaft.json deleted file mode 100644 index 87ce7b366..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_shaft.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_shaft" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_shaft" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_shaft", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab.json deleted file mode 100644 index 5f519b700..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_slab" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_slab" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab_from_beams.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab_from_beams.json deleted file mode 100644 index 18eeb0be8..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab_from_beams.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "copycats:copycat_beam" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_slab_from_beams" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_slab_from_beams" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_beam", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab_from_panels.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab_from_panels.json deleted file mode 100644 index a95e256b0..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab_from_panels.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "create:copycat_panel" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_slab_from_panels" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_slab_from_panels" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab_from_steps.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab_from_steps.json deleted file mode 100644 index 7ee66b70d..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slab_from_steps.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "create:copycat_step" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_slab_from_steps" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_slab_from_steps" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slice.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slice.json deleted file mode 100644 index e7f2f4b36..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slice.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_slice" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_slice" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slice", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slice_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slice_from_conversion.json deleted file mode 100644 index d535eea28..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slice_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_vertical_slice" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_slice_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_slice_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slice", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slice", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_sliding_door.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_sliding_door.json deleted file mode 100644 index 97e539bad..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_sliding_door.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_sliding_door" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_sliding_door" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_sliding_door", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_sliding_door_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_sliding_door_from_conversion.json deleted file mode 100644 index b4e277521..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_sliding_door_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_folding_door" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_sliding_door_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_sliding_door_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_folding_door", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_sliding_door", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slope.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slope.json deleted file mode 100644 index f1758da1d..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slope.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_slope" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_slope" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slope", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slope_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slope_from_conversion.json deleted file mode 100644 index a9ff187ce..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slope_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_vertical_slope" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_slope_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_slope_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slope", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slope", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slope_layer.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slope_layer.json deleted file mode 100644 index 5d4eab341..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_slope_layer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_slope_layer" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_slope_layer" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slope_layer", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stacked_half_layer.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stacked_half_layer.json deleted file mode 100644 index ddd881d04..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stacked_half_layer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_stacked_half_layer" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_stacked_half_layer" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stacked_half_layer", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stacked_half_layer_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stacked_half_layer_from_conversion.json deleted file mode 100644 index 6afb96725..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stacked_half_layer_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_vertical_half_layer" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_stacked_half_layer_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_stacked_half_layer_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_half_layer", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stacked_half_layer", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stairs.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stairs.json deleted file mode 100644 index a365a89b0..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stairs.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_stairs" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_stairs" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stairs", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stairs_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stairs_from_conversion.json deleted file mode 100644 index f200f8cac..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stairs_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_vertical_stairs" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_stairs_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_stairs_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stairs", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_stairs", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_step_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_step_from_conversion.json deleted file mode 100644 index 1f6e45948..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_step_from_conversion.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "copycats:copycat_vertical_step" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_step_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_step_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_step", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stone_button.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stone_button.json deleted file mode 100644 index 37434b81d..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stone_button.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_stone_button" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_stone_button" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stone_button", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stone_pressure_plate.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stone_pressure_plate.json deleted file mode 100644 index e5848d1cb..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_stone_pressure_plate.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_stone_pressure_plate" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_stone_pressure_plate" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stone_pressure_plate", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_trapdoor.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_trapdoor.json deleted file mode 100644 index 3dc6117bf..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_trapdoor.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_trapdoor" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_trapdoor" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_trapdoor", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_trapdoor_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_trapdoor_from_conversion.json deleted file mode 100644 index c5e3b3289..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_trapdoor_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "create:copycat_panel" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_trapdoor_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_trapdoor_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "create:copycat_panel", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_trapdoor", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_half_layer.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_half_layer.json deleted file mode 100644 index 2db549a85..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_half_layer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_vertical_half_layer" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_vertical_half_layer" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_half_layer", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_half_layer_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_half_layer_from_conversion.json deleted file mode 100644 index 8a24ebd4a..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_half_layer_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_half_layer" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_vertical_half_layer_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_vertical_half_layer_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_layer", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_half_layer", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slice.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slice.json deleted file mode 100644 index f8cc2af21..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slice.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_vertical_slice" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_vertical_slice" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slice", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slice_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slice_from_conversion.json deleted file mode 100644 index 89e61ec62..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slice_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_slice" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_vertical_slice_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_vertical_slice_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slice", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slice", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slope.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slope.json deleted file mode 100644 index eeeebafd8..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slope.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_vertical_slope" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_vertical_slope" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slope", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slope_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slope_from_conversion.json deleted file mode 100644 index 24c599a51..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_slope_from_conversion.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "copycats:copycat_slope" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_vertical_slope_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_vertical_slope_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slope", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slope", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_stairs.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_stairs.json deleted file mode 100644 index 41754da06..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_stairs.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_vertical_stairs" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_vertical_stairs" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_stairs", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_stairs_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_stairs_from_conversion.json deleted file mode 100644 index 04f4efcfd..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_stairs_from_conversion.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "copycats:copycat_stairs" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_vertical_stairs_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_vertical_stairs_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_stairs", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stairs", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_step.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_step.json deleted file mode 100644 index 5c39e6519..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_step.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_vertical_step" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_vertical_step" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_step", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_step_from_conversion.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_step_from_conversion.json deleted file mode 100644 index 93470674d..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_vertical_step_from_conversion.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "create:copycat_step" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:crafting/copycat_vertical_step_from_conversion" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:crafting/copycat_vertical_step_from_conversion" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_step", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_wall.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_wall.json deleted file mode 100644 index 15f479ce5..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_wall.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_wall" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_wall" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_wall", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_wooden_button.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_wooden_button.json deleted file mode 100644 index f102078bb..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_wooden_button.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_wooden_button" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_wooden_button" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_wooden_button", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_wooden_pressure_plate.json b/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_wooden_pressure_plate.json deleted file mode 100644 index 233e5b0b5..000000000 --- a/forge/src/generated/resources/data/copycats/advancements/recipes/crafting/copycat_wooden_pressure_plate.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "advancements": [ - { - "advancement": { - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "tag": "forge:ingots/zinc" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "copycats:stonecutting/copycat_wooden_pressure_plate" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "copycats:stonecutting/copycat_wooden_pressure_plate" - ] - }, - "sends_telemetry_event": false - }, - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_wooden_pressure_plate", - "invert": false - } - ] - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_beam.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_beam.json deleted file mode 100644 index f2cd66f03..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_beam.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_beam", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 4, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_beam" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_block.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_block.json deleted file mode 100644 index ac8e563df..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_block.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_block", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_block" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_block_from_slabs.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_block_from_slabs.json deleted file mode 100644 index dae060c4e..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_block_from_slabs.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_block", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "s": { - "tag": "copycats:copycat_slab" - } - }, - "pattern": [ - "s", - "s" - ], - "result": { - "item": "copycats:copycat_block" - }, - "show_notification": true - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_board.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_board.json deleted file mode 100644 index b1e2e6e9c..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_board.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_board", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 8, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_board" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_box.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_box.json deleted file mode 100644 index f61553685..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_box.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_box", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "s": { - "tag": "copycats:copycat_board" - } - }, - "pattern": [ - "ss ", - "s s", - " ss" - ], - "result": { - "item": "copycats:copycat_box" - }, - "show_notification": true - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_byte.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_byte.json deleted file mode 100644 index 46210b288..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_byte.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_byte", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 8, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_byte" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_byte_panel.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_byte_panel.json deleted file mode 100644 index b0f862ec8..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_byte_panel.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_byte_panel", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 16, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_byte_panel" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_catwalk.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_catwalk.json deleted file mode 100644 index 0f5761de7..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_catwalk.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_catwalk", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "s": { - "tag": "copycats:copycat_board" - } - }, - "pattern": [ - "s s", - " s " - ], - "result": { - "item": "copycats:copycat_catwalk" - }, - "show_notification": true - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_cogwheel.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_cogwheel.json deleted file mode 100644 index 1bdb7fa85..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_cogwheel.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_cogwheel", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "create:cogwheel" - }, - { - "item": "create:cogwheel" - }, - { - "item": "create:cogwheel" - }, - { - "item": "create:cogwheel" - }, - { - "item": "create:zinc_ingot" - } - ], - "result": { - "count": 4, - "item": "copycats:copycat_cogwheel" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_corner_slice.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_corner_slice.json deleted file mode 100644 index 31e32d816..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_corner_slice.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_corner_slice", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 16, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_corner_slice" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_door.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_door.json deleted file mode 100644 index 34e03c2a6..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_door.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_door", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_door" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_fence.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_fence.json deleted file mode 100644 index 1022a196a..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_fence.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_fence", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_fence" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_fence_gate.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_fence_gate.json deleted file mode 100644 index f10ff02e8..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_fence_gate.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_fence_gate", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_fence_gate" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_flat_pane.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_flat_pane.json deleted file mode 100644 index a40242aed..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_flat_pane.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_flat_pane", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 8, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_flat_pane" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_flat_pane_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_flat_pane_from_conversion.json deleted file mode 100644 index 72d82e562..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_flat_pane_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_pane", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_flat_pane", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_pane" - } - ], - "result": { - "item": "copycats:copycat_flat_pane" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_fluid_pipe.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_fluid_pipe.json deleted file mode 100644 index 5a970e4a8..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_fluid_pipe.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_fluid_pipe", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "create:fluid_pipe" - }, - { - "item": "create:fluid_pipe" - }, - { - "item": "create:fluid_pipe" - }, - { - "item": "create:fluid_pipe" - }, - { - "item": "create:zinc_ingot" - } - ], - "result": { - "count": 4, - "item": "copycats:copycat_fluid_pipe" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_folding_door.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_folding_door.json deleted file mode 100644 index 902669e95..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_folding_door.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_folding_door", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_folding_door" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_folding_door_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_folding_door_from_conversion.json deleted file mode 100644 index fdbe6afd6..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_folding_door_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_sliding_door", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_folding_door", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_sliding_door" - } - ], - "result": { - "item": "copycats:copycat_folding_door" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_ghost_block.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_ghost_block.json deleted file mode 100644 index 2416e7679..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_ghost_block.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_ghost_block", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_ghost_block" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_half_layer.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_half_layer.json deleted file mode 100644 index 26730ecf1..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_half_layer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_layer", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 16, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_half_layer" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_half_layer_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_half_layer_from_conversion.json deleted file mode 100644 index 7a6781961..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_half_layer_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stacked_half_layer", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_layer", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_stacked_half_layer" - } - ], - "result": { - "item": "copycats:copycat_half_layer" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_half_panel.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_half_panel.json deleted file mode 100644 index 1068d873a..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_half_panel.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_panel", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 8, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_half_panel" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_heavy_weighted_pressure_plate.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_heavy_weighted_pressure_plate.json deleted file mode 100644 index 0ef940d72..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_heavy_weighted_pressure_plate.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_heavy_weighted_pressure_plate", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 2, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_heavy_weighted_pressure_plate" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_iron_door.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_iron_door.json deleted file mode 100644 index 76db1eefd..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_iron_door.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_iron_door", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "minecraft:iron_door" - }, - { - "item": "create:zinc_ingot" - } - ], - "result": { - "item": "copycats:copycat_iron_door" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_iron_trapdoor.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_iron_trapdoor.json deleted file mode 100644 index b08afbb69..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_iron_trapdoor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_iron_trapdoor", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 2, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_iron_trapdoor" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_ladder.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_ladder.json deleted file mode 100644 index f8cca1251..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_ladder.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_ladder", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 6, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_ladder" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_large_cogwheel.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_large_cogwheel.json deleted file mode 100644 index 7b6a66d2e..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_large_cogwheel.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_large_cogwheel", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "create:large_cogwheel" - }, - { - "item": "create:large_cogwheel" - }, - { - "item": "create:large_cogwheel" - }, - { - "item": "create:large_cogwheel" - }, - { - "item": "create:zinc_ingot" - } - ], - "result": { - "count": 4, - "item": "copycats:copycat_large_cogwheel" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_layer.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_layer.json deleted file mode 100644 index fa0564f9c..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_layer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_layer", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 8, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_layer" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_layer_from_half_layers.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_layer_from_half_layers.json deleted file mode 100644 index e157954e5..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_layer_from_half_layers.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_layer", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "s": { - "item": "copycats:copycat_half_layer" - } - }, - "pattern": [ - "ss" - ], - "result": { - "item": "copycats:copycat_layer" - }, - "show_notification": true - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_light_weighted_pressure_plate.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_light_weighted_pressure_plate.json deleted file mode 100644 index 0745509c7..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_light_weighted_pressure_plate.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_light_weighted_pressure_plate", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 2, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_light_weighted_pressure_plate" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_pane.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_pane.json deleted file mode 100644 index deab05e48..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_pane.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_pane", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 8, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_pane" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_pane_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_pane_from_conversion.json deleted file mode 100644 index b4b0843c3..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_pane_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_flat_pane", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_pane", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_flat_pane" - } - ], - "result": { - "item": "copycats:copycat_pane" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_panel_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_panel_from_conversion.json deleted file mode 100644 index 057f6b297..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_panel_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_trapdoor", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "create:copycat_panel", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_trapdoor" - } - ], - "result": { - "item": "create:copycat_panel" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_panel_from_half_panels.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_panel_from_half_panels.json deleted file mode 100644 index 7ba5d4055..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_panel_from_half_panels.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_panel", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "s": { - "item": "copycats:copycat_half_panel" - } - }, - "pattern": [ - "ss" - ], - "result": { - "item": "create:copycat_panel" - }, - "show_notification": true - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_shaft.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_shaft.json deleted file mode 100644 index 30cbb702c..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_shaft.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_shaft", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 4, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_shaft" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab.json deleted file mode 100644 index e4d84987d..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 2, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_slab" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab_from_beams.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab_from_beams.json deleted file mode 100644 index bdc9d8dd0..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab_from_beams.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_beam", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "s": { - "tag": "copycats:copycat_beam" - } - }, - "pattern": [ - "ss" - ], - "result": { - "item": "copycats:copycat_slab" - }, - "show_notification": true - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab_from_panels.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab_from_panels.json deleted file mode 100644 index 1074a940a..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab_from_panels.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "p": { - "item": "create:copycat_panel" - } - }, - "pattern": [ - "p", - "p" - ], - "result": { - "item": "copycats:copycat_slab" - }, - "show_notification": true - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab_from_steps.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab_from_steps.json deleted file mode 100644 index 84455a148..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slab_from_steps.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slab", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "s": { - "item": "create:copycat_step" - } - }, - "pattern": [ - "ss" - ], - "result": { - "item": "copycats:copycat_slab" - }, - "show_notification": true - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slice.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slice.json deleted file mode 100644 index c304a89d0..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slice.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slice", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 16, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_slice" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slice_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slice_from_conversion.json deleted file mode 100644 index 11f937dd7..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slice_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slice", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slice", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_vertical_slice" - } - ], - "result": { - "item": "copycats:copycat_slice" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_sliding_door.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_sliding_door.json deleted file mode 100644 index e59377102..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_sliding_door.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_sliding_door", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_sliding_door" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_sliding_door_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_sliding_door_from_conversion.json deleted file mode 100644 index 036e4fd40..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_sliding_door_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_folding_door", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_sliding_door", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_folding_door" - } - ], - "result": { - "item": "copycats:copycat_sliding_door" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slope.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slope.json deleted file mode 100644 index b99b3edb1..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slope.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slope", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 2, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_slope" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slope_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slope_from_conversion.json deleted file mode 100644 index ad827e0ef..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slope_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slope", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slope", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_vertical_slope" - } - ], - "result": { - "item": "copycats:copycat_slope" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slope_layer.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slope_layer.json deleted file mode 100644 index 7ca6a07fc..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_slope_layer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slope_layer", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 8, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_slope_layer" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stacked_half_layer.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stacked_half_layer.json deleted file mode 100644 index 1660f7007..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stacked_half_layer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stacked_half_layer", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 16, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_stacked_half_layer" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stacked_half_layer_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stacked_half_layer_from_conversion.json deleted file mode 100644 index 4285d55c2..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stacked_half_layer_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_half_layer", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stacked_half_layer", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_vertical_half_layer" - } - ], - "result": { - "item": "copycats:copycat_stacked_half_layer" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stairs.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stairs.json deleted file mode 100644 index 2af4fd917..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stairs.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stairs", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_stairs" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stairs_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stairs_from_conversion.json deleted file mode 100644 index 0ef2e2946..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stairs_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stairs", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_stairs", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_vertical_stairs" - } - ], - "result": { - "item": "copycats:copycat_stairs" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_step_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_step_from_conversion.json deleted file mode 100644 index c2a567319..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_step_from_conversion.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_step", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "tag": "copycats:copycat_vertical_step" - } - ], - "result": { - "item": "create:copycat_step" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stone_button.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stone_button.json deleted file mode 100644 index 1ec57879c..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stone_button.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stone_button", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 4, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_stone_button" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stone_pressure_plate.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stone_pressure_plate.json deleted file mode 100644 index e98e61072..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_stone_pressure_plate.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stone_pressure_plate", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 4, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_stone_pressure_plate" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_trapdoor.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_trapdoor.json deleted file mode 100644 index 1cda6e84e..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_trapdoor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_trapdoor", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 4, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_trapdoor" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_trapdoor_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_trapdoor_from_conversion.json deleted file mode 100644 index 5a7909898..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_trapdoor_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "create:copycat_panel", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_trapdoor", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "create:copycat_panel" - } - ], - "result": { - "item": "copycats:copycat_trapdoor" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_half_layer.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_half_layer.json deleted file mode 100644 index 23b7fddc6..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_half_layer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_half_layer", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 16, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_vertical_half_layer" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_half_layer_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_half_layer_from_conversion.json deleted file mode 100644 index e5bea6a08..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_half_layer_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_half_layer", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_half_layer", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_half_layer" - } - ], - "result": { - "item": "copycats:copycat_vertical_half_layer" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slice.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slice.json deleted file mode 100644 index 242c210ed..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slice.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slice", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 16, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_vertical_slice" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slice_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slice_from_conversion.json deleted file mode 100644 index 51d8b4bc5..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slice_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slice", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slice", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_slice" - } - ], - "result": { - "item": "copycats:copycat_vertical_slice" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slope.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slope.json deleted file mode 100644 index bae6d57bb..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slope.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slope", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 2, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_vertical_slope" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slope_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slope_from_conversion.json deleted file mode 100644 index a19eda9a5..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_slope_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_slope", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_slope", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "copycats:copycat_slope" - } - ], - "result": { - "item": "copycats:copycat_vertical_slope" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_stairs.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_stairs.json deleted file mode 100644 index eb6ad01f7..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_stairs.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_stairs", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_vertical_stairs" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_stairs_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_stairs_from_conversion.json deleted file mode 100644 index d3b9adb77..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_stairs_from_conversion.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_stairs", - "invert": false - }, - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_stairs", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "tag": "copycats:copycat_stairs" - } - ], - "result": { - "item": "copycats:copycat_vertical_stairs" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_step.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_step.json deleted file mode 100644 index b2f5a7c11..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_step.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_step", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 4, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_vertical_step" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_step_from_conversion.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_step_from_conversion.json deleted file mode 100644 index 2b1cf156b..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_vertical_step_from_conversion.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_vertical_step", - "invert": false - } - ], - "recipe": { - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "create:copycat_step" - } - ], - "result": { - "item": "copycats:copycat_vertical_step" - } - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_wall.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_wall.json deleted file mode 100644 index ce171cd2f..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_wall.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_wall", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 1, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_wall" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_wooden_button.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_wooden_button.json deleted file mode 100644 index ddcdfc82a..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_wooden_button.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_wooden_button", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 4, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_wooden_button" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_wooden_pressure_plate.json b/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_wooden_pressure_plate.json deleted file mode 100644 index 170e12c96..000000000 --- a/forge/src/generated/resources/data/copycats/recipes/crafting/copycat_wooden_pressure_plate.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:conditional", - "recipes": [ - { - "conditions": [ - { - "type": "copycats:feature_enabled", - "feature": "copycats:copycat_wooden_pressure_plate", - "invert": false - } - ], - "recipe": { - "type": "minecraft:stonecutting", - "count": 4, - "ingredient": { - "tag": "forge:ingots/zinc" - }, - "result": "copycats:copycat_wooden_pressure_plate" - } - } - ] -} \ No newline at end of file diff --git a/forge/src/main/java/com/copycatsplus/copycats/config/forge/SyncConfigBaseImpl.java b/forge/src/main/java/com/copycatsplus/copycats/config/forge/SyncConfigBaseImpl.java deleted file mode 100644 index e5839a299..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/config/forge/SyncConfigBaseImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.copycatsplus.copycats.config.forge; - -import com.copycatsplus.copycats.Copycats; -import com.copycatsplus.copycats.config.SyncConfigBase; -import com.copycatsplus.copycats.network.CCPackets; -import com.copycatsplus.copycats.network.ConfigSyncPacket; -import net.minecraft.server.level.ServerPlayer; -import net.minecraftforge.event.entity.player.PlayerEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.server.ServerLifecycleHooks; - -@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) -public abstract class SyncConfigBaseImpl extends SyncConfigBase { - - @SubscribeEvent - public void playerJoin(PlayerEvent.PlayerLoggedInEvent event) { - syncToPlayer((ServerPlayer) event.getEntity()); - } - - public void syncToPlayer(ServerPlayer player) { - if (player == null) return; - CCPackets.PACKETS.sendTo(player, new ConfigSyncPacket(getSyncConfig(), type())); - Copycats.LOGGER.debug("Sync Config: Sending server config to " + player.getName().getString()); - } - - public static void syncToAllPlayers() { - if (ServerLifecycleHooks.getCurrentServer() == null) { - Copycats.LOGGER.debug("Sync Config: Config sync skipped due to null server"); - return; - } - Copycats.LOGGER.debug("Sync Config: Sending server config to all players on reload"); - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/datagen/forge/CCDatagenImpl.java b/forge/src/main/java/com/copycatsplus/copycats/datagen/forge/CCDatagenImpl.java deleted file mode 100644 index 08cf908d8..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/datagen/forge/CCDatagenImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.copycatsplus.copycats.datagen.forge; - -import com.copycatsplus.copycats.Copycats; -import com.copycatsplus.copycats.datagen.CCDatagen; -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 java.util.concurrent.CompletableFuture; - -public class CCDatagenImpl extends CCDatagen { - - public static void gatherData(GatherDataEvent event) { - addExtraRegistrateData(); - - DataGenerator generator = event.getGenerator(); - PackOutput output = generator.getPackOutput(); - CompletableFuture lookupProvider = event.getLookupProvider(); - ExistingFileHelper existingFileHelper = event.getExistingFileHelper(); - - if (event.includeServer()) { - Copycats.gatherData(generator.getVanillaPack(true)); - } - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/CCCraftingConditions.java b/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/CCCraftingConditions.java deleted file mode 100644 index 305b13282..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/CCCraftingConditions.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.copycatsplus.copycats.datagen.recipes.forge; - -import net.minecraftforge.common.crafting.CraftingHelper; - -public class CCCraftingConditions { - - public static void register() { - CraftingHelper.register(FeatureEnabledCondition.Serializer.INSTANCE); - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/FeatureEnabledCondition.java b/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/FeatureEnabledCondition.java deleted file mode 100644 index 6fb9029af..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/FeatureEnabledCondition.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.copycatsplus.copycats.datagen.recipes.forge; - -import com.copycatsplus.copycats.Copycats; -import com.copycatsplus.copycats.config.FeatureToggle; -import com.google.gson.JsonObject; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.GsonHelper; -import net.minecraftforge.common.crafting.conditions.ICondition; -import net.minecraftforge.common.crafting.conditions.IConditionSerializer; - -public class FeatureEnabledCondition implements ICondition { - private static final ResourceLocation NAME = Copycats.asResource("feature_enabled"); - private final ResourceLocation feature; - private final boolean invert; - - public FeatureEnabledCondition(ResourceLocation feature, boolean invert) { - this.feature = feature; - this.invert = invert; - } - - public FeatureEnabledCondition(ResourceLocation feature) { - this(feature, false); - } - - @Override - public ResourceLocation getID() { - return NAME; - } - - @Override - public boolean test(IContext context) { - return FeatureToggle.isEnabled(feature) != invert; - } - - public static class Serializer implements IConditionSerializer { - public static final Serializer INSTANCE = new Serializer(); - - @Override - public void write(JsonObject json, FeatureEnabledCondition value) { - json.addProperty("feature", value.feature.toString()); - json.addProperty("invert", value.invert); - } - - @Override - public FeatureEnabledCondition read(JsonObject json) { - return new FeatureEnabledCondition( - new ResourceLocation(GsonHelper.getAsString(json, "feature")), - GsonHelper.getAsBoolean(json, "invert") - ); - } - - @Override - public ResourceLocation getID() { - return NAME; - } - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/CopycatRegistrateImpl.java b/forge/src/main/java/com/copycatsplus/copycats/forge/CopycatRegistrateImpl.java deleted file mode 100644 index a25e4425b..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/CopycatRegistrateImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.copycatsplus.copycats.forge; - -import com.copycatsplus.copycats.CopycatRegistrate; -import com.copycatsplus.copycats.forge.mixin_interfaces.CreateRegistrateAccessor; -import com.simibubi.create.foundation.data.CreateRegistrate; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraftforge.registries.RegistryObject; - -public class CopycatRegistrateImpl extends CopycatRegistrate { - - protected CopycatRegistrateImpl(String modid) { - super(modid); - } - - - public static CreateRegistrate setTab(Tab tab) { - ((CreateRegistrateAccessor) getInstance()).copycats$setCreativeTab((RegistryObject) tab); - return getInstance(); - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/CopycatsClientImpl.java b/forge/src/main/java/com/copycatsplus/copycats/forge/CopycatsClientImpl.java deleted file mode 100644 index 6dfa453eb..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/CopycatsClientImpl.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.copycatsplus.copycats.forge; - -import com.copycatsplus.copycats.CopycatsClient; - -public class CopycatsClientImpl { - - public static void init() { - CopycatsClient.init(); - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/CopycatsImpl.java b/forge/src/main/java/com/copycatsplus/copycats/forge/CopycatsImpl.java deleted file mode 100644 index e56df69aa..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/CopycatsImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.copycatsplus.copycats.forge; - -import com.copycatsplus.copycats.Copycats; -import com.copycatsplus.copycats.compat.Mods; -import com.copycatsplus.copycats.compat.forge.AdditionalPlacementsCompatForge; -import com.copycatsplus.copycats.datagen.forge.CCDatagenImpl; -import com.copycatsplus.copycats.datagen.recipes.forge.CCCraftingConditions; -import com.copycatsplus.copycats.foundation.copycat.CopycatMaterialStore; -import com.copycatsplus.copycats.utility.LogicalSidedProvider; -import com.copycatsplus.copycats.utility.Platform; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.level.ChunkEvent; -import net.minecraftforge.event.level.LevelEvent; -import net.minecraftforge.event.server.ServerStartingEvent; -import net.minecraftforge.eventbus.api.EventPriority; -import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; - -@Mod(Copycats.MODID) -public class CopycatsImpl { - - static IEventBus bus; - - public CopycatsImpl() { - bus = FMLJavaModLoadingContext.get().getModEventBus(); - Copycats.init(); - CCCreativeTabsImpl.register(CopycatsImpl.bus); - - CCCraftingConditions.register(); - MinecraftForge.EVENT_BUS.addListener(this::serverStarting); - MinecraftForge.EVENT_BUS.addListener(CopycatsImpl::onChunkUnload); - MinecraftForge.EVENT_BUS.addListener(CopycatsImpl::onLevelUnload); - - Platform.Environment.CLIENT.runIfCurrent(() -> CopycatsClientImpl::init); - bus.addListener(EventPriority.LOWEST, CCDatagenImpl::gatherData); - Mods.ADDITIONAL_PLACEMENTS.executeIfInstalled(() -> AdditionalPlacementsCompatForge::register); - } - - private void serverStarting(ServerStartingEvent event) { - LogicalSidedProvider.setServer(event::getServer); - } - - public static void finalizeRegistrate() { - Copycats.getRegistrate().registerEventListeners(FMLJavaModLoadingContext.get().getModEventBus()); - } - - static void onChunkUnload(ChunkEvent.Unload event) { - CopycatMaterialStore.unloadChunk(event.getLevel(), event.getChunk().getPos()); - } - - static void onLevelUnload(LevelEvent.Unload event) { - CopycatMaterialStore.unloadLevel(event.getLevel()); - } -} \ No newline at end of file diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/compat/registrate/CreateRegistrateMixin.java b/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/compat/registrate/CreateRegistrateMixin.java deleted file mode 100644 index 9493aa57c..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/compat/registrate/CreateRegistrateMixin.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.copycatsplus.copycats.forge.mixin.compat.registrate; - -import com.copycatsplus.copycats.forge.mixin_interfaces.CreateRegistrateAccessor; -import com.simibubi.create.foundation.data.CreateRegistrate; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraftforge.registries.RegistryObject; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; - -/** - * Allow setting the creative tab during registration. - */ -@Mixin(CreateRegistrate.class) -public class CreateRegistrateMixin implements CreateRegistrateAccessor { - @Shadow protected RegistryObject currentTab; - - @Override - public void copycats$setCreativeTab(RegistryObject tab) { - currentTab = tab; - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/network/ClientPacketListenerMixin.java b/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/network/ClientPacketListenerMixin.java deleted file mode 100644 index addf42339..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/network/ClientPacketListenerMixin.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.copycatsplus.copycats.forge.mixin.network; - -import com.copycatsplus.copycats.network.PacketSystem; -import com.copycatsplus.copycats.network.forge.PacketSystemImpl; -import net.minecraft.client.Minecraft; -import net.minecraft.client.multiplayer.ClientPacketListener; -import net.minecraft.network.protocol.game.ClientboundCustomPayloadPacket; -import net.minecraft.resources.ResourceLocation; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -/** - * Handle custom server-to-client packets using our network utils. - */ -@Mixin(ClientPacketListener.class) -public class ClientPacketListenerMixin { - @Shadow - @Final - private Minecraft minecraft; - - @Inject( - method = "handleCustomPayload", - at = @At( - value = "INVOKE", - target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", - remap = false - ), - cancellable = true - ) - private void copycats$handleS2C(ClientboundCustomPayloadPacket packet, CallbackInfo ci) { - ResourceLocation id = packet.getIdentifier(); - PacketSystem handler = PacketSystemImpl.HANDLERS.get(id); - if (handler != null) { - handler.handleS2CPacket(minecraft, packet.getData()); - ci.cancel(); - } - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/network/ServerGamePacketListenerImplMixin.java b/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/network/ServerGamePacketListenerImplMixin.java deleted file mode 100644 index 5c02419f2..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/network/ServerGamePacketListenerImplMixin.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.copycatsplus.copycats.forge.mixin.network; - -import com.copycatsplus.copycats.network.PacketSystem; -import com.copycatsplus.copycats.network.forge.PacketSystemImpl; -import net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.server.network.ServerGamePacketListenerImpl; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -/** - * Handle custom client-to-server packets using our network utils. - */ -@Mixin(ServerGamePacketListenerImpl.class) -public class ServerGamePacketListenerImplMixin { - @Shadow - public ServerPlayer player; - - @Inject( - method = "handleCustomPayload", - at = @At( - value = "INVOKE", - target = "Lnet/minecraftforge/network/NetworkHooks;onCustomPayload(Lnet/minecraftforge/network/ICustomPacket;Lnet/minecraft/network/Connection;)Z", - remap = false // forge method + names are moj - ), - cancellable = true - ) - private void copycats$handleC2S(ServerboundCustomPayloadPacket packet, CallbackInfo ci) { - ResourceLocation id = packet.getIdentifier(); - PacketSystem handler = PacketSystemImpl.HANDLERS.get(id); - if (handler != null) { - handler.handleC2SPacket(player, packet.getData()); - ci.cancel(); - } - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin_interfaces/CreateRegistrateAccessor.java b/forge/src/main/java/com/copycatsplus/copycats/forge/mixin_interfaces/CreateRegistrateAccessor.java deleted file mode 100644 index 3f1175186..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin_interfaces/CreateRegistrateAccessor.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.copycatsplus.copycats.forge.mixin_interfaces; - -import net.minecraft.world.item.CreativeModeTab; -import net.minecraftforge.registries.RegistryObject; - -public interface CreateRegistrateAccessor { - - void copycats$setCreativeTab(RegistryObject tab); -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/forge/KineticCopycatRendererImpl.java b/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/forge/KineticCopycatRendererImpl.java deleted file mode 100644 index e3c41005b..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/forge/KineticCopycatRendererImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.copycatsplus.copycats.foundation.copycat.model.kinetic.forge; - -import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; -import com.copycatsplus.copycats.foundation.copycat.model.kinetic.WrappedRenderWorld; -import com.copycatsplus.copycats.utility.forge.ModelDataUtils; -import com.jozufozu.flywheel.core.model.ModelUtil; -import com.jozufozu.flywheel.core.model.ShadeSeparatedBufferedData; -import com.mojang.blaze3d.vertex.PoseStack; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.client.model.data.ModelData; - -public class KineticCopycatRendererImpl { - - public static ShadeSeparatedBufferedData getCopycatBuffer(BakedModel model, ICopycatBlockEntity be, PoseStack ms) { - WrappedRenderWorld renderWorld = new WrappedRenderWorld(be); - ModelData blockEntityData = ModelDataUtils.mergeData( - ((BlockEntity) be).getModelData(), - ModelUtil.VIRTUAL_DATA - ).build(); - ModelData renderData = model.getModelData(renderWorld, be.getBlockPos(), be.getBlockState(), blockEntityData); - ModelData.Builder builder = ModelData.builder(); - ModelDataUtils.copyModelData(renderData, builder); - builder.with(ModelUtil.VIRTUAL_PROPERTY, true); - - return new BakedModelWithDataBuilder(model) - .withRenderWorld(renderWorld) - .withRenderPos(be.getBlockPos()) - .withReferenceState(be.getBlockState()) - .withPoseStack(ms) - .withData(builder.build()) - .build(); - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/network/forge/PacketSystemImpl.java b/forge/src/main/java/com/copycatsplus/copycats/network/forge/PacketSystemImpl.java deleted file mode 100644 index 9b6b556ff..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/network/forge/PacketSystemImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.copycatsplus.copycats.network.forge; - -import com.copycatsplus.copycats.Copycats; -import com.copycatsplus.copycats.network.PacketSystem; -import com.copycatsplus.copycats.network.PlayerSelection; -import com.simibubi.create.AllPackets; -import com.simibubi.create.foundation.networking.SimplePacketBase; -import it.unimi.dsi.fastutil.objects.Object2IntMap; -import net.minecraft.client.Minecraft; -import net.minecraft.client.multiplayer.ClientPacketListener; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.network.PacketDistributor; -import org.jetbrains.annotations.ApiStatus.Internal; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Function; - -public class PacketSystemImpl extends PacketSystem { - public static final Map HANDLERS = new HashMap<>(); - - protected PacketSystemImpl(String id, int version, - List> s2cPackets, - Object2IntMap> s2cTypes, - List> c2sPackets, - Object2IntMap> c2sTypes) { - super(id, version, s2cPackets, s2cTypes, c2sPackets, c2sTypes); - } - - @Override - @OnlyIn(Dist.CLIENT) - public void registerS2CListener() { - HANDLERS.put(s2cPacket, this); - } - - @Override - public void registerC2SListener() { - HANDLERS.put(c2sPacket, this); - } - - @Override - @OnlyIn(Dist.CLIENT) - public void send(SimplePacketBase packet) { - AllPackets.getChannel().sendToServer(packet); - } - - @Override - public void sendTo(ServerPlayer player, SimplePacketBase packet) { - AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> player), packet); - } - - @Override - public void sendTo(PlayerSelection selection, SimplePacketBase packet) { - AllPackets.getChannel().send(((PlayerSelectionImpl) selection).target, packet); - } - - @Override - protected void doSendC2S(FriendlyByteBuf buf) { - ClientPacketListener connection = Minecraft.getInstance().getConnection(); - if (connection != null) { - connection.send(new ServerboundCustomPayloadPacket(c2sPacket, buf)); - } else { - Copycats.LOGGER.error("Cannot send a C2S packet before the client connection exists, skipping!"); - } - } - - @Internal - public static PacketSystem create(String id, int version, - List> s2cPackets, - Object2IntMap> s2cTypes, - List> c2sPackets, - Object2IntMap> c2sTypes) { - return new PacketSystemImpl(id, version, s2cPackets, s2cTypes, c2sPackets, c2sTypes); - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/network/forge/PlayerSelectionImpl.java b/forge/src/main/java/com/copycatsplus/copycats/network/forge/PlayerSelectionImpl.java deleted file mode 100644 index 164f36798..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/network/forge/PlayerSelectionImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.copycatsplus.copycats.network.forge; - -import com.copycatsplus.copycats.network.PlayerSelection; -import net.minecraft.core.BlockPos; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.protocol.Packet; -import net.minecraft.network.protocol.game.ClientboundCustomPayloadPacket; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.chunk.LevelChunk; -import net.minecraftforge.network.NetworkDirection; -import net.minecraftforge.network.PacketDistributor; -import net.minecraftforge.network.PacketDistributor.PacketTarget; -import net.minecraftforge.server.ServerLifecycleHooks; - -import java.util.function.Consumer; -import java.util.function.Predicate; -import java.util.function.Supplier; - -public class PlayerSelectionImpl extends PlayerSelection { - - private static Consumer> playerListAllWith(final PacketDistributor> distributor, - final Supplier> predicateSupplier) { - return p -> { - Predicate predicate = predicateSupplier.get(); - for (ServerPlayer player : ServerLifecycleHooks.getCurrentServer().getPlayerList().getPlayers()) { - if (predicate.test(player)) { - player.connection.send(p); - } - } - }; - } - - - private static final PacketDistributor> ALL_WITH = - new PacketDistributor<>(PlayerSelectionImpl::playerListAllWith, NetworkDirection.PLAY_TO_CLIENT); - - final PacketTarget target; - - private PlayerSelectionImpl(PacketTarget target) { - this.target = target; - } - - @Override - public void accept(ResourceLocation id, FriendlyByteBuf buffer) { - ClientboundCustomPayloadPacket packet = new ClientboundCustomPayloadPacket(id, buffer); - target.send(packet); - } - - public static PlayerSelection all() { - return new PlayerSelectionImpl(PacketDistributor.ALL.noArg()); - } - - public static PlayerSelection allWith(Predicate condition) { - return new PlayerSelectionImpl(ALL_WITH.with(() -> condition)); - } - - public static PlayerSelection of(ServerPlayer player) { - return new PlayerSelectionImpl(PacketDistributor.PLAYER.with(() -> player)); - } - - public static PlayerSelection tracking(BlockEntity be) { - LevelChunk chunk = be.getLevel().getChunkAt(be.getBlockPos()); - return new PlayerSelectionImpl(PacketDistributor.TRACKING_CHUNK.with(() -> chunk)); - } - - public static PlayerSelection tracking(ServerLevel level, BlockPos pos) { - LevelChunk chunk = level.getChunkAt(pos); - return new PlayerSelectionImpl(PacketDistributor.TRACKING_CHUNK.with(() -> chunk)); - } - - public static PlayerSelection trackingAndSelf(ServerPlayer player) { - return new PlayerSelectionImpl(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> player)); - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/ItemUtilsImpl.java b/forge/src/main/java/com/copycatsplus/copycats/utility/forge/ItemUtilsImpl.java deleted file mode 100644 index f287723ad..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/ItemUtilsImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.copycatsplus.copycats.utility.forge; - -import net.minecraft.nbt.Tag; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemHandlerHelper; - -public class ItemUtilsImpl { - - public static ItemStack copyStackWithSize(ItemStack itemStack, int size) { - return ItemHandlerHelper.copyStackWithSize(itemStack, size); - } - - public static Tag serializeNBT(ItemStack stack) { - return stack.serializeNBT(); - } -} diff --git a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/NBTUtilsImpl.java b/forge/src/main/java/com/copycatsplus/copycats/utility/forge/NBTUtilsImpl.java deleted file mode 100644 index 11505caed..000000000 --- a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/NBTUtilsImpl.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.copycatsplus.copycats.utility.forge; - -import net.minecraft.nbt.CompoundTag; -import net.minecraft.world.item.ItemStack; - -public class NBTUtilsImpl { - - public static CompoundTag serializeStack(ItemStack stack) { - return stack.serializeNBT(); - } -} diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml deleted file mode 100644 index c044ab928..000000000 --- a/forge/src/main/resources/META-INF/mods.toml +++ /dev/null @@ -1,33 +0,0 @@ -modLoader="javafml" -loaderVersion="[47,)" -license="All Rights Reserved" -issueTrackerURL="https://github.com/copycats-plus/copycats/issues" -[[mods]] - modId="copycats" - version="${version}" - displayName="${mod_name}" - updateJSONURL="https://raw.githubusercontent.com/copycats-plus/copycats/multiloader/update.json" - displayURL="https://github.com/copycats-plus/copycats" - logoFile="copycats_icon.png" - credits="The Create: Addon Hub Discord" - authors="${mod_authors}" - description='''${mod_description}''' - -[[dependencies.copycats]] - modId="forge" - mandatory=true - versionRange="[47,)" - ordering="NONE" - side="BOTH" -[[dependencies.copycats]] - modId="minecraft" - mandatory=true - versionRange="[1.20.1,1.21)" - ordering="NONE" - side="BOTH" -[[dependencies.copycats]] - modId="create" - mandatory=true - versionRange="${create_forge_range}" - ordering="NONE" - side="BOTH" diff --git a/gradle.properties b/gradle.properties index 4b34e260e..7eb5783f7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,53 +10,63 @@ mod_authors=Lysine, Bennyboy1695, Redcat_XVIII mod_description=All the copycats you've ever wanted, combined into a single mod! mod_name=Create: Copycats+ mod_license=All Rights Reserved +mod_credits=The Create: Addon Hub Discord +mod_issues=https://github.com/copycats-plus/copycats/issues +mod_url=https://github.com/copycats-plus/copycats #Minecraft and Mappings -minecraft_version=1.20.1 -parchment_version=2023.09.03 +minecraft_version=1.21.1 +minecraft_version_range=[1.21.1,1.22) +parchment_version=2024.11.17 #Mod Loaders -enabled_platforms=fabric,forge +enabled_platforms=fabric,neoforge + fabric_loader_version=0.16.10 -fabric_api_version=0.92.3+1.20.1 -forge_version=1.20.1-47.2.20 +fabric_api_version=0.115.4+1.21.1 + +neoforge_version=21.1.129 +neoforge_version_range=[21,) +neoforge_loader_version_range=[1,) #Common Properties #One boolean for both fabric and forge doDryRun=false -mixin_extras_version=0.3.2 -jei_common_version=15.20.0.106 -embeddium_curse_id=5522040 +mixin_extras_version=0.4.1 +jei_common_version=19.21.0.247 +emi_common_version=1.1.22 +sodium_curse_id=6382651 diagonal_mods_version=8.0.5 +ponder_version=1.0.46 -#Forge Properties -create_forge_version=0.5.1.j-55 -create_forge_range=[0.5.1.d,) -registrate_forge_version=MC1.20-1.3.3 -flywheel_forge_minecraft_version=1.20.1 -flywheel_forge_version=0.6.11-13 +#NeoForge Properties +create_neoforge_version=6.0.4-55 +create_neoforge_range=[6.0.0,) +registrate_neoforge_version=MC1.21-1.3.0+62 +flywheel_neoforge_minecraft_version=1.21.1 +flywheel_neoforge_version=1.0.1 # JEI 10+ seems to have issues on Forge, so the versions must be different for now. # 1.19 edit: no version < 11 exists, so use that -jei_forge_version=15.20.0.106 -embeddium_forge_curse_id=5681725 -additionalplacements_forge_curse_id=6057797 -double_slabs_forge_curse_id=3873442 -jade_forge_curse_id=5390389 -athena_forge_curse_id=5176879 -tfmg_forge_curse_id=5505872 -extended_cogwheels_forge_curse_id=5229925 -spark_forge_curse_id=4738952 -moonlight_curse_forge_id=5975794 -vertical_slabs_curse_forge_id=5691543 +jei_neoforge_version=19.21.0.247 +sodium_neoforge_curse_id=6382651 +additionalplacements_neoforge_curse_id=6057797 +double_slabs_neoforge_curse_id=3873442 +jade_neoforge_curse_id=5390389 +athena_neoforge_curse_id=5629395 +tfmg_neoforge_curse_id=5505872 +extended_cogwheels_neoforge_curse_id=5229925 +spark_neoforge_curse_id=4738952 +moonlight_curse_neoforge_id=5975794 +vertical_slabs_curse_neoforge_id=5691543 #Fabric Properties -create_fabric_version=0.5.1-j-build.1631+mc1.20.1 -create_fabric_range=>=0.5.1-d-build.1161 +create_fabric_version=6.0.0.0+mc1.20.1-build.1653 +create_fabric_range=>=6.0.0 # JEI - https://www.curseforge.com/minecraft/mc-mods/jei/files -jei_fabric_version=15.20.0.106 +jei_fabric_version=19.21.0.247 config_port_version=8.0.0 continuity_curse_version=5962874 jade_fabric_curse_id=5339230 -athena_fabric_curse_id=5176880 +athena_fabric_curse_id=5629396 indium_fabric_curse_id=5493195 sodium_fabric_version=mc1.20.1-0.5.11 extended_cogwheels_fabric_version=2.1.1-1.20.1-0.5.1.f-fabric diff --git a/neoforge/build.gradle b/neoforge/build.gradle new file mode 100644 index 000000000..680d62128 --- /dev/null +++ b/neoforge/build.gradle @@ -0,0 +1,215 @@ +plugins { + id "com.github.johnrengelman.shadow" version "7.1.2" + id 'me.modmuss50.mod-publish-plugin' version "0.5.1" +} + +useRenderDoc = useRenderDoc.toBoolean() & !ext.ci +def renderdocPath = (project.findProperty('renderdocDir') ?: "C:/Program Files/RenderDoc").toString() +def renderdocCmdExe = new File(renderdocPath, "renderdoccmd.exe") +if (useRenderDoc && !renderdocCmdExe.exists()) { + throw new GradleException("RenderDoc not found at ${renderdocCmdExe} — please set -PrenderdocDir correctly") +} + +loom { + var common = project(":common") + accessWidenerPath = common.loom.accessWidenerPath + runs { + client { + vmArg "-XX:+AllowEnhancedClassRedefinition" + programArgs "--username=Dev" + if (useRenderDoc) { + var renderDocDLL = new File(renderdocPath, "renderdoc.dll").toPath().toAbsolutePath() + vmArg("-Dneoforge.rendernurse.renderdoc.library=${renderDocDLL.toString()}") + } + } + server { + vmArg "-XX:+AllowEnhancedClassRedefinition" + } + data { + data() + name "Data Generation" + programArgs "--all", "--mod", "copycats" + programArgs "--output", file("src/generated/resources").absolutePath + programArgs "--existing", project(":common").file("src/main/resources").absolutePath + programArgs "--existing-mod", "create" + } + } + +} +architectury { + platformSetupLoomIde() + neoForge() +} + + +configurations { + common + shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files. + compileClasspath.extendsFrom common + runtimeClasspath.extendsFrom common + developmentNeoForge.extendsFrom common +} + +dependencies { + neoForge "net.neoforged:neoforge:${neoforge_version}" + + // Create and its dependencies + modImplementation("com.simibubi.create:create-${minecraft_version}:${create_neoforge_version}:slim") { transitive = false } + modImplementation("com.tterrag.registrate:Registrate:${registrate_neoforge_version}") + modImplementation("dev.engine-room.flywheel:flywheel-neoforge-${minecraft_version}:${flywheel_neoforge_version}") + compileOnly("dev.engine-room.flywheel:flywheel-neoforge-api-${minecraft_version}:${flywheel_neoforge_version}") + modImplementation("net.createmod.ponder:Ponder-NeoForge-${minecraft_version}:${ponder_version}") + + modLocalRuntime("curse.maven:jade-324717:${jade_neoforge_curse_id}") + modLocalRuntime("mezz.jei:jei-${minecraft_version}-neoforge:${jei_neoforge_version}") + +/* modLocalRuntime("curse.maven:sodium-394468:${sodium_neoforge_curse_id}") + modLocalRuntime("curse.maven:forgified-fabric-api-889079:6370322")// Needed for sodium*/ + modImplementation("curse.maven:additional-placements-674852:${additionalplacements_neoforge_curse_id}") + modImplementation("curse.maven:athena-841890:${athena_neoforge_curse_id}") + // modLocalRuntime("curse.maven:create-industry-693815:${tfmg_forge_curse_id}") + // modLocalRuntime("curse.maven:starlight-forge-526854:4631193") // starlight is obsolete and causes crashes with Create contraptions +// modLocalRuntime("curse.maven:create-extended-cogs-739973:${extended_cogwheels_forge_curse_id}") + + modCompileOnly("curse.maven:double-slabs-350179:${double_slabs_neoforge_curse_id}") + modLocalRuntime("curse.maven:spark-361579:${spark_neoforge_curse_id}") + modCompileOnly("curse.maven:selene-499980:${moonlight_curse_neoforge_id}") + modCompileOnly("curse.maven:vertical-slabs-compat-724387:${vertical_slabs_curse_neoforge_id}") + + if (useRenderDoc) { + localRuntime("net.neoforged.rendernurse:RenderNurse:0.0.9") + } + +// compileOnly("io.github.llamalad7:mixinextras-common:${mixin_extras_version}") +// annotationProcessor(implementation(include("io.github.llamalad7:mixinextras-forge:${mixin_extras_version}"))) + + common(project(path: ":common", configuration: "namedElements")) { transitive false } + shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive false } +} + +processResources { + inputs.property "version", project.version + + filesMatching("META-INF/neoforge.mods.toml") { + expand "version": project.version + } +} + +shadowJar { + exclude "fabric.mod.json" + + configurations = [project.configurations.shadowCommon] + archiveClassifier = "dev-shadow" +} + +remapJar { + atAccessWideners.add("copycats.accesswidener") + inputFile.set(shadowJar.archiveFile) + dependsOn shadowJar + archiveClassifier.set(null) +} + +sourceSets { + main { + resources.srcDir 'src/generated/resources' + } +} + +jar { + archiveClassifier.set("dev") +} + +sourcesJar { + def commonSources = project(":common").sourcesJar + dependsOn commonSources + from commonSources.archiveFile.map { zipTree(it) } +} + +components.java { + withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { + skip() + } +} + +tasks.publishMods.dependsOn(tasks.assemble) +tasks.publishMods.mustRunAfter(tasks.build) + +publishMods { + changelog = "Check out the detailed changelog at https://github.com/copycats-plus/copycats/blob/multiloader/CHANGELOG.md" + type = STABLE + file = tasks.remapJar.archiveFile + displayName = file.map { it.asFile.name.substring(0, it.asFile.name.lastIndexOf('.')) } + modLoaders.add("neoforge") + + modrinth { + accessToken = project.findProperty("MODRINTH_TOKEN") + projectId = "UT2M39wf" + minecraftVersions.add(minecraft_version) + + requires { + id = "LNytGWDc" + } + optional { + id = "u6dRKJwZ" + } + } + + curseforge { + accessToken = project.findProperty("CURSEFORGE_TOKEN") + projectId = "968398" + minecraftVersions.add(minecraft_version) + } + + dryRun = Boolean.parseBoolean(doDryRun) +} + +tasks.register('runClientWithRenderDoc', Exec) { + group = 'application' + description = 'Runs the Minecraft client through RenderDoc' + + // Explicitly depend on runClient + dependsOn tasks.named('runClient') + + doFirst { + // Get the task to gather all properties + def baseRunClient = tasks.named('runClient').get() + + // Retrieve the executable path for Java from the runClient task + def javaExe = baseRunClient.javaLauncher.get().executablePath.asFile.absolutePath + + // Construct the command to run RenderDoc + def cmd = [ + renderdocCmdExe.absolutePath, + 'capture', + '--opt-hook-children', + '--wait-for-exit', + '--working-dir', baseRunClient.workingDir, // Use the same working directory as the game + javaExe + ] + + // Add all system properties from runClient + baseRunClient.systemProperties.each { key, value -> + cmd.add("-D${key}=${value}") + } + + // Add JVM args from runClient + cmd.addAll(baseRunClient.jvmArgs) + + // Add classpath and main class from runClient + cmd.addAll([ + '-cp', baseRunClient.classpath.asPath, + baseRunClient.mainClass.get() + ]) + + // Add program arguments from runClient + cmd.addAll(baseRunClient.args) + + // Log the final command for debugging purposes + println("Launching with command: ${cmd.join(' ')}") + + // Set the command to be executed and the working directory + commandLine cmd + workingDir baseRunClient.workingDir // Set working directory same as runClient + environment baseRunClient.environment + } +} \ No newline at end of file diff --git a/neoforge/gradle.properties b/neoforge/gradle.properties new file mode 100644 index 000000000..7ef88d9cd --- /dev/null +++ b/neoforge/gradle.properties @@ -0,0 +1,2 @@ +loom.platform=neoforge +useRenderDoc=true \ No newline at end of file diff --git a/forge/lib/.gitkeep b/neoforge/lib/.gitkeep similarity index 100% rename from forge/lib/.gitkeep rename to neoforge/lib/.gitkeep diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_base.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_base.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_base.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_base.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_beam.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_beam.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_beam.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_beam.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_block.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_block.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_block.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_block.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_board.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_board.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_board.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_board.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_byte.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_byte.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_byte.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_byte.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_byte_panel.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_byte_panel.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_byte_panel.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_byte_panel.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_cogwheel.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_cogwheel.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_cogwheel.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_cogwheel.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_corner_slice.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_corner_slice.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_corner_slice.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_corner_slice.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_door.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_door.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_door.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_door.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_fence.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_fence.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_fence.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_fence.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_fence_gate.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_fence_gate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_fence_gate.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_fence_gate.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_flat_pane.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_flat_pane.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_flat_pane.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_flat_pane.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_fluid_pipe.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_fluid_pipe.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_fluid_pipe.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_fluid_pipe.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_folding_door.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_folding_door.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_folding_door.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_folding_door.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_ghost_block.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_ghost_block.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_ghost_block.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_ghost_block.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_glass_fluid_pipe.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_glass_fluid_pipe.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_glass_fluid_pipe.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_glass_fluid_pipe.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_half_layer.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_half_layer.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_half_layer.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_half_layer.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_half_panel.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_half_panel.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_half_panel.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_half_panel.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_heavy_weighted_pressure_plate.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_heavy_weighted_pressure_plate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_heavy_weighted_pressure_plate.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_heavy_weighted_pressure_plate.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_iron_door.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_iron_door.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_iron_door.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_iron_door.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_iron_trapdoor.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_iron_trapdoor.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_iron_trapdoor.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_iron_trapdoor.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_ladder.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_ladder.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_ladder.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_ladder.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_large_cogwheel.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_large_cogwheel.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_large_cogwheel.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_large_cogwheel.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_layer.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_layer.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_layer.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_layer.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_light_weighted_pressure_plate.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_light_weighted_pressure_plate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_light_weighted_pressure_plate.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_light_weighted_pressure_plate.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_pane.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_pane.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_pane.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_pane.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_shaft.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_shaft.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_shaft.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_shaft.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_slab.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_slab.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_slab.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_slab.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_slice.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_slice.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_slice.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_slice.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_sliding_door.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_sliding_door.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_sliding_door.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_sliding_door.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_slope.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_slope.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_slope.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_slope.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_slope_layer.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_slope_layer.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_slope_layer.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_slope_layer.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_stacked_half_layer.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_stacked_half_layer.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_stacked_half_layer.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_stacked_half_layer.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_stairs.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_stairs.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_stairs.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_stairs.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_stone_button.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_stone_button.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_stone_button.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_stone_button.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_stone_pressure_plate.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_stone_pressure_plate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_stone_pressure_plate.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_stone_pressure_plate.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_trapdoor.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_trapdoor.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_trapdoor.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_trapdoor.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_half_layer.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_half_layer.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_half_layer.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_half_layer.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slice.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slice.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slice.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slice.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slope.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slope.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slope.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_slope.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_stairs.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_stairs.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_stairs.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_stairs.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_vertical_step.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_step.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_vertical_step.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_vertical_step.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_wall.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_wall.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_wall.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_wall.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_wooden_button.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_button.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_wooden_button.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_button.json diff --git a/common/src/generated/resources/assets/copycats/blockstates/copycat_wooden_pressure_plate.json b/neoforge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_pressure_plate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/blockstates/copycat_wooden_pressure_plate.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/copycat_wooden_pressure_plate.json diff --git a/forge/src/generated/resources/assets/copycats/blockstates/wrapped_copycat.json b/neoforge/src/generated/resources/assets/copycats/blockstates/wrapped_copycat.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/blockstates/wrapped_copycat.json rename to neoforge/src/generated/resources/assets/copycats/blockstates/wrapped_copycat.json diff --git a/forge/src/generated/resources/assets/copycats/lang/en_ud.json b/neoforge/src/generated/resources/assets/copycats/lang/en_ud.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/lang/en_ud.json rename to neoforge/src/generated/resources/assets/copycats/lang/en_ud.json diff --git a/forge/src/generated/resources/assets/copycats/lang/en_us.json b/neoforge/src/generated/resources/assets/copycats/lang/en_us.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/lang/en_us.json rename to neoforge/src/generated/resources/assets/copycats/lang/en_us.json diff --git a/forge/src/generated/resources/assets/copycats/models/block/copycat_base_0.json b/neoforge/src/generated/resources/assets/copycats/models/block/copycat_base_0.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/block/copycat_base_0.json rename to neoforge/src/generated/resources/assets/copycats/models/block/copycat_base_0.json diff --git a/forge/src/generated/resources/assets/copycats/models/block/copycat_base_1.json b/neoforge/src/generated/resources/assets/copycats/models/block/copycat_base_1.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/block/copycat_base_1.json rename to neoforge/src/generated/resources/assets/copycats/models/block/copycat_base_1.json diff --git a/forge/src/generated/resources/assets/copycats/models/block/copycat_base_2.json b/neoforge/src/generated/resources/assets/copycats/models/block/copycat_base_2.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/block/copycat_base_2.json rename to neoforge/src/generated/resources/assets/copycats/models/block/copycat_base_2.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_beam.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_beam.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_beam.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_beam.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_block.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_block.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_block.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_block.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_board.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_board.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_board.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_board.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_box.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_box.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_box.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_box.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_byte.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_byte.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_byte.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_byte.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_byte_panel.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_byte_panel.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_byte_panel.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_byte_panel.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_catwalk.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_catwalk.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_catwalk.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_catwalk.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_cogwheel.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_cogwheel.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_cogwheel.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_cogwheel.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_corner_slice.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_corner_slice.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_corner_slice.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_corner_slice.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_door.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_door.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_door.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_door.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_fence.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_fence.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_fence.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_fence.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_fence_gate.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_fence_gate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_fence_gate.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_fence_gate.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_flat_pane.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_flat_pane.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_flat_pane.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_flat_pane.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_fluid_pipe.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_fluid_pipe.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_fluid_pipe.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_fluid_pipe.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_folding_door.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_folding_door.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_folding_door.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_folding_door.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_ghost_block.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_ghost_block.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_ghost_block.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_ghost_block.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_half_layer.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_half_layer.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_half_layer.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_half_layer.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_half_panel.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_half_panel.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_half_panel.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_half_panel.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_heavy_weighted_pressure_plate.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_heavy_weighted_pressure_plate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_heavy_weighted_pressure_plate.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_heavy_weighted_pressure_plate.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_iron_door.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_iron_door.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_iron_door.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_iron_door.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_iron_trapdoor.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_iron_trapdoor.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_iron_trapdoor.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_iron_trapdoor.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_ladder.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_ladder.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_ladder.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_ladder.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_large_cogwheel.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_large_cogwheel.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_large_cogwheel.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_large_cogwheel.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_layer.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_layer.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_layer.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_layer.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_light_weighted_pressure_plate.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_light_weighted_pressure_plate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_light_weighted_pressure_plate.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_light_weighted_pressure_plate.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_pane.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_pane.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_pane.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_pane.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_shaft.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_shaft.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_shaft.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_shaft.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_slab.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_slab.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_slab.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_slab.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_slice.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_slice.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_slice.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_slice.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_sliding_door.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_sliding_door.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_sliding_door.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_sliding_door.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_slope.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_slope.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_slope.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_slope.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_slope_layer.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_slope_layer.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_slope_layer.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_slope_layer.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_stacked_half_layer.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_stacked_half_layer.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_stacked_half_layer.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_stacked_half_layer.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_stairs.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_stairs.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_stairs.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_stairs.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_stone_button.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_stone_button.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_stone_button.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_stone_button.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_stone_pressure_plate.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_stone_pressure_plate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_stone_pressure_plate.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_stone_pressure_plate.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_trapdoor.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_trapdoor.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_trapdoor.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_trapdoor.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_half_layer.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_half_layer.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_half_layer.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_half_layer.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_vertical_slice.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_slice.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_vertical_slice.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_slice.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_slope.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_slope.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_slope.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_slope.json diff --git a/forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_stairs.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_stairs.json similarity index 100% rename from forge/src/generated/resources/assets/copycats/models/item/copycat_vertical_stairs.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_stairs.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_vertical_step.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_step.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_vertical_step.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_vertical_step.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_wall.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_wall.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_wall.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_wall.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_wooden_button.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_wooden_button.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_wooden_button.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_wooden_button.json diff --git a/common/src/generated/resources/assets/copycats/models/item/copycat_wooden_pressure_plate.json b/neoforge/src/generated/resources/assets/copycats/models/item/copycat_wooden_pressure_plate.json similarity index 100% rename from common/src/generated/resources/assets/copycats/models/item/copycat_wooden_pressure_plate.json rename to neoforge/src/generated/resources/assets/copycats/models/item/copycat_wooden_pressure_plate.json diff --git a/forge/src/generated/resources/data/forge/tags/blocks/fence_gates.json b/neoforge/src/generated/resources/data/c/tags/block/fence_gates.json similarity index 100% rename from forge/src/generated/resources/data/forge/tags/blocks/fence_gates.json rename to neoforge/src/generated/resources/data/c/tags/block/fence_gates.json diff --git a/forge/src/generated/resources/data/forge/tags/blocks/fences.json b/neoforge/src/generated/resources/data/c/tags/block/fences.json similarity index 100% rename from forge/src/generated/resources/data/forge/tags/blocks/fences.json rename to neoforge/src/generated/resources/data/c/tags/block/fences.json diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_block_from_slabs.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_block_from_slabs.json new file mode 100644 index 000000000..f20fe4449 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_block_from_slabs.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_block", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#copycats:copycat_slab" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_block_from_slabs" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_block_from_slabs" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_box.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_box.json new file mode 100644 index 000000000..3676adc83 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_box.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_box", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#copycats:copycat_board" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_box" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_box" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_catwalk.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_catwalk.json new file mode 100644 index 000000000..94e677f43 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_catwalk.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_catwalk", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#copycats:copycat_board" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_catwalk" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_catwalk" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_cogwheel.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_cogwheel.json new file mode 100644 index 000000000..af8276d3f --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_cogwheel.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_cogwheel", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "create:cogwheel" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_cogwheel" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_cogwheel" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_flat_pane_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_flat_pane_from_conversion.json new file mode 100644 index 000000000..274b4ad1a --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_flat_pane_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_pane", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_flat_pane", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_pane" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_flat_pane_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_flat_pane_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_fluid_pipe.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_fluid_pipe.json new file mode 100644 index 000000000..28fab55e0 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_fluid_pipe.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_fluid_pipe", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "create:fluid_pipe" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_fluid_pipe" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_fluid_pipe" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_folding_door_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_folding_door_from_conversion.json new file mode 100644 index 000000000..4c8df58a1 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_folding_door_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_sliding_door", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_folding_door", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_sliding_door" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_folding_door_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_folding_door_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_half_layer_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_half_layer_from_conversion.json new file mode 100644 index 000000000..500b0f436 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_half_layer_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stacked_half_layer", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_layer", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_stacked_half_layer" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_half_layer_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_half_layer_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_iron_door.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_iron_door.json new file mode 100644 index 000000000..4a30625dd --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_iron_door.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_iron_door", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "minecraft:iron_door" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_iron_door" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_iron_door" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_large_cogwheel.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_large_cogwheel.json new file mode 100644 index 000000000..4316de2d8 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_large_cogwheel.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_large_cogwheel", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "create:large_cogwheel" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_large_cogwheel" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_large_cogwheel" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_layer_from_half_layers.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_layer_from_half_layers.json new file mode 100644 index 000000000..fcdf6f1b5 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_layer_from_half_layers.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_layer", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_half_layer" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_layer_from_half_layers" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_layer_from_half_layers" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_pane_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_pane_from_conversion.json new file mode 100644 index 000000000..e395a465f --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_pane_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_flat_pane", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_pane", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_flat_pane" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_pane_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_pane_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_panel_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_panel_from_conversion.json new file mode 100644 index 000000000..9ac4aab62 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_panel_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_trapdoor", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "create:copycat_panel", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_trapdoor" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_panel_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_panel_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_panel_from_half_panels.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_panel_from_half_panels.json new file mode 100644 index 000000000..8bad7d0e4 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_panel_from_half_panels.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_panel", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_half_panel" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_panel_from_half_panels" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_panel_from_half_panels" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slab_from_beams.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slab_from_beams.json new file mode 100644 index 000000000..657de6b56 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slab_from_beams.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_beam", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#copycats:copycat_beam" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_slab_from_beams" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_slab_from_beams" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slab_from_panels.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slab_from_panels.json new file mode 100644 index 000000000..91ef8162a --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slab_from_panels.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "create:copycat_panel" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_slab_from_panels" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_slab_from_panels" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slab_from_steps.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slab_from_steps.json new file mode 100644 index 000000000..90b44c76e --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slab_from_steps.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "create:copycat_step" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_slab_from_steps" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_slab_from_steps" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slice_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slice_from_conversion.json new file mode 100644 index 000000000..dea75a759 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slice_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slice", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slice", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_vertical_slice" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_slice_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_slice_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_sliding_door_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_sliding_door_from_conversion.json new file mode 100644 index 000000000..5090c752b --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_sliding_door_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_folding_door", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_sliding_door", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_folding_door" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_sliding_door_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_sliding_door_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slope_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slope_from_conversion.json new file mode 100644 index 000000000..bde08def9 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_slope_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slope", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slope", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_vertical_slope" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_slope_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_slope_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_stacked_half_layer_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_stacked_half_layer_from_conversion.json new file mode 100644 index 000000000..69dbd0078 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_stacked_half_layer_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_half_layer", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stacked_half_layer", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_vertical_half_layer" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_stacked_half_layer_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_stacked_half_layer_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_stairs_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_stairs_from_conversion.json new file mode 100644 index 000000000..d18a3972a --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_stairs_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stairs", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_stairs", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_vertical_stairs" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_stairs_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_stairs_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_step_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_step_from_conversion.json new file mode 100644 index 000000000..2921554cc --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_step_from_conversion.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_step", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#copycats:copycat_vertical_step" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_step_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_step_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_trapdoor_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_trapdoor_from_conversion.json new file mode 100644 index 000000000..a2bcb6636 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_trapdoor_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "create:copycat_panel", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_trapdoor", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "create:copycat_panel" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_trapdoor_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_trapdoor_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_half_layer_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_half_layer_from_conversion.json new file mode 100644 index 000000000..1cd915353 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_half_layer_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_layer", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_half_layer", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_half_layer" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_vertical_half_layer_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_vertical_half_layer_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_slice_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_slice_from_conversion.json new file mode 100644 index 000000000..e2251a5f9 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_slice_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slice", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slice", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_slice" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_vertical_slice_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_vertical_slice_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_slope_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_slope_from_conversion.json new file mode 100644 index 000000000..fab1d5472 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_slope_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slope", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slope", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "copycats:copycat_slope" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_vertical_slope_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_vertical_slope_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_stairs_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_stairs_from_conversion.json new file mode 100644 index 000000000..e63e0db00 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_stairs_from_conversion.json @@ -0,0 +1,44 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_stairs", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stairs", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#copycats:copycat_stairs" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_vertical_stairs_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_vertical_stairs_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_step_from_conversion.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_step_from_conversion.json new file mode 100644 index 000000000..4099eb526 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/crafting/copycat_vertical_step_from_conversion.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_step", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "create:copycat_step" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:crafting/copycat_vertical_step_from_conversion" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:crafting/copycat_vertical_step_from_conversion" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_beam.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_beam.json new file mode 100644 index 000000000..79bdb6bcc --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_beam.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_beam", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_beam" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_beam" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_block.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_block.json new file mode 100644 index 000000000..9a0777d6c --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_block.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_block", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_block" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_block" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_board.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_board.json new file mode 100644 index 000000000..64a2e6115 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_board.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_board", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_board" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_board" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_byte.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_byte.json new file mode 100644 index 000000000..82a1e555d --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_byte.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_byte", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_byte" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_byte" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_byte_panel.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_byte_panel.json new file mode 100644 index 000000000..d1b4ccf55 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_byte_panel.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_byte_panel", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_byte_panel" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_byte_panel" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_corner_slice.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_corner_slice.json new file mode 100644 index 000000000..5687709ad --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_corner_slice.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_corner_slice", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_corner_slice" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_corner_slice" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_door.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_door.json new file mode 100644 index 000000000..93cf1b27e --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_door.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_door", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_door" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_door" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_fence.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_fence.json new file mode 100644 index 000000000..20ea31a1e --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_fence.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_fence", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_fence" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_fence" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_fence_gate.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_fence_gate.json new file mode 100644 index 000000000..04bccea49 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_fence_gate.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_fence_gate", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_fence_gate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_fence_gate" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_flat_pane.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_flat_pane.json new file mode 100644 index 000000000..dcfaecf94 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_flat_pane.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_flat_pane", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_flat_pane" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_flat_pane" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_folding_door.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_folding_door.json new file mode 100644 index 000000000..9b1a0d1cc --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_folding_door.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_folding_door", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_folding_door" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_folding_door" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_ghost_block.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_ghost_block.json new file mode 100644 index 000000000..88e267b00 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_ghost_block.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_ghost_block", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_ghost_block" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_ghost_block" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_half_layer.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_half_layer.json new file mode 100644 index 000000000..e02de07b4 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_half_layer.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_layer", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_half_layer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_half_layer" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_half_panel.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_half_panel.json new file mode 100644 index 000000000..19511f659 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_half_panel.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_panel", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_half_panel" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_half_panel" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_heavy_weighted_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_heavy_weighted_pressure_plate.json new file mode 100644 index 000000000..b08ceb0de --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_heavy_weighted_pressure_plate.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_heavy_weighted_pressure_plate", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_heavy_weighted_pressure_plate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_heavy_weighted_pressure_plate" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_iron_trapdoor.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_iron_trapdoor.json new file mode 100644 index 000000000..c39a921e1 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_iron_trapdoor.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_iron_trapdoor", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_iron_trapdoor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_iron_trapdoor" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_ladder.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_ladder.json new file mode 100644 index 000000000..492061e0d --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_ladder.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_ladder", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_ladder" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_ladder" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_layer.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_layer.json new file mode 100644 index 000000000..57d633903 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_layer.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_layer", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_layer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_layer" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_light_weighted_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_light_weighted_pressure_plate.json new file mode 100644 index 000000000..8e7f3d598 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_light_weighted_pressure_plate.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_light_weighted_pressure_plate", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_light_weighted_pressure_plate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_light_weighted_pressure_plate" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_pane.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_pane.json new file mode 100644 index 000000000..d9e43e578 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_pane.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_pane", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_pane" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_pane" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_shaft.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_shaft.json new file mode 100644 index 000000000..bbd484af4 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_shaft.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_shaft", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_shaft" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_shaft" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slab.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slab.json new file mode 100644 index 000000000..9c5d2259e --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slab.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_slab" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_slab" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slice.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slice.json new file mode 100644 index 000000000..f0c24914b --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slice.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slice", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_slice" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_slice" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_sliding_door.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_sliding_door.json new file mode 100644 index 000000000..17243a7ba --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_sliding_door.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_sliding_door", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_sliding_door" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_sliding_door" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slope.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slope.json new file mode 100644 index 000000000..e1ffde554 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slope.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slope", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_slope" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_slope" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slope_layer.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slope_layer.json new file mode 100644 index 000000000..9a4cba9e5 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_slope_layer.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slope_layer", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_slope_layer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_slope_layer" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stacked_half_layer.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stacked_half_layer.json new file mode 100644 index 000000000..482ad331f --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stacked_half_layer.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stacked_half_layer", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_stacked_half_layer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_stacked_half_layer" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stairs.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stairs.json new file mode 100644 index 000000000..75dd29bb0 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stairs.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stairs", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_stairs" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_stairs" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stone_button.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stone_button.json new file mode 100644 index 000000000..7bf74fc8e --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stone_button.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stone_button", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_stone_button" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_stone_button" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stone_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stone_pressure_plate.json new file mode 100644 index 000000000..2e4f5fde7 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_stone_pressure_plate.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stone_pressure_plate", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_stone_pressure_plate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_stone_pressure_plate" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_trapdoor.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_trapdoor.json new file mode 100644 index 000000000..75bb9502e --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_trapdoor.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_trapdoor", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_trapdoor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_trapdoor" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_half_layer.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_half_layer.json new file mode 100644 index 000000000..6b5ce0435 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_half_layer.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_half_layer", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_vertical_half_layer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_vertical_half_layer" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_slice.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_slice.json new file mode 100644 index 000000000..441e24bb9 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_slice.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slice", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_vertical_slice" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_vertical_slice" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_slope.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_slope.json new file mode 100644 index 000000000..8ca4398fe --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_slope.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slope", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_vertical_slope" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_vertical_slope" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_stairs.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_stairs.json new file mode 100644 index 000000000..f27788f05 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_stairs.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_stairs", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_vertical_stairs" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_vertical_stairs" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_step.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_step.json new file mode 100644 index 000000000..4f6ed1b70 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_vertical_step.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_step", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_vertical_step" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_vertical_step" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_wall.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_wall.json new file mode 100644 index 000000000..9ebbc6bd9 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_wall.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_wall", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_wall" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_wall" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_wooden_button.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_wooden_button.json new file mode 100644 index 000000000..697210936 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_wooden_button.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_wooden_button", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_wooden_button" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_wooden_button" + ] + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_wooden_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_wooden_pressure_plate.json new file mode 100644 index 000000000..e3ef6f7df --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/advancement/recipes/misc/stonecutting/copycat_wooden_pressure_plate.json @@ -0,0 +1,39 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_wooden_pressure_plate", + "invert": false + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "#c:ingots/zinc" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "copycats:stonecutting/copycat_wooden_pressure_plate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "copycats:stonecutting/copycat_wooden_pressure_plate" + ] + } +} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_base.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_base.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_base.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_base.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_beam.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_beam.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_beam.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_beam.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_block.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_block.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_block.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_block.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_board.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_board.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_board.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_board.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_byte.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_byte.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_byte.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_byte.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_byte_panel.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_byte_panel.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_byte_panel.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_byte_panel.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_cogwheel.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_cogwheel.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_cogwheel.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_cogwheel.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_corner_slice.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_corner_slice.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_corner_slice.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_corner_slice.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_door.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_door.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_door.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_door.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_fence.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_fence.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_fence.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_fence.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_fence_gate.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_fence_gate.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_fence_gate.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_fence_gate.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_flat_pane.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_flat_pane.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_flat_pane.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_flat_pane.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_fluid_pipe.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_fluid_pipe.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_fluid_pipe.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_fluid_pipe.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_folding_door.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_folding_door.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_folding_door.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_folding_door.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_ghost_block.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_ghost_block.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_ghost_block.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_ghost_block.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_glass_fluid_pipe.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_glass_fluid_pipe.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_glass_fluid_pipe.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_glass_fluid_pipe.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_half_layer.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_half_layer.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_half_layer.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_half_layer.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_half_panel.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_half_panel.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_half_panel.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_half_panel.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_heavy_weighted_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_heavy_weighted_pressure_plate.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_heavy_weighted_pressure_plate.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_heavy_weighted_pressure_plate.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_iron_door.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_iron_door.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_iron_door.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_iron_door.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_iron_trapdoor.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_iron_trapdoor.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_iron_trapdoor.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_iron_trapdoor.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_ladder.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_ladder.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_ladder.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_ladder.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_large_cogwheel.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_large_cogwheel.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_large_cogwheel.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_large_cogwheel.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_layer.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_layer.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_layer.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_layer.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_light_weighted_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_light_weighted_pressure_plate.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_light_weighted_pressure_plate.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_light_weighted_pressure_plate.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_pane.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_pane.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_pane.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_pane.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_shaft.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_shaft.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_shaft.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_shaft.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_slab.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_slab.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_slab.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_slab.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_slice.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_slice.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_slice.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_slice.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_sliding_door.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_sliding_door.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_sliding_door.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_sliding_door.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_slope.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_slope.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_slope.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_slope.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_slope_layer.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_slope_layer.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_slope_layer.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_slope_layer.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_stacked_half_layer.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_stacked_half_layer.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_stacked_half_layer.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_stacked_half_layer.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_stairs.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_stairs.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_stairs.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_stairs.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_stone_button.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_stone_button.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_stone_button.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_stone_button.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_stone_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_stone_pressure_plate.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_stone_pressure_plate.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_stone_pressure_plate.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_trapdoor.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_trapdoor.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_trapdoor.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_trapdoor.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_half_layer.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_half_layer.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_half_layer.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_half_layer.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_slice.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_slice.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_slice.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_slice.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_slope.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_slope.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_slope.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_slope.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_stairs.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_stairs.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_stairs.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_stairs.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_step.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_step.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_vertical_step.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_vertical_step.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_wall.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_wall.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_wall.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_wall.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_wooden_button.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_wooden_button.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_wooden_button.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_wooden_button.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_wooden_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_wooden_pressure_plate.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/copycat_wooden_pressure_plate.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/copycat_wooden_pressure_plate.json diff --git a/forge/src/generated/resources/data/copycats/loot_tables/blocks/wrapped_copycat.json b/neoforge/src/generated/resources/data/copycats/loot_table/blocks/wrapped_copycat.json similarity index 100% rename from forge/src/generated/resources/data/copycats/loot_tables/blocks/wrapped_copycat.json rename to neoforge/src/generated/resources/data/copycats/loot_table/blocks/wrapped_copycat.json diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_block_from_slabs.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_block_from_slabs.json new file mode 100644 index 000000000..f5958a0dd --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_block_from_slabs.json @@ -0,0 +1,29 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_block", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + } + ], + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "s": { + "tag": "copycats:copycat_slab" + } + }, + "pattern": [ + "s", + "s" + ], + "result": { + "count": 1, + "id": "copycats:copycat_block" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_box.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_box.json new file mode 100644 index 000000000..e9dc99349 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_box.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_box", + "invert": false + } + ], + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "s": { + "tag": "copycats:copycat_board" + } + }, + "pattern": [ + "ss ", + "s s", + " ss" + ], + "result": { + "count": 1, + "id": "copycats:copycat_box" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_catwalk.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_catwalk.json new file mode 100644 index 000000000..e34078e7f --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_catwalk.json @@ -0,0 +1,24 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_catwalk", + "invert": false + } + ], + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "s": { + "tag": "copycats:copycat_board" + } + }, + "pattern": [ + "s s", + " s " + ], + "result": { + "count": 1, + "id": "copycats:copycat_catwalk" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_cogwheel.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_cogwheel.json new file mode 100644 index 000000000..f617a1d23 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_cogwheel.json @@ -0,0 +1,32 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_cogwheel", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "create:cogwheel" + }, + { + "item": "create:cogwheel" + }, + { + "item": "create:cogwheel" + }, + { + "item": "create:cogwheel" + }, + { + "item": "create:zinc_ingot" + } + ], + "result": { + "count": 4, + "id": "copycats:copycat_cogwheel" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_flat_pane_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_flat_pane_from_conversion.json new file mode 100644 index 000000000..1b78c93c7 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_flat_pane_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_pane", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_flat_pane", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_pane" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_flat_pane" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_fluid_pipe.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_fluid_pipe.json new file mode 100644 index 000000000..984915ef9 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_fluid_pipe.json @@ -0,0 +1,32 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_fluid_pipe", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "create:fluid_pipe" + }, + { + "item": "create:fluid_pipe" + }, + { + "item": "create:fluid_pipe" + }, + { + "item": "create:fluid_pipe" + }, + { + "item": "create:zinc_ingot" + } + ], + "result": { + "count": 4, + "id": "copycats:copycat_fluid_pipe" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_folding_door_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_folding_door_from_conversion.json new file mode 100644 index 000000000..19aff5aba --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_folding_door_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_sliding_door", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_folding_door", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_sliding_door" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_folding_door" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_half_layer_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_half_layer_from_conversion.json new file mode 100644 index 000000000..e3f4be551 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_half_layer_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stacked_half_layer", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_layer", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_stacked_half_layer" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_half_layer" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_iron_door.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_iron_door.json new file mode 100644 index 000000000..0ce5f6184 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_iron_door.json @@ -0,0 +1,23 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_iron_door", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "minecraft:iron_door" + }, + { + "item": "create:zinc_ingot" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_iron_door" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_large_cogwheel.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_large_cogwheel.json new file mode 100644 index 000000000..3262e43cf --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_large_cogwheel.json @@ -0,0 +1,32 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_large_cogwheel", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "create:large_cogwheel" + }, + { + "item": "create:large_cogwheel" + }, + { + "item": "create:large_cogwheel" + }, + { + "item": "create:large_cogwheel" + }, + { + "item": "create:zinc_ingot" + } + ], + "result": { + "count": 4, + "id": "copycats:copycat_large_cogwheel" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_layer_from_half_layers.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_layer_from_half_layers.json new file mode 100644 index 000000000..6db910173 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_layer_from_half_layers.json @@ -0,0 +1,23 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_layer", + "invert": false + } + ], + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "s": { + "item": "copycats:copycat_half_layer" + } + }, + "pattern": [ + "ss" + ], + "result": { + "count": 1, + "id": "copycats:copycat_layer" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_pane_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_pane_from_conversion.json new file mode 100644 index 000000000..a6125422c --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_pane_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_flat_pane", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_pane", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_flat_pane" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_pane" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_panel_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_panel_from_conversion.json new file mode 100644 index 000000000..fc9f7248e --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_panel_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_trapdoor", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "create:copycat_panel", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_trapdoor" + } + ], + "result": { + "count": 1, + "id": "create:copycat_panel" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_panel_from_half_panels.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_panel_from_half_panels.json new file mode 100644 index 000000000..823a9f6b5 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_panel_from_half_panels.json @@ -0,0 +1,23 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_panel", + "invert": false + } + ], + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "s": { + "item": "copycats:copycat_half_panel" + } + }, + "pattern": [ + "ss" + ], + "result": { + "count": 1, + "id": "create:copycat_panel" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slab_from_beams.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slab_from_beams.json new file mode 100644 index 000000000..e190db576 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slab_from_beams.json @@ -0,0 +1,28 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_beam", + "invert": false + } + ], + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "s": { + "tag": "copycats:copycat_beam" + } + }, + "pattern": [ + "ss" + ], + "result": { + "count": 1, + "id": "copycats:copycat_slab" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slab_from_panels.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slab_from_panels.json new file mode 100644 index 000000000..084416018 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slab_from_panels.json @@ -0,0 +1,24 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + } + ], + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "p": { + "item": "create:copycat_panel" + } + }, + "pattern": [ + "p", + "p" + ], + "result": { + "count": 1, + "id": "copycats:copycat_slab" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slab_from_steps.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slab_from_steps.json new file mode 100644 index 000000000..22104e528 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slab_from_steps.json @@ -0,0 +1,23 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + } + ], + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "s": { + "item": "create:copycat_step" + } + }, + "pattern": [ + "ss" + ], + "result": { + "count": 1, + "id": "copycats:copycat_slab" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slice_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slice_from_conversion.json new file mode 100644 index 000000000..aa1ddc552 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slice_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slice", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slice", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_vertical_slice" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_slice" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_sliding_door_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_sliding_door_from_conversion.json new file mode 100644 index 000000000..95e2ed033 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_sliding_door_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_folding_door", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_sliding_door", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_folding_door" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_sliding_door" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slope_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slope_from_conversion.json new file mode 100644 index 000000000..626caaad0 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_slope_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slope", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slope", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_vertical_slope" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_slope" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_stacked_half_layer_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_stacked_half_layer_from_conversion.json new file mode 100644 index 000000000..bc3b513a4 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_stacked_half_layer_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_half_layer", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stacked_half_layer", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_vertical_half_layer" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_stacked_half_layer" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_stairs_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_stairs_from_conversion.json new file mode 100644 index 000000000..f5b79688e --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_stairs_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stairs", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_stairs", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_vertical_stairs" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_stairs" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_step_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_step_from_conversion.json new file mode 100644 index 000000000..3cd4ca54d --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_step_from_conversion.json @@ -0,0 +1,20 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_step", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "copycats:copycat_vertical_step" + } + ], + "result": { + "count": 1, + "id": "create:copycat_step" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_trapdoor_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_trapdoor_from_conversion.json new file mode 100644 index 000000000..028718b84 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_trapdoor_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "create:copycat_panel", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_trapdoor", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "create:copycat_panel" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_trapdoor" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_half_layer_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_half_layer_from_conversion.json new file mode 100644 index 000000000..4af873bbc --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_half_layer_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_layer", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_half_layer", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_half_layer" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_vertical_half_layer" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_slice_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_slice_from_conversion.json new file mode 100644 index 000000000..f1cf06729 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_slice_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slice", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slice", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_slice" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_vertical_slice" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_slope_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_slope_from_conversion.json new file mode 100644 index 000000000..ddd0e63c1 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_slope_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slope", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slope", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "copycats:copycat_slope" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_vertical_slope" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_stairs_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_stairs_from_conversion.json new file mode 100644 index 000000000..f6611ce1a --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_stairs_from_conversion.json @@ -0,0 +1,25 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_stairs", + "invert": false + }, + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stairs", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "copycats:copycat_stairs" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_vertical_stairs" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_step_from_conversion.json b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_step_from_conversion.json new file mode 100644 index 000000000..b102d2bbe --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/crafting/copycat_vertical_step_from_conversion.json @@ -0,0 +1,20 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_step", + "invert": false + } + ], + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "create:copycat_step" + } + ], + "result": { + "count": 1, + "id": "copycats:copycat_vertical_step" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_beam.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_beam.json new file mode 100644 index 000000000..b9ee98a6b --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_beam.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_beam", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 4, + "id": "copycats:copycat_beam" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_block.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_block.json new file mode 100644 index 000000000..8989d7ec1 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_block.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_block", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_block" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_board.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_board.json new file mode 100644 index 000000000..735e58e16 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_board.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_board", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 8, + "id": "copycats:copycat_board" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_byte.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_byte.json new file mode 100644 index 000000000..ce9d67279 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_byte.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_byte", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 8, + "id": "copycats:copycat_byte" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_byte_panel.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_byte_panel.json new file mode 100644 index 000000000..efdc27f95 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_byte_panel.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_byte_panel", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 16, + "id": "copycats:copycat_byte_panel" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_corner_slice.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_corner_slice.json new file mode 100644 index 000000000..6723a66fe --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_corner_slice.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_corner_slice", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 16, + "id": "copycats:copycat_corner_slice" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_door.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_door.json new file mode 100644 index 000000000..965679763 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_door.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_door", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_door" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_fence.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_fence.json new file mode 100644 index 000000000..64f4b6be7 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_fence.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_fence", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_fence" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_fence_gate.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_fence_gate.json new file mode 100644 index 000000000..e84055393 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_fence_gate.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_fence_gate", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_fence_gate" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_flat_pane.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_flat_pane.json new file mode 100644 index 000000000..140807041 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_flat_pane.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_flat_pane", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 8, + "id": "copycats:copycat_flat_pane" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_folding_door.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_folding_door.json new file mode 100644 index 000000000..8af221136 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_folding_door.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_folding_door", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_folding_door" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_ghost_block.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_ghost_block.json new file mode 100644 index 000000000..aff1dac09 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_ghost_block.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_ghost_block", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_ghost_block" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_half_layer.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_half_layer.json new file mode 100644 index 000000000..e857d5b97 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_half_layer.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_layer", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 16, + "id": "copycats:copycat_half_layer" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_half_panel.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_half_panel.json new file mode 100644 index 000000000..8ce33abea --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_half_panel.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_half_panel", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 8, + "id": "copycats:copycat_half_panel" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_heavy_weighted_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_heavy_weighted_pressure_plate.json new file mode 100644 index 000000000..8c4e9d994 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_heavy_weighted_pressure_plate.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_heavy_weighted_pressure_plate", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 2, + "id": "copycats:copycat_heavy_weighted_pressure_plate" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_iron_trapdoor.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_iron_trapdoor.json new file mode 100644 index 000000000..d828eb855 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_iron_trapdoor.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_iron_trapdoor", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 2, + "id": "copycats:copycat_iron_trapdoor" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_ladder.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_ladder.json new file mode 100644 index 000000000..5b9daee44 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_ladder.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_ladder", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 6, + "id": "copycats:copycat_ladder" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_layer.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_layer.json new file mode 100644 index 000000000..d19d2e7d8 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_layer.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_layer", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 8, + "id": "copycats:copycat_layer" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_light_weighted_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_light_weighted_pressure_plate.json new file mode 100644 index 000000000..0bd532501 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_light_weighted_pressure_plate.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_light_weighted_pressure_plate", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 2, + "id": "copycats:copycat_light_weighted_pressure_plate" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_pane.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_pane.json new file mode 100644 index 000000000..f1637c1ce --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_pane.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_pane", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 8, + "id": "copycats:copycat_pane" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_shaft.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_shaft.json new file mode 100644 index 000000000..c5394eb0a --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_shaft.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_shaft", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 4, + "id": "copycats:copycat_shaft" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slab.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slab.json new file mode 100644 index 000000000..6673e5018 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slab.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slab", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 2, + "id": "copycats:copycat_slab" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slice.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slice.json new file mode 100644 index 000000000..a69362f85 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slice.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slice", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 16, + "id": "copycats:copycat_slice" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_sliding_door.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_sliding_door.json new file mode 100644 index 000000000..6bc61f3a2 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_sliding_door.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_sliding_door", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_sliding_door" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slope.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slope.json new file mode 100644 index 000000000..9d1cc8e0d --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slope.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slope", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 2, + "id": "copycats:copycat_slope" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slope_layer.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slope_layer.json new file mode 100644 index 000000000..02d7326cc --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_slope_layer.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_slope_layer", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 8, + "id": "copycats:copycat_slope_layer" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stacked_half_layer.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stacked_half_layer.json new file mode 100644 index 000000000..c954dca00 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stacked_half_layer.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stacked_half_layer", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 16, + "id": "copycats:copycat_stacked_half_layer" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stairs.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stairs.json new file mode 100644 index 000000000..61a7d4d50 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stairs.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stairs", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_stairs" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stone_button.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stone_button.json new file mode 100644 index 000000000..c22bfa00b --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stone_button.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stone_button", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 4, + "id": "copycats:copycat_stone_button" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stone_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stone_pressure_plate.json new file mode 100644 index 000000000..e7d8303c7 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_stone_pressure_plate.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_stone_pressure_plate", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 4, + "id": "copycats:copycat_stone_pressure_plate" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_trapdoor.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_trapdoor.json new file mode 100644 index 000000000..c0214c076 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_trapdoor.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_trapdoor", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 4, + "id": "copycats:copycat_trapdoor" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_half_layer.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_half_layer.json new file mode 100644 index 000000000..ff510df68 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_half_layer.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_half_layer", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 16, + "id": "copycats:copycat_vertical_half_layer" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_slice.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_slice.json new file mode 100644 index 000000000..a129eef11 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_slice.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slice", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 16, + "id": "copycats:copycat_vertical_slice" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_slope.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_slope.json new file mode 100644 index 000000000..d3c5c2122 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_slope.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_slope", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 2, + "id": "copycats:copycat_vertical_slope" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_stairs.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_stairs.json new file mode 100644 index 000000000..414c27f02 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_stairs.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_stairs", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_vertical_stairs" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_step.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_step.json new file mode 100644 index 000000000..b05b29136 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_vertical_step.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_vertical_step", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 4, + "id": "copycats:copycat_vertical_step" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_wall.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_wall.json new file mode 100644 index 000000000..b643179d8 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_wall.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_wall", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 1, + "id": "copycats:copycat_wall" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_wooden_button.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_wooden_button.json new file mode 100644 index 000000000..51d1bb909 --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_wooden_button.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_wooden_button", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 4, + "id": "copycats:copycat_wooden_button" + } +} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_wooden_pressure_plate.json b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_wooden_pressure_plate.json new file mode 100644 index 000000000..19d6ef3df --- /dev/null +++ b/neoforge/src/generated/resources/data/copycats/recipe/stonecutting/copycat_wooden_pressure_plate.json @@ -0,0 +1,17 @@ +{ + "neoforge:conditions": [ + { + "type": "copycats:feature_enabled", + "feature": "copycats:copycat_wooden_pressure_plate", + "invert": false + } + ], + "type": "minecraft:stonecutting", + "ingredient": { + "tag": "c:ingots/zinc" + }, + "result": { + "count": 4, + "id": "copycats:copycat_wooden_pressure_plate" + } +} \ No newline at end of file diff --git a/forge/src/generated/resources/data/copycats/tags/items/copycat_beam.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_beam.json similarity index 100% rename from forge/src/generated/resources/data/copycats/tags/items/copycat_beam.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_beam.json diff --git a/forge/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 forge/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/forge/src/generated/resources/data/copycats/tags/items/copycat_board.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_board.json similarity index 100% rename from forge/src/generated/resources/data/copycats/tags/items/copycat_board.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_board.json diff --git a/forge/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 forge/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/forge/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 forge/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/forge/src/generated/resources/data/copycats/tags/items/copycat_fence.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_fence.json similarity index 100% rename from forge/src/generated/resources/data/copycats/tags/items/copycat_fence.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_fence.json diff --git a/forge/src/generated/resources/data/copycats/tags/items/copycat_fence_gate.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_fence_gate.json similarity index 100% rename from forge/src/generated/resources/data/copycats/tags/items/copycat_fence_gate.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_fence_gate.json diff --git a/forge/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 forge/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/forge/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 forge/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/forge/src/generated/resources/data/copycats/tags/items/copycat_vertical_step.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_vertical_step.json similarity index 100% rename from forge/src/generated/resources/data/copycats/tags/items/copycat_vertical_step.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_vertical_step.json diff --git a/forge/src/generated/resources/data/copycats/tags/items/copycat_wall.json b/neoforge/src/generated/resources/data/copycats/tags/item/copycat_wall.json similarity index 100% rename from forge/src/generated/resources/data/copycats/tags/items/copycat_wall.json rename to neoforge/src/generated/resources/data/copycats/tags/item/copycat_wall.json diff --git a/forge/src/generated/resources/data/create/tags/blocks/fan_transparent.json b/neoforge/src/generated/resources/data/create/tags/block/fan_transparent.json similarity index 100% rename from forge/src/generated/resources/data/create/tags/blocks/fan_transparent.json rename to neoforge/src/generated/resources/data/create/tags/block/fan_transparent.json diff --git a/forge/src/generated/resources/data/create/tags/blocks/movable_empty_collider.json b/neoforge/src/generated/resources/data/create/tags/block/movable_empty_collider.json similarity index 100% rename from forge/src/generated/resources/data/create/tags/blocks/movable_empty_collider.json rename to neoforge/src/generated/resources/data/create/tags/block/movable_empty_collider.json diff --git a/forge/src/generated/resources/data/create/tags/items/contraption_controlled.json b/neoforge/src/generated/resources/data/create/tags/item/contraption_controlled.json similarity index 100% rename from forge/src/generated/resources/data/create/tags/items/contraption_controlled.json rename to neoforge/src/generated/resources/data/create/tags/item/contraption_controlled.json diff --git a/forge/src/generated/resources/data/diagonalfences/tags/blocks/non_diagonal_fences.json b/neoforge/src/generated/resources/data/diagonalfences/tags/block/non_diagonal_fences.json similarity index 100% rename from forge/src/generated/resources/data/diagonalfences/tags/blocks/non_diagonal_fences.json rename to neoforge/src/generated/resources/data/diagonalfences/tags/block/non_diagonal_fences.json diff --git a/forge/src/generated/resources/data/diagonalwalls/tags/blocks/non_diagonal_walls.json b/neoforge/src/generated/resources/data/diagonalwalls/tags/block/non_diagonal_walls.json similarity index 100% rename from forge/src/generated/resources/data/diagonalwalls/tags/blocks/non_diagonal_walls.json rename to neoforge/src/generated/resources/data/diagonalwalls/tags/block/non_diagonal_walls.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/buttons.json b/neoforge/src/generated/resources/data/minecraft/tags/block/buttons.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/buttons.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/buttons.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/climbable.json b/neoforge/src/generated/resources/data/minecraft/tags/block/climbable.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/climbable.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/climbable.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/doors.json b/neoforge/src/generated/resources/data/minecraft/tags/block/doors.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/doors.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/doors.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/fence_gates.json b/neoforge/src/generated/resources/data/minecraft/tags/block/fence_gates.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/fence_gates.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/fence_gates.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/fences.json b/neoforge/src/generated/resources/data/minecraft/tags/block/fences.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/fences.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/fences.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json b/neoforge/src/generated/resources/data/minecraft/tags/block/mineable/axe.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/mineable/axe.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/neoforge/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/pressure_plates.json b/neoforge/src/generated/resources/data/minecraft/tags/block/pressure_plates.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/pressure_plates.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/pressure_plates.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/slabs.json b/neoforge/src/generated/resources/data/minecraft/tags/block/slabs.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/slabs.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/slabs.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/stairs.json b/neoforge/src/generated/resources/data/minecraft/tags/block/stairs.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/stairs.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/stairs.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/stone_buttons.json b/neoforge/src/generated/resources/data/minecraft/tags/block/stone_buttons.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/stone_buttons.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/stone_buttons.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/stone_pressure_plates.json b/neoforge/src/generated/resources/data/minecraft/tags/block/stone_pressure_plates.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/stone_pressure_plates.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/stone_pressure_plates.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/trapdoors.json b/neoforge/src/generated/resources/data/minecraft/tags/block/trapdoors.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/trapdoors.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/trapdoors.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/unstable_bottom_center.json b/neoforge/src/generated/resources/data/minecraft/tags/block/unstable_bottom_center.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/unstable_bottom_center.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/unstable_bottom_center.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/walls.json b/neoforge/src/generated/resources/data/minecraft/tags/block/walls.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/walls.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/walls.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/wooden_buttons.json b/neoforge/src/generated/resources/data/minecraft/tags/block/wooden_buttons.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/wooden_buttons.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/wooden_buttons.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/wooden_doors.json b/neoforge/src/generated/resources/data/minecraft/tags/block/wooden_doors.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/wooden_doors.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/wooden_doors.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/wooden_pressure_plates.json b/neoforge/src/generated/resources/data/minecraft/tags/block/wooden_pressure_plates.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/wooden_pressure_plates.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/wooden_pressure_plates.json diff --git a/forge/src/generated/resources/data/minecraft/tags/blocks/wooden_trapdoors.json b/neoforge/src/generated/resources/data/minecraft/tags/block/wooden_trapdoors.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/blocks/wooden_trapdoors.json rename to neoforge/src/generated/resources/data/minecraft/tags/block/wooden_trapdoors.json diff --git a/forge/src/generated/resources/data/minecraft/tags/items/doors.json b/neoforge/src/generated/resources/data/minecraft/tags/item/doors.json similarity index 100% rename from forge/src/generated/resources/data/minecraft/tags/items/doors.json rename to neoforge/src/generated/resources/data/minecraft/tags/item/doors.json diff --git a/forge/src/generated/resources/data/quark/tags/blocks/non_double_door.json b/neoforge/src/generated/resources/data/quark/tags/block/non_double_door.json similarity index 100% rename from forge/src/generated/resources/data/quark/tags/blocks/non_double_door.json rename to neoforge/src/generated/resources/data/quark/tags/block/non_double_door.json diff --git a/forge/src/main/java/com/copycatsplus/copycats/compat/forge/AdditionalPlacementsCompatForge.java b/neoforge/src/main/java/com/copycatsplus/copycats/compat/neoforge/AdditionalPlacementsCompatNeoForge.java similarity index 71% rename from forge/src/main/java/com/copycatsplus/copycats/compat/forge/AdditionalPlacementsCompatForge.java rename to neoforge/src/main/java/com/copycatsplus/copycats/compat/neoforge/AdditionalPlacementsCompatNeoForge.java index 5293349e6..075772a24 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/compat/forge/AdditionalPlacementsCompatForge.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/compat/neoforge/AdditionalPlacementsCompatNeoForge.java @@ -1,9 +1,9 @@ -package com.copycatsplus.copycats.compat.forge; +package com.copycatsplus.copycats.compat.neoforge; import com.copycatsplus.copycats.compat.AdditionalPlacementsCompat; import com.firemerald.additionalplacements.generation.Registration; -public class AdditionalPlacementsCompatForge { +public class AdditionalPlacementsCompatNeoForge { public static void register() { Registration.addRegistration(new AdditionalPlacementsCompat()); } diff --git a/forge/src/main/java/com/copycatsplus/copycats/compat/forge/AthenaCompatImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/compat/neoforge/AthenaCompatImpl.java similarity index 72% rename from forge/src/main/java/com/copycatsplus/copycats/compat/forge/AthenaCompatImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/compat/neoforge/AthenaCompatImpl.java index 9f16a1439..93aecf35e 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/compat/forge/AthenaCompatImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/compat/neoforge/AthenaCompatImpl.java @@ -1,6 +1,6 @@ -package com.copycatsplus.copycats.compat.forge; +package com.copycatsplus.copycats.compat.neoforge; -import earth.terrarium.athena.api.client.forge.WrappedGetter; +import earth.terrarium.athena.api.client.neoforge.WrappedGetter; import net.minecraft.world.level.BlockAndTintGetter; public class AthenaCompatImpl { diff --git a/forge/src/main/java/com/copycatsplus/copycats/compat/forge/ModsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/compat/neoforge/ModsImpl.java similarity index 73% rename from forge/src/main/java/com/copycatsplus/copycats/compat/forge/ModsImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/compat/neoforge/ModsImpl.java index 594ce137c..f7ebd9d51 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/compat/forge/ModsImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/compat/neoforge/ModsImpl.java @@ -1,7 +1,7 @@ -package com.copycatsplus.copycats.compat.forge; +package com.copycatsplus.copycats.compat.neoforge; -import net.minecraftforge.fml.ModList; -import net.minecraftforge.fml.loading.FMLLoader; +import net.neoforged.fml.ModList; +import net.neoforged.fml.loading.FMLLoader; public class ModsImpl { diff --git a/forge/src/main/java/com/copycatsplus/copycats/config/forge/CCConfigsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/config/neoforge/CCConfigsImpl.java similarity index 52% rename from forge/src/main/java/com/copycatsplus/copycats/config/forge/CCConfigsImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/config/neoforge/CCConfigsImpl.java index a5e497c05..c2918cfa8 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/config/forge/CCConfigsImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/config/neoforge/CCConfigsImpl.java @@ -1,20 +1,19 @@ -package com.copycatsplus.copycats.config.forge; +package com.copycatsplus.copycats.config.neoforge; import com.copycatsplus.copycats.Copycats; -import com.copycatsplus.copycats.config.CCConfigs; -import com.copycatsplus.copycats.config.CClient; -import com.copycatsplus.copycats.config.CCommon; -import com.copycatsplus.copycats.config.SyncConfigBase; -import com.simibubi.create.foundation.config.ConfigBase; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.config.ModConfig; -import net.minecraftforge.fml.event.config.ModConfigEvent; +import com.copycatsplus.copycats.config.*; +import net.createmod.catnip.config.ConfigBase; +import net.minecraft.server.level.ServerPlayer; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.ModLoadingContext; +import net.neoforged.fml.common.EventBusSubscriber; +import net.neoforged.fml.config.ModConfig; +import net.neoforged.fml.event.config.ModConfigEvent; +import net.neoforged.neoforge.event.entity.player.PlayerEvent; import java.util.Map; -@Mod.EventBusSubscriber(modid = Copycats.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +@EventBusSubscriber(modid = Copycats.MODID, bus = EventBusSubscriber.Bus.MOD) public class CCConfigsImpl extends CCConfigs { @SubscribeEvent @@ -37,8 +36,9 @@ public static void register() { ModLoadingContext context = ModLoadingContext.get(); client = register(CClient::new, ModConfig.Type.CLIENT); common = register(CCommon::new, ModConfig.Type.COMMON); + server = register(CServer::new, ModConfig.Type.SERVER); - for (Map.Entry pair : CONFIGS.entrySet()) - context.registerConfig(pair.getKey(), pair.getValue().specification); + for (Map.Entry pair : CONFIGS.entrySet()) + context.getActiveContainer().registerConfig(pair.getKey(), pair.getValue().specification); } } diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/config/neoforge/SyncConfigBaseImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/config/neoforge/SyncConfigBaseImpl.java new file mode 100644 index 000000000..9c90a1a8b --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/config/neoforge/SyncConfigBaseImpl.java @@ -0,0 +1,21 @@ +package com.copycatsplus.copycats.config.neoforge; + +import com.copycatsplus.copycats.config.CCConfigs; +import com.copycatsplus.copycats.config.SyncConfigBase; +import net.createmod.catnip.config.ConfigBase; +import net.minecraft.server.level.ServerPlayer; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.common.EventBusSubscriber; +import net.neoforged.neoforge.event.entity.player.PlayerEvent; + +@EventBusSubscriber(bus = EventBusSubscriber.Bus.GAME) +public abstract class SyncConfigBaseImpl extends SyncConfigBase { + + @SubscribeEvent + public static void onPlayerJoin(PlayerEvent.PlayerLoggedInEvent event) { + if (!(event.getEntity() instanceof ServerPlayer)) return; + for (ConfigBase config : CCConfigs.CONFIGS.values()) + if (config instanceof SyncConfigBase syncConfig) + syncConfig.syncToPlayer((ServerPlayer) event.getEntity()); + } +} diff --git a/forge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/forge/CopycatFluidPipeModelForge.java b/neoforge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/neoforge/CopycatFluidPipeModelNeoForge.java similarity index 84% rename from forge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/forge/CopycatFluidPipeModelForge.java rename to neoforge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/neoforge/CopycatFluidPipeModelNeoForge.java index 702527597..31b74cccb 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/forge/CopycatFluidPipeModelForge.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/neoforge/CopycatFluidPipeModelNeoForge.java @@ -1,28 +1,28 @@ -package com.copycatsplus.copycats.content.copycat.fluid_pipe.forge; +package com.copycatsplus.copycats.content.copycat.fluid_pipe.neoforge; import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; -import com.copycatsplus.copycats.foundation.copycat.model.forge.CopycatModelForge; +import com.copycatsplus.copycats.foundation.copycat.model.neoforge.CopycatModelNeoForge; import com.copycatsplus.copycats.content.copycat.fluid_pipe.CopycatFluidPipeModelCore; import com.simibubi.create.content.decoration.bracket.BracketedBlockEntityBehaviour; import com.simibubi.create.content.fluids.FluidTransportBehaviour; import com.simibubi.create.content.fluids.pipes.FluidPipeBlock; import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.util.RandomSource; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; -import net.minecraftforge.client.model.data.ModelProperty; +import net.neoforged.neoforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.data.ModelProperty; import org.jetbrains.annotations.NotNull; -public class CopycatFluidPipeModelForge extends CopycatModelForge { +public class CopycatFluidPipeModelNeoForge extends CopycatModelNeoForge { private static final ModelProperty PIPE_PROPERTY = new ModelProperty<>(); - public CopycatFluidPipeModelForge(BakedModel originalModel, CopycatModelCore core, boolean disableAO) { + public CopycatFluidPipeModelNeoForge(BakedModel originalModel, CopycatModelCore core, boolean disableAO) { super(originalModel, core, disableAO); } diff --git a/forge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/forge/CopycatFluidPipeRendererImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/neoforge/CopycatFluidPipeRendererImpl.java similarity index 92% rename from forge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/forge/CopycatFluidPipeRendererImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/neoforge/CopycatFluidPipeRendererImpl.java index b27d051da..f6d035480 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/forge/CopycatFluidPipeRendererImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/neoforge/CopycatFluidPipeRendererImpl.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.content.copycat.fluid_pipe.forge; +package com.copycatsplus.copycats.content.copycat.fluid_pipe.neoforge; import com.copycatsplus.copycats.content.copycat.fluid_pipe.CopycatFluidPipeBlockEntity; @@ -8,14 +8,14 @@ import com.simibubi.create.content.fluids.PipeConnection; import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer; -import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.utility.animation.LerpedFloat; +import net.createmod.catnip.animation.LerpedFloat; +import net.createmod.catnip.data.Iterate; import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.core.Direction; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public abstract class CopycatFluidPipeRendererImpl extends SafeBlockEntityRenderer { diff --git a/forge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/forge/ExpandedFluidRenderer.java b/neoforge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/neoforge/ExpandedFluidRenderer.java similarity index 69% rename from forge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/forge/ExpandedFluidRenderer.java rename to neoforge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/neoforge/ExpandedFluidRenderer.java index c9bad92a0..552d26574 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/forge/ExpandedFluidRenderer.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/content/copycat/fluid_pipe/neoforge/ExpandedFluidRenderer.java @@ -1,11 +1,12 @@ -package com.copycatsplus.copycats.content.copycat.fluid_pipe.forge; +package com.copycatsplus.copycats.content.copycat.fluid_pipe.neoforge; -import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.simibubi.create.foundation.fluid.FluidRenderer; -import com.simibubi.create.foundation.render.RenderTypes; -import com.simibubi.create.foundation.utility.AngleHelper; +import dev.engine_room.flywheel.lib.transform.PoseTransformStack; +import dev.engine_room.flywheel.lib.transform.TransformStack; +import net.createmod.catnip.math.AngleHelper; +import net.createmod.catnip.render.PonderRenderTypes; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -14,15 +15,15 @@ import net.minecraft.util.Mth; import net.minecraft.world.inventory.InventoryMenu; import net.minecraft.world.level.material.Fluid; -import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; +import net.neoforged.neoforge.client.extensions.common.IClientFluidTypeExtensions; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; import java.util.function.Function; public class ExpandedFluidRenderer { public static VertexConsumer getFluidBuilder(MultiBufferSource buffer) { - return buffer.getBuffer(RenderTypes.getFluid()); + return buffer.getBuffer(PonderRenderTypes.fluid()); } public static void renderFluidStream(FluidStack fluidStack, Direction direction, float radius, float progress, float centerOffset, @@ -35,27 +36,21 @@ public static void renderFluidStream(FluidStack fluidStack, Direction direction, Fluid fluid = fluidStack.getFluid(); IClientFluidTypeExtensions clientFluid = IClientFluidTypeExtensions.of(fluid); FluidType fluidAttributes = fluid.getFluidType(); - Function spriteAtlas = Minecraft.getInstance() - .getTextureAtlas(InventoryMenu.BLOCK_ATLAS); + Function spriteAtlas = Minecraft.getInstance().getTextureAtlas(InventoryMenu.BLOCK_ATLAS); TextureAtlasSprite flowTexture = spriteAtlas.apply(clientFluid.getFlowingTexture(fluidStack)); TextureAtlasSprite stillTexture = spriteAtlas.apply(clientFluid.getStillTexture(fluidStack)); - int color = clientFluid.getTintColor(fluidStack); - int blockLightIn = (light >> 4) & 0xF; + int blockLightIn = light >> 4 & 15; int luminosity = Math.max(blockLightIn, fluidAttributes.getLightLevel(fluidStack)); - light = (light & 0xF00000) | luminosity << 4; - - if (inbound) + light = light & 15728640 | luminosity << 4; + if (inbound) { direction = direction.getOpposite(); + } - TransformStack msr = TransformStack.cast(ms); + PoseTransformStack msr = TransformStack.of(ms); ms.pushPose(); - msr.centre() - .rotateY(AngleHelper.horizontalAngle(direction)) - .rotateX(direction == Direction.UP ? 180 : direction == Direction.DOWN ? 0 : 270) - .unCentre(); - ms.translate(.5, 0, .5); - + msr.center().rotateYDegrees(AngleHelper.horizontalAngle(direction)).rotateXDegrees(direction == Direction.UP ? 180.0F : (direction == Direction.DOWN ? 0.0F : 270.0F)).uncenter(); + ms.translate(0.5F, 0.0F, (double) 0.5F); float h = radius; float hMin = -radius; float hMax = radius; @@ -63,15 +58,16 @@ public static void renderFluidStream(FluidStack fluidStack, Direction direction, float yMin = y - Mth.clamp(progress * (.5f + centerOffset), 0, 1); float yMax = y; - for (int i = 0; i < 4; i++) { + for (int i = 0; i < 4; ++i) { ms.pushPose(); FluidRenderer.renderFlowingTiledFace(Direction.SOUTH, hMin, yMin, hMax, yMax, h, builder, ms, light, color, flowTexture); ms.popPose(); - msr.rotateY(90); + msr.rotateYDegrees(90.0F); } - if (progress != 1) + if (progress != 1.0F) { FluidRenderer.renderStillTiledFace(Direction.DOWN, hMin, hMin, hMax, hMax, yMin, builder, ms, light, color, stillTexture); + } ms.popPose(); } diff --git a/forge/src/main/java/com/copycatsplus/copycats/datagen/forge/CCBlockStateGenImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/neoforge/CCBlockStateGenImpl.java similarity index 93% rename from forge/src/main/java/com/copycatsplus/copycats/datagen/forge/CCBlockStateGenImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/datagen/neoforge/CCBlockStateGenImpl.java index 97812234f..5093da8bf 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/datagen/forge/CCBlockStateGenImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/neoforge/CCBlockStateGenImpl.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.datagen.forge; +package com.copycatsplus.copycats.datagen.neoforge; import com.copycatsplus.copycats.CCBlockStateProperties; import com.copycatsplus.copycats.foundation.copycat.CopycatBaseBlock; @@ -8,7 +8,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraftforge.client.model.generators.ConfiguredModel; +import net.neoforged.neoforge.client.model.generators.ConfiguredModel; public class CCBlockStateGenImpl { diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/datagen/neoforge/CCDatagenImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/neoforge/CCDatagenImpl.java new file mode 100644 index 000000000..1f641d3cc --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/neoforge/CCDatagenImpl.java @@ -0,0 +1,37 @@ +package com.copycatsplus.copycats.datagen.neoforge; + +import com.copycatsplus.copycats.Copycats; +import com.copycatsplus.copycats.datagen.CCDatagen; +import com.copycatsplus.copycats.datagen.recipes.CCStandardRecipes; +import com.copycatsplus.copycats.datagen.recipes.gen.CopycatsRecipeProvider; +import com.simibubi.create.Create; +import com.tterrag.registrate.providers.RegistrateDataProvider; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.DataProvider; +import net.minecraft.data.PackOutput; +import net.neoforged.neoforge.common.data.ExistingFileHelper; +import net.neoforged.neoforge.data.event.GatherDataEvent; +import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +public class CCDatagenImpl extends CCDatagen { + + protected static final List GENERATORS = new ArrayList<>(); + + public static void gatherData(GatherDataEvent event) { + addExtraRegistrateData(); + + DataGenerator generator = event.getGenerator(); + PackOutput output = generator.getPackOutput(); + CompletableFuture lookupProvider = event.getLookupProvider(); + + generator.addProvider(event.includeServer(), new CCStandardRecipes(output, lookupProvider)); + + event.getGenerator().addProvider(true, Copycats.getRegistrate().setDataProvider(new RegistrateDataProvider(Copycats.getRegistrate(), Copycats.MODID, event))); + } +} diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/CCCraftingConditions.java b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/CCCraftingConditions.java new file mode 100644 index 000000000..9ca3deac0 --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/CCCraftingConditions.java @@ -0,0 +1,19 @@ +package com.copycatsplus.copycats.datagen.recipes.neoforge; + + +import com.copycatsplus.copycats.Copycats; +import com.copycatsplus.copycats.neoforge.CopycatsImpl; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.neoforge.registries.NeoForgeRegistries; +import net.neoforged.neoforge.registries.RegisterEvent; + +public class CCCraftingConditions { + + public static void register(IEventBus modEventBus) { + modEventBus.addListener(RegisterEvent.class, registerEvent -> { + registerEvent.register(NeoForgeRegistries.CONDITION_SERIALIZERS.key(), helper -> { + helper.register(Copycats.asResource("feature_enabled"), FeatureEnabledCondition.CODEC); + }); + }); + } +} diff --git a/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/CCStandardRecipesImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/CCStandardRecipesImpl.java similarity index 68% rename from forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/CCStandardRecipesImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/CCStandardRecipesImpl.java index 6a853d758..5b7b29a26 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/CCStandardRecipesImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/CCStandardRecipesImpl.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.datagen.recipes.forge; +package com.copycatsplus.copycats.datagen.recipes.neoforge; import com.copycatsplus.copycats.datagen.recipes.gen.GeneratedRecipeBuilder; import net.minecraft.resources.ResourceLocation; @@ -10,11 +10,11 @@ public class CCStandardRecipesImpl { public static GeneratedRecipeBuilder create(Supplier result) { - return new GeneratedRecipeBuilderForge("/", result); + return new GeneratedRecipeBuilderNeoForge("/", result); } public static GeneratedRecipeBuilder create(ResourceLocation result) { - return new GeneratedRecipeBuilderForge("/", result); + return new GeneratedRecipeBuilderNeoForge("/", result); } } diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/FeatureEnabledCondition.java b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/FeatureEnabledCondition.java new file mode 100644 index 000000000..61366e198 --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/FeatureEnabledCondition.java @@ -0,0 +1,37 @@ +package com.copycatsplus.copycats.datagen.recipes.neoforge; + +import com.copycatsplus.copycats.config.FeatureToggle; +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.common.conditions.ICondition; + +public record FeatureEnabledCondition(ResourceLocation feature, boolean invert) implements ICondition { + public static MapCodec CODEC = RecordCodecBuilder.mapCodec(builder -> builder.group( + ResourceLocation.CODEC.fieldOf("feature").forGetter(FeatureEnabledCondition::feature), + Codec.BOOL.fieldOf("invert").forGetter(FeatureEnabledCondition::invert)) + .apply(builder, FeatureEnabledCondition::new)); + + public FeatureEnabledCondition(ResourceLocation feature) { + this(feature, false); + } + + @Override + public boolean test(IContext context) { + return FeatureToggle.isEnabled(feature) != invert; + } + + @Override + public MapCodec codec() { + return CODEC; + } + + @Override + public String toString() { + return "FeatureEnabledCondition{" + + "feature=" + feature + + ", invert=" + invert + + '}'; + } +} diff --git a/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/GeneratedRecipeBuilderForge.java b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/GeneratedRecipeBuilderNeoForge.java similarity index 72% rename from forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/GeneratedRecipeBuilderForge.java rename to neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/GeneratedRecipeBuilderNeoForge.java index 2f5d83bf3..0b040ddd2 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/datagen/recipes/forge/GeneratedRecipeBuilderForge.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/datagen/recipes/neoforge/GeneratedRecipeBuilderNeoForge.java @@ -1,22 +1,22 @@ -package com.copycatsplus.copycats.datagen.recipes.forge; +package com.copycatsplus.copycats.datagen.recipes.neoforge; import com.copycatsplus.copycats.Copycats; import com.copycatsplus.copycats.datagen.recipes.gen.CopycatsRecipeProvider; import com.copycatsplus.copycats.datagen.recipes.gen.GeneratedRecipeBuilder; -import com.simibubi.create.foundation.utility.RegisteredObjects; import com.tterrag.registrate.util.entry.BlockEntry; +import net.createmod.catnip.platform.CatnipServices; +import net.createmod.catnip.registry.RegisteredObjectsHelper; import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.data.recipes.*; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; -import net.minecraft.world.item.crafting.AbstractCookingRecipe; -import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.*; import net.minecraft.world.level.ItemLike; -import net.minecraftforge.common.crafting.ConditionalRecipe; -import net.minecraftforge.common.crafting.conditions.ICondition; +import net.neoforged.neoforge.common.conditions.ICondition; +import net.neoforged.neoforge.common.conditions.IConditionBuilder; +import net.neoforged.neoforge.common.crafting.ConditionalRecipeOutput; import java.util.ArrayList; import java.util.List; @@ -26,7 +26,7 @@ import static com.tterrag.registrate.providers.RegistrateRecipeProvider.inventoryTrigger; -public class GeneratedRecipeBuilderForge implements GeneratedRecipeBuilder { +public class GeneratedRecipeBuilderNeoForge implements GeneratedRecipeBuilder { private final List recipeConditions = new ArrayList<>(); private String path = ""; @@ -37,18 +37,18 @@ public class GeneratedRecipeBuilderForge implements GeneratedRecipeBuilder { private Supplier unlockedBy; private int amount; - private GeneratedRecipeBuilderForge(String path) { + private GeneratedRecipeBuilderNeoForge(String path) { this.path = path; suffix = ""; this.amount = 1; } - public GeneratedRecipeBuilderForge(String path, Supplier result) { + public GeneratedRecipeBuilderNeoForge(String path, Supplier result) { this(path); this.result = result; } - public GeneratedRecipeBuilderForge(String path, ResourceLocation result) { + public GeneratedRecipeBuilderNeoForge(String path, ResourceLocation result) { this(path); compatDatagenOutput = result; } @@ -105,7 +105,7 @@ private ResourceLocation clean(ResourceLocation loc) { String path = loc.getPath(); while (path.contains("//")) path = path.replaceAll("//", "/"); - return new ResourceLocation(loc.getNamespace(), path); + return ResourceLocation.fromNamespaceAndPath(loc.getNamespace(), path); } private ResourceLocation createSimpleLocation(String recipeType) { @@ -119,14 +119,14 @@ protected ResourceLocation createLocation(String recipeType) { } private ResourceLocation getRegistryName() { - return compatDatagenOutput == null ? RegisteredObjects.getKeyOrThrow(result.get() + return compatDatagenOutput == null ? RegisteredObjectsHelper.getKeyOrThrow(result.get() .asItem()) : compatDatagenOutput; } @Override public GeneratedRecipeBuilder requiresResultFeature() { - return requiresFeature(RegisteredObjects.getKeyOrThrow(result.get().asItem())); + return requiresFeature(RegisteredObjectsHelper.getKeyOrThrow(result.get().asItem())); } @Override @@ -151,16 +151,12 @@ public GeneratedRecipeBuilder requiresFeature(ResourceLocation location, boolean } @Override - public GeneratedRecipe handleConditions(Consumer> recipe) { - return CopycatsRecipeProvider.register(consumer -> { + public GeneratedRecipe handleConditions(Consumer recipe) { + return CopycatsRecipeProvider.register(output -> { if (!recipeConditions.isEmpty()) { - ConditionalRecipe.Builder b = ConditionalRecipe.builder(); - recipeConditions.forEach(b::addCondition); - b.addRecipe(recipe); - b.generateAdvancement(); - b.build(consumer, createLocation("crafting")); + recipe.accept(output.withConditions(recipeConditions.toArray(new ICondition[0]))); } else { - recipe.accept(consumer); + recipe.accept(output); } }); } @@ -177,7 +173,7 @@ public GeneratedCookingRecipeBuilder viaCookingTag(Supplier> tag) { @Override public GeneratedCookingRecipeBuilder viaCookingIngredient(Supplier ingredient) { - return new GeneratedCookingRecipeBuilderForge(ingredient); + return new GeneratedCookingRecipeBuilderNeoForge(ingredient); } @Override @@ -192,20 +188,16 @@ public GeneratedStoneCuttingRecipeBuilder viaStonecuttingTag(Supplier ingredient) { - return new GeneratedStoneCuttingRecipeBuilderForge(ingredient); + return new GeneratedStoneCuttingRecipeBuilderNeoForge(ingredient); } - public class GeneratedCookingRecipeBuilderForge implements GeneratedCookingRecipeBuilder { + public class GeneratedCookingRecipeBuilderNeoForge implements GeneratedCookingRecipeBuilder { private final Supplier ingredient; private float exp; private int cookingTime; - private final RecipeSerializer FURNACE = RecipeSerializer.SMELTING_RECIPE, - SMOKER = RecipeSerializer.SMOKING_RECIPE, BLAST = RecipeSerializer.BLASTING_RECIPE, - CAMPFIRE = RecipeSerializer.CAMPFIRE_COOKING_RECIPE; - - GeneratedCookingRecipeBuilderForge(Supplier ingredient) { + GeneratedCookingRecipeBuilderNeoForge(Supplier ingredient) { this.ingredient = ingredient; cookingTime = 200; exp = 0; @@ -230,7 +222,7 @@ public GeneratedRecipe inFurnace() { @Override public GeneratedRecipe inFurnace(UnaryOperator builder) { - return create(FURNACE, builder, 1); + return create(RecipeSerializer.SMELTING_RECIPE, builder, SmeltingRecipe::new, 1); } @Override @@ -240,9 +232,9 @@ public GeneratedRecipe inSmoker() { @Override public GeneratedRecipe inSmoker(UnaryOperator builder) { - create(FURNACE, builder, 1); - create(CAMPFIRE, builder, 3); - return create(SMOKER, builder, .5f); + create(RecipeSerializer.SMELTING_RECIPE, builder, SmeltingRecipe::new, 1); + create(RecipeSerializer.CAMPFIRE_COOKING_RECIPE, builder, CampfireCookingRecipe::new, 3); + return create(RecipeSerializer.SMOKING_RECIPE, builder, SmokingRecipe::new, .5f); } @Override @@ -252,31 +244,31 @@ public GeneratedRecipe inBlastFurnace() { @Override public GeneratedRecipe inBlastFurnace(UnaryOperator builder) { - create(FURNACE, builder, 1); - return create(BLAST, builder, .5f); + create(RecipeSerializer.SMELTING_RECIPE, builder, SmeltingRecipe::new, 1); + return create(RecipeSerializer.BLASTING_RECIPE, builder, BlastingRecipe::new, .5f); } - private GeneratedRecipe create(RecipeSerializer serializer, - UnaryOperator builder, float cookingTimeModifier) { + private GeneratedRecipe create(RecipeSerializer serializer, + UnaryOperator builder, AbstractCookingRecipe.Factory factory, float cookingTimeModifier) { return CopycatsRecipeProvider.register(consumer -> { boolean isOtherMod = compatDatagenOutput != null; - SimpleCookingRecipeBuilder b = builder.apply( - SimpleCookingRecipeBuilder.generic(ingredient.get(), RecipeCategory.MISC, isOtherMod ? Items.DIRT : result.get(), - exp, (int) (cookingTime * cookingTimeModifier), serializer)); + SimpleCookingRecipeBuilder b = builder.apply(SimpleCookingRecipeBuilder.generic(ingredient.get(), + RecipeCategory.MISC, isOtherMod ? Items.DIRT : result.get(), exp, + (int) (cookingTime * cookingTimeModifier), serializer, factory)); if (unlockedBy != null) b.unlockedBy("has_item", inventoryTrigger(unlockedBy.get())); - b.save(consumer::accept, createSimpleLocation(RegisteredObjects.getKeyOrThrow(serializer) + b.save(consumer, createSimpleLocation(RegisteredObjectsHelper.getKeyOrThrow(serializer) .getPath())); }); } } - public class GeneratedStoneCuttingRecipeBuilderForge implements GeneratedStoneCuttingRecipeBuilder { + public class GeneratedStoneCuttingRecipeBuilderNeoForge implements GeneratedStoneCuttingRecipeBuilder { private final Supplier ingredient; - GeneratedStoneCuttingRecipeBuilderForge(Supplier ingredient) { + GeneratedStoneCuttingRecipeBuilderNeoForge(Supplier ingredient) { this.ingredient = ingredient; } diff --git a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/forge/CopycatRenderContextForge.java b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/neoforge/CopycatRenderContextNeoForge.java similarity index 94% rename from forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/forge/CopycatRenderContextForge.java rename to neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/neoforge/CopycatRenderContextNeoForge.java index c23870db8..7407de012 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/forge/CopycatRenderContextForge.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/assembly/neoforge/CopycatRenderContextNeoForge.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.foundation.copycat.model.assembly.forge; +package com.copycatsplus.copycats.foundation.copycat.model.assembly.neoforge; import com.copycatsplus.copycats.foundation.copycat.model.assembly.*; import com.copycatsplus.copycats.foundation.copycat.model.assembly.quad.QuadAutoCull; @@ -22,9 +22,9 @@ @ApiStatus.Internal @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class CopycatRenderContextForge extends CopycatRenderContext.Base, List> { +public class CopycatRenderContextNeoForge extends CopycatRenderContext.Base, List> { - public CopycatRenderContextForge(List source, List destination, String property) { + public CopycatRenderContextNeoForge(List source, List destination, String property) { super(source, destination, property); } diff --git a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/forge/BakedModelWithDataBuilder.java b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/neoforge/BakedModelWithDataBuilder.java similarity index 55% rename from forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/forge/BakedModelWithDataBuilder.java rename to neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/neoforge/BakedModelWithDataBuilder.java index 6b1fca12a..9a90ad000 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/forge/BakedModelWithDataBuilder.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/neoforge/BakedModelWithDataBuilder.java @@ -1,12 +1,12 @@ -package com.copycatsplus.copycats.foundation.copycat.model.kinetic.forge; +package com.copycatsplus.copycats.foundation.copycat.model.kinetic.neoforge; -import com.jozufozu.flywheel.core.model.BlockModel; -import com.jozufozu.flywheel.core.model.Bufferable; -import com.jozufozu.flywheel.core.model.ModelUtil; -import com.jozufozu.flywheel.core.virtual.VirtualEmptyBlockGetter; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; -import net.minecraft.client.renderer.block.ModelBlockRenderer; +import dev.engine_room.flywheel.lib.model.baked.EmptyVirtualBlockGetter; +import net.createmod.catnip.render.ShadedBlockSbbBuilder; +import net.createmod.catnip.render.SuperByteBuffer; +import net.createmod.ponder.render.VirtualRenderHelper; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.block.BlockRenderDispatcher; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; @@ -14,15 +14,15 @@ import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.data.ModelData; -public final class BakedModelWithDataBuilder implements Bufferable { +public final class BakedModelWithDataBuilder { private final BakedModel model; - private BlockAndTintGetter renderWorld = VirtualEmptyBlockGetter.INSTANCE; + private BlockAndTintGetter renderWorld = EmptyVirtualBlockGetter.FULL_DARK; private BlockState referenceState = Blocks.AIR.defaultBlockState(); private PoseStack poseStack = new PoseStack(); private BlockPos renderPos = BlockPos.ZERO; - private ModelData data = ModelUtil.VIRTUAL_DATA; + private ModelData data = VirtualRenderHelper.VIRTUAL_DATA; public BakedModelWithDataBuilder(BakedModel model) { this.model = model; @@ -53,16 +53,18 @@ public BakedModelWithDataBuilder withData(ModelData data) { return this; } - @Override - public void bufferInto(VertexConsumer consumer, ModelBlockRenderer blockRenderer, RandomSource random) { - blockRenderer.tesselateBlock(renderWorld, model, referenceState, renderPos, poseStack, consumer, false, random, 42, OverlayTexture.NO_OVERLAY, data, null); - } + public SuperByteBuffer build() { + BlockRenderDispatcher dispatcher = Minecraft.getInstance().getBlockRenderer(); - public BlockModel toModel(String name) { - return BlockModel.of(this, name); - } + RandomSource random = RandomSource.createNewThreadLocalInstance(); + + ShadedBlockSbbBuilder sbbBuilder = ShadedBlockSbbBuilder.createForPonder(); + sbbBuilder.begin(); + + poseStack.pushPose(); + dispatcher.getModelRenderer().tesselateBlock(renderWorld, model, referenceState, renderPos, poseStack, sbbBuilder, false, random, 42, OverlayTexture.NO_OVERLAY, data, null); + poseStack.popPose(); - public BlockModel toModel() { - return toModel(referenceState.toString()); + return sbbBuilder.end(); } } diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/neoforge/KineticCopycatRendererImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/neoforge/KineticCopycatRendererImpl.java new file mode 100644 index 000000000..f562fb57e --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/kinetic/neoforge/KineticCopycatRendererImpl.java @@ -0,0 +1,57 @@ +package com.copycatsplus.copycats.foundation.copycat.model.kinetic.neoforge; + +import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; +import com.copycatsplus.copycats.foundation.copycat.model.kinetic.WrappedRenderWorld; +import com.copycatsplus.copycats.utility.neoforge.ModelDataUtils; +import com.mojang.blaze3d.vertex.PoseStack; +import dev.engine_room.flywheel.api.material.CardinalLightingMode; +import dev.engine_room.flywheel.api.model.Model; +import dev.engine_room.flywheel.lib.material.LightShaders; +import dev.engine_room.flywheel.lib.material.SimpleMaterial; +import dev.engine_room.flywheel.lib.model.ModelUtil; +import dev.engine_room.flywheel.lib.model.baked.BakedModelBuilder; +import net.createmod.catnip.render.SuperByteBuffer; +import net.createmod.ponder.render.VirtualRenderHelper; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.world.level.BlockAndTintGetter; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.neoforged.neoforge.client.model.data.ModelData; + + +public class KineticCopycatRendererImpl { + + private static ModelData prepareModelData(BlockAndTintGetter renderWorld, BakedModel model, ICopycatBlockEntity be) { + ModelData blockEntityData = ModelDataUtils.mergeData( + ((BlockEntity) be).getModelData(), + VirtualRenderHelper.VIRTUAL_DATA + ).build(); + ModelData renderData = model.getModelData(renderWorld, be.getBlockPos(), be.getBlockState(), blockEntityData); + ModelData.Builder builder = ModelData.builder(); + ModelDataUtils.copyModelData(renderData, builder); + builder.with(VirtualRenderHelper.VIRTUAL_PROPERTY, true); + return builder.build(); + } + + public static SuperByteBuffer renderBuffer(BakedModel model, ICopycatBlockEntity be, PoseStack ms) { + WrappedRenderWorld renderWorld = new WrappedRenderWorld(be); + ModelData data = prepareModelData(renderWorld, model, be); + + return new BakedModelWithDataBuilder(model) + .withRenderWorld(renderWorld) + .withRenderPos(be.getBlockPos()) + .withReferenceState(be.getBlockState()) + .withPoseStack(ms) + .withData(data) + .build(); + } + + public static Model instancedModel(BakedModel model, ICopycatBlockEntity be) { + WrappedRenderWorld renderWorld = new WrappedRenderWorld(be); + ModelData data = prepareModelData(renderWorld, model, be); + + return new BakedModelBuilder(model) + .level(renderWorld.withModelData(data)) + .pos(be.getBlockPos()) + .build(); + } +} diff --git a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/forge/CopycatModelCoreImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/neoforge/CopycatModelCoreImpl.java similarity index 68% rename from forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/forge/CopycatModelCoreImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/neoforge/CopycatModelCoreImpl.java index 7e9da9d9f..21b787013 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/forge/CopycatModelCoreImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/neoforge/CopycatModelCoreImpl.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.foundation.copycat.model.forge; +package com.copycatsplus.copycats.foundation.copycat.model.neoforge; import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import net.minecraft.client.resources.model.BakedModel; @@ -8,11 +8,11 @@ public class CopycatModelCoreImpl { @NotNull public static BakedModel createModel(BakedModel original, CopycatModelCore core) { - return new CopycatModelForge(original, core, false); + return new CopycatModelNeoForge(original, core, false); } @NotNull public static BakedModel createKineticModel(BakedModel original, CopycatModelCore core) { - return new CopycatModelForge(original, core, true); + return new CopycatModelNeoForge(original, core, true); } } diff --git a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/forge/CopycatModelForge.java b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/neoforge/CopycatModelNeoForge.java similarity index 80% rename from forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/forge/CopycatModelForge.java rename to neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/neoforge/CopycatModelNeoForge.java index 9c612446e..e1470a124 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/forge/CopycatModelForge.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/neoforge/CopycatModelNeoForge.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.foundation.copycat.model.forge; +package com.copycatsplus.copycats.foundation.copycat.model.neoforge; import com.copycatsplus.copycats.CCBlocks; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; @@ -6,14 +6,14 @@ import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import com.copycatsplus.copycats.foundation.copycat.model.FilteredBlockAndTintGetter; import com.copycatsplus.copycats.foundation.copycat.model.ScaledBlockAndTintGetter; -import com.copycatsplus.copycats.foundation.copycat.model.assembly.forge.CopycatRenderContextForge; +import com.copycatsplus.copycats.foundation.copycat.model.assembly.neoforge.CopycatRenderContextNeoForge; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlock; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; -import com.copycatsplus.copycats.utility.forge.ModelDataUtils; -import com.jozufozu.flywheel.core.model.ModelUtil; +import com.copycatsplus.copycats.utility.neoforge.ModelDataUtils; import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.model.BakedModelWrapperWithData; -import com.simibubi.create.foundation.utility.Iterate; +import net.createmod.catnip.data.Iterate; +import net.createmod.ponder.render.VirtualRenderHelper; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -26,10 +26,12 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.ChunkRenderTypeSet; -import net.minecraftforge.client.model.data.ModelData; -import net.minecraftforge.client.model.data.ModelProperty; +import net.neoforged.neoforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.data.ModelProperty; +import net.neoforged.neoforge.common.util.TriState; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.*; @@ -38,7 +40,7 @@ import static com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore.MATERIAL_KEY; import static com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore.getModelOf; -public class CopycatModelForge extends BakedModelWrapperWithData { +public class CopycatModelNeoForge extends BakedModelWrapperWithData { public static final ModelProperty MATERIAL_PROPERTY = new ModelProperty<>(); public static final ModelProperty> MATERIALS_PROPERTY = new ModelProperty<>(); @@ -52,7 +54,7 @@ public class CopycatModelForge extends BakedModelWrapperWithData { protected final List entries = new ArrayList<>(); private final ThreadLocal renderSession = ThreadLocal.withInitial(() -> new RenderSession(this::getQuads)); - public CopycatModelForge(BakedModel originalModel, CopycatModelCore core, boolean disableAO) { + public CopycatModelNeoForge(BakedModel originalModel, CopycatModelCore core, boolean disableAO) { super(originalModel); this.core = core; this.disableAO = disableAO; @@ -66,17 +68,14 @@ public boolean isCustomRenderer() { @Override public boolean useAmbientOcclusion() { - return !disableAO && super.useAmbientOcclusion(); + if (disableAO) return false; + return super.useAmbientOcclusion(); } @Override - public boolean useAmbientOcclusion(@NotNull BlockState state) { - return !disableAO && super.useAmbientOcclusion(state); - } - - @Override - public boolean useAmbientOcclusion(@NotNull BlockState state, @NotNull RenderType renderType) { - return !disableAO && super.useAmbientOcclusion(state, renderType); + public @NotNull TriState useAmbientOcclusion(@NotNull BlockState state, @NotNull ModelData data, @NotNull RenderType renderType) { + if (disableAO) return TriState.FALSE; + return super.useAmbientOcclusion(state, data, renderType); } @Override @@ -131,7 +130,7 @@ public ModelData.Builder gatherModelData(ModelData.Builder builder, BlockAndTint ScaledBlockAndTintGetter scaledWorld = new ScaledBlockAndTintGetterForge(s.getKey(), world, pos, inner, multiStateBlock.vectorScale(state), p -> true); OcclusionData occlusionData = new OcclusionData(); - if (!ModelUtil.isVirtual(blockEntityData)) + if (!VirtualRenderHelper.isVirtual(blockEntityData)) gatherOcclusionData(scaledWorld, pos, state, s.getValue(), occlusionData, copycatBlock); occlusionMap.put(s.getKey(), occlusionData); @@ -150,7 +149,7 @@ public ModelData.Builder gatherModelData(ModelData.Builder builder, BlockAndTint if (material == null) return builder; OcclusionData occlusionData = new OcclusionData(); - if (!ModelUtil.isVirtual(blockEntityData)) + if (!VirtualRenderHelper.isVirtual(blockEntityData)) gatherOcclusionData(world, pos, state, material, occlusionData, copycatBlock); Map occlusionMap = Map.of( MATERIAL_KEY, @@ -176,7 +175,7 @@ public ModelData.Builder gatherModelData(ModelData.Builder builder, BlockAndTint } private void gatherOcclusionData(BlockAndTintGetter world, BlockPos pos, BlockState state, BlockState material, - CopycatModelForge.OcclusionData occlusionData, ICopycatBlock copycatBlock) { + CopycatModelNeoForge.OcclusionData occlusionData, ICopycatBlock copycatBlock) { BlockPos.MutableBlockPos mutablePos = new BlockPos.MutableBlockPos(); for (Direction face : Iterate.directions) { @@ -194,15 +193,15 @@ private void gatherOcclusionData(BlockAndTintGetter world, BlockPos pos, BlockSt } } - protected @NotNull List getQuads(BlockState state, @NotNull RandomSource rand, @NotNull ModelData data, RenderType renderType) { + protected @NotNull List getQuads(BlockState state, @NotNull RandomSource rand, @NotNull ModelData data, RenderType renderType) { prepareModelCore(state, rand, data); - List allQuads = new ArrayList<>(); + List allQuads = new ArrayList<>(); Map materials = getMaterials(data); Map occlusionDataMap = getOcclusion(data); Map wrappedDataMap = getWrappedData(data); - final boolean isVirtual = ModelUtil.isVirtual(data); + final boolean isVirtual = VirtualRenderHelper.isVirtual(data); for (CopycatModelCore.ModelEntry entry : entries) { BlockState material = entry.materialMapper().map(state, materials.get(entry.key())); @@ -229,26 +228,26 @@ private void gatherOcclusionData(BlockAndTintGetter world, BlockPos pos, BlockSt if (!model.getRenderTypes(wrappedState, rand, wrappedData).contains(renderType)) continue; } - if (ModelUtil.isVirtual(wrappedData) != isVirtual) { - wrappedData = ModelDataUtils.mergeData(wrappedData, ModelUtil.VIRTUAL_DATA).build(); + if (VirtualRenderHelper.isVirtual(wrappedData) != isVirtual) { + wrappedData = ModelDataUtils.mergeData(wrappedData, VirtualRenderHelper.VIRTUAL_DATA).build(); } - List quads = new ArrayList<>(); + List quads = new ArrayList<>(); for (Direction side : Iterate.directions) { List templateQuads = model.getQuads(wrappedState, side, rand, wrappedData, renderType); for (BakedQuad templateQuad : templateQuads) { - quads.add(new CopycatRenderContextForge.CopycatBakedQuad(templateQuad, side, entry.key())); + quads.add(new CopycatRenderContextNeoForge.CopycatBakedQuad(templateQuad, side, entry.key())); } } List templateQuads = model.getQuads(wrappedState, null, rand, wrappedData, renderType); for (BakedQuad templateQuad : templateQuads) { - quads.add(new CopycatRenderContextForge.CopycatBakedQuad(templateQuad, null, entry.key())); + quads.add(new CopycatRenderContextNeoForge.CopycatBakedQuad(templateQuad, null, entry.key())); } - List croppedQuads = getCroppedQuads(entry, state, quads, material); + List croppedQuads = getCroppedQuads(entry, state, quads, material); - CopycatModelForge.OcclusionData occlusionData = occlusionDataMap.get(entry.key()); - for (CopycatRenderContextForge.CopycatBakedQuad croppedQuad : croppedQuads) { + CopycatModelNeoForge.OcclusionData occlusionData = occlusionDataMap.get(entry.key()); + for (CopycatRenderContextNeoForge.CopycatBakedQuad croppedQuad : croppedQuads) { if (occlusionData != null && occlusionData.isOccluded(croppedQuad.cullFace)) continue; @@ -263,11 +262,16 @@ private void gatherOcclusionData(BlockAndTintGetter world, BlockPos pos, BlockSt return allQuads; } + @Override + public @NotNull List getQuads(@Nullable BlockState state, @Nullable Direction direction, @NotNull RandomSource random) { + return getQuads(state, direction, random, ModelData.EMPTY, null); + } + @Override public @NotNull List getQuads(BlockState state, Direction side, @NotNull RandomSource rand, @NotNull ModelData data, RenderType renderType) { - List templateQuads = renderSession.get().getQuads(state, rand, data, renderType); + List templateQuads = renderSession.get().getQuads(state, rand, data, renderType); List quads = new ArrayList<>(); - for (CopycatRenderContextForge.CopycatBakedQuad quad : templateQuads) { + for (CopycatRenderContextNeoForge.CopycatBakedQuad quad : templateQuads) { if (side != quad.cullFace) continue; quads.add(quad.toBakedQuad()); @@ -275,11 +279,11 @@ private void gatherOcclusionData(BlockAndTintGetter world, BlockPos pos, BlockSt return quads; } - private List getCroppedQuads(CopycatModelCore.ModelEntry entry, BlockState state, List templateQuads, BlockState material) { + private List getCroppedQuads(CopycatModelCore.ModelEntry entry, BlockState state, List templateQuads, BlockState material) { if (entry.part() == null) return templateQuads; - List quads = new ArrayList<>(); - CopycatRenderContextForge context = new CopycatRenderContextForge(templateQuads, quads, entry.key()); + List quads = new ArrayList<>(); + CopycatRenderContextNeoForge context = new CopycatRenderContextNeoForge(templateQuads, quads, entry.key()); entry.part().emitCopycatQuads(entry.key(), state, context, material); return quads; } @@ -352,7 +356,7 @@ public boolean isOccluded(Direction face) { @FunctionalInterface public interface Renderer { - List getQuads(BlockState state, @NotNull RandomSource rand, @NotNull ModelData data, RenderType renderType); + List getQuads(BlockState state, @NotNull RandomSource rand, @NotNull ModelData data, RenderType renderType); } public static class RenderSession implements Renderer { @@ -361,14 +365,14 @@ public static class RenderSession implements Renderer { private RandomSource rand = null; private ModelData data = null; private RenderType renderType = null; - private List result = null; + private List result = null; public RenderSession(Renderer renderer) { this.renderer = renderer; } @Override - public List getQuads(BlockState state, @NotNull RandomSource rand, @NotNull ModelData data, RenderType renderType) { + public List getQuads(BlockState state, @NotNull RandomSource rand, @NotNull ModelData data, RenderType renderType) { if (Objects.equals(this.state, state) && this.rand == rand && this.data == data && this.renderType == renderType && this.result != null) { return result; } diff --git a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/forge/FilteredBlockAndTintGetterForge.java b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/neoforge/FilteredBlockAndTintGetterForge.java similarity index 61% rename from forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/forge/FilteredBlockAndTintGetterForge.java rename to neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/neoforge/FilteredBlockAndTintGetterForge.java index 17c85b54a..681072af0 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/forge/FilteredBlockAndTintGetterForge.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/copycat/model/neoforge/FilteredBlockAndTintGetterForge.java @@ -1,9 +1,9 @@ -package com.copycatsplus.copycats.foundation.copycat.model.forge; +package com.copycatsplus.copycats.foundation.copycat.model.neoforge; import com.copycatsplus.copycats.foundation.copycat.model.FilteredBlockAndTintGetter; import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraftforge.client.model.data.ModelDataManager; +import net.neoforged.neoforge.client.model.data.ModelDataManager; import javax.annotation.Nullable; import java.util.function.Predicate; @@ -13,9 +13,4 @@ public FilteredBlockAndTintGetterForge(BlockAndTintGetter wrapped, Predicate filter) { super(renderingProperty, wrapped, origin, originInner, scale, filter); } - - @SuppressWarnings("UnstableApiUsage") - @Override - public @Nullable ModelDataManager getModelDataManager() { - return wrapped.getModelDataManager(); - } } diff --git a/forge/src/main/java/com/copycatsplus/copycats/foundation/tooltip/forge/CopycatDescriptionImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/tooltip/neoforge/CopycatDescriptionImpl.java similarity index 84% rename from forge/src/main/java/com/copycatsplus/copycats/foundation/tooltip/forge/CopycatDescriptionImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/foundation/tooltip/neoforge/CopycatDescriptionImpl.java index 8a2ab481a..53fd0b8b3 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/foundation/tooltip/forge/CopycatDescriptionImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/foundation/tooltip/neoforge/CopycatDescriptionImpl.java @@ -1,10 +1,10 @@ -package com.copycatsplus.copycats.foundation.tooltip.forge; +package com.copycatsplus.copycats.foundation.tooltip.neoforge; import com.copycatsplus.copycats.foundation.tooltip.CopycatDescription; import com.simibubi.create.foundation.item.TooltipModifier; import net.minecraft.world.item.Item; import net.minecraft.world.level.ItemLike; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.neoforged.neoforge.event.entity.player.ItemTooltipEvent; import org.jetbrains.annotations.NotNull; public class CopycatDescriptionImpl extends CopycatDescription implements TooltipModifier { diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/CCBlocksImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCBlocksImpl.java similarity index 90% rename from forge/src/main/java/com/copycatsplus/copycats/forge/CCBlocksImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCBlocksImpl.java index 4994be9d1..e6fa6a3ab 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/CCBlocksImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCBlocksImpl.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.forge; +package com.copycatsplus.copycats.neoforge; import com.tterrag.registrate.providers.DataGenContext; import com.tterrag.registrate.providers.RegistrateBlockstateProvider; diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/CCBuilderTransformersImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCBuilderTransformersImpl.java similarity index 94% rename from forge/src/main/java/com/copycatsplus/copycats/forge/CCBuilderTransformersImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCBuilderTransformersImpl.java index bea59438b..47c826609 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/CCBuilderTransformersImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCBuilderTransformersImpl.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.forge; +package com.copycatsplus.copycats.neoforge; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlock; @@ -10,6 +10,7 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.world.level.material.MapColor; +@SuppressWarnings("removal") public class CCBuilderTransformersImpl { public static NonNullUnaryOperator> copycat() { @@ -17,7 +18,7 @@ public static NonNullUnaryOperator> copy .blockstate((c, p) -> p.simpleBlock(c.get(), p.models() .getExistingFile(p.mcLoc("air")))) .initialProperties(SharedProperties::softMetal) - .properties(p -> p.noOcclusion().mapColor(MapColor.NONE).forceSolidOn()) + .properties(p -> p.noOcclusion().mapColor(MapColor.METAL).forceSolidOn()) .addLayer(() -> RenderType::solid) .addLayer(() -> RenderType::cutout) .addLayer(() -> RenderType::cutoutMipped) @@ -31,7 +32,7 @@ public static NonNullUnaryOperator> mult .blockstate((c, p) -> p.simpleBlock(c.get(), p.models() .getExistingFile(p.mcLoc("air")))) .initialProperties(SharedProperties::softMetal) - .properties(p -> p.noOcclusion().mapColor(MapColor.NONE).forceSolidOn()) + .properties(p -> p.noOcclusion().mapColor(MapColor.METAL).forceSolidOn()) .addLayer(() -> RenderType::solid) .addLayer(() -> RenderType::cutout) .addLayer(() -> RenderType::cutoutMipped) diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/CCCatVariantsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCCatVariantsImpl.java similarity index 78% rename from forge/src/main/java/com/copycatsplus/copycats/forge/CCCatVariantsImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCCatVariantsImpl.java index 10d8907dc..b70a2108f 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/CCCatVariantsImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCCatVariantsImpl.java @@ -1,16 +1,16 @@ -package com.copycatsplus.copycats.forge; +package com.copycatsplus.copycats.neoforge; import com.copycatsplus.copycats.CCCatVariants; -import com.simibubi.create.foundation.utility.Pair; +import net.createmod.catnip.data.Pair; import net.minecraft.core.Holder; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.animal.CatVariant; -import net.minecraftforge.registries.RegisterEvent; +import net.neoforged.neoforge.registries.RegisterEvent; public class CCCatVariantsImpl extends CCCatVariants { public static void register() { - CopycatsImpl.bus.addListener(CCCatVariantsImpl::onRegister); + CopycatsImpl.modBus.addListener(CCCatVariantsImpl::onRegister); } private static void onRegister(RegisterEvent event) { diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/CCCreativeTabsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCCreativeTabsImpl.java similarity index 57% rename from forge/src/main/java/com/copycatsplus/copycats/forge/CCCreativeTabsImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCCreativeTabsImpl.java index f64b7838b..184c58812 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/CCCreativeTabsImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCCreativeTabsImpl.java @@ -1,8 +1,7 @@ -package com.copycatsplus.copycats.forge; +package com.copycatsplus.copycats.neoforge; import com.copycatsplus.copycats.CCBlocks; import com.copycatsplus.copycats.CCCreativeTabs; -import com.copycatsplus.copycats.CopycatRegistrate; import com.copycatsplus.copycats.Copycats; import com.copycatsplus.copycats.config.FeatureToggle; import com.simibubi.create.Create; @@ -10,18 +9,18 @@ import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceKey; +import net.minecraft.world.flag.FeatureElement; import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.CreativeModeTabs; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.event.BuildCreativeModeTabContentsEvent; -import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.RegistryObject; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; +import org.jetbrains.annotations.NotNull; -import java.util.Iterator; -import java.util.Map; import java.util.Set; +import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -30,24 +29,22 @@ public class CCCreativeTabsImpl extends CCCreativeTabs { private static final DeferredRegister TAB_REGISTER = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, Copycats.MODID); - public static final RegistryObject MAIN_TAB = TAB_REGISTER.register("main", - () -> CreativeModeTab.builder() + public static final Supplier MAIN_TAB = TAB_REGISTER.register("main", () -> CreativeModeTab.builder() .title(Component.translatable("itemGroup.copycats.main")) .withTabsBefore(Create.asResource("palettes")) .icon(CCBlocks.COPYCAT_SLAB::asStack) - .displayItems(new DisplayItemsGenerator(DECORATIVE)) + .displayItems(new AdvancedDisplayGenerator(DECORATIVE, CCCreativeTabsImpl.MAIN_TAB)) .build()); - public static final RegistryObject FUNCTIONAL_TAB = TAB_REGISTER.register("functional", - () -> CreativeModeTab.builder() - .title(Component.translatable("itemGroup.copycats.functional")) - .withTabsBefore(MAIN_TAB.getKey()) - .icon(CCBlocks.COPYCAT_COGWHEEL::asStack) - .displayItems(new DisplayItemsGenerator(FUNCTIONAL)) - .build()); + public static final Supplier FUNCTIONAL_TAB = TAB_REGISTER.register("functional", () -> CreativeModeTab.builder() + .title(Component.translatable("itemGroup.copycats.functional")) + .withTabsBefore(Copycats.asResource("main")) + .icon(CCBlocks.COPYCAT_COGWHEEL::asStack) + .displayItems(new AdvancedDisplayGenerator(FUNCTIONAL, CCCreativeTabsImpl.FUNCTIONAL_TAB)) + .build()); public static void setCreativeTab() { - CopycatRegistrate.setTab(MAIN_TAB); + } public static void register(IEventBus modEventBus) { @@ -61,12 +58,12 @@ public static void modifyTabEntries(BuildCreativeModeTabContentsEvent event) { .filter(x -> !FeatureToggle.isEnabled(x.getId())) .map(ItemProviderEntry::asItem) .collect(Collectors.toSet()); - for (Iterator> iterator = event.getEntries().iterator(); iterator.hasNext(); ) { - Map.Entry entry = iterator.next(); - if (hiddenItems.contains(entry.getKey().getItem())) { - iterator.remove(); + event.getSearchEntries().forEach(itemStack -> { + if (hiddenItems.contains(itemStack.getItem())) { + if (event.getTab().contains(itemStack)) + event.remove(itemStack, CreativeModeTab.TabVisibility.SEARCH_TAB_ONLY); } - } + }); } } @@ -75,7 +72,7 @@ public static CreativeModeTab getBaseTab() { } public static ResourceKey getBaseTabKey() { - return MAIN_TAB.getKey(); + return TAB_REGISTER.getRegistry().get().getResourceKey(MAIN_TAB.get()).get(); } public static CreativeModeTab getFunctionalTab() { @@ -83,7 +80,7 @@ public static CreativeModeTab getFunctionalTab() { } public static ResourceKey getFunctionalTabKey() { - return FUNCTIONAL_TAB.getKey(); + return TAB_REGISTER.getRegistry().get().getResourceKey(FUNCTIONAL_TAB.get()).get(); } diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/CCCustomModelsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCCustomModelsImpl.java similarity index 56% rename from forge/src/main/java/com/copycatsplus/copycats/forge/CCCustomModelsImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCCustomModelsImpl.java index daefd4fdb..46fa95958 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/CCCustomModelsImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCCustomModelsImpl.java @@ -1,12 +1,12 @@ -package com.copycatsplus.copycats.forge; +package com.copycatsplus.copycats.neoforge; -import com.copycatsplus.copycats.content.copycat.fluid_pipe.forge.CopycatFluidPipeModelForge; +import com.copycatsplus.copycats.content.copycat.fluid_pipe.neoforge.CopycatFluidPipeModelNeoForge; import com.copycatsplus.copycats.foundation.copycat.model.CopycatModelCore; import net.minecraft.client.resources.model.BakedModel; public class CCCustomModelsImpl { public static BakedModel getFluidPipeModel(BakedModel original, CopycatModelCore copycat, boolean disableAO) { - return new CopycatFluidPipeModelForge(original, copycat, disableAO); + return new CopycatFluidPipeModelNeoForge(original, copycat, disableAO); } } diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/CCKeysImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCKeysImpl.java similarity index 62% rename from forge/src/main/java/com/copycatsplus/copycats/forge/CCKeysImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCKeysImpl.java index 8e3c4925e..e65e60541 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/CCKeysImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CCKeysImpl.java @@ -1,14 +1,14 @@ -package com.copycatsplus.copycats.forge; +package com.copycatsplus.copycats.neoforge; import com.copycatsplus.copycats.CCKeys; import com.copycatsplus.copycats.Copycats; import net.minecraft.client.KeyMapping; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.client.event.RegisterKeyMappingsEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.common.EventBusSubscriber; +import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent; -@Mod.EventBusSubscriber(value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD) +@EventBusSubscriber(modid = Copycats.MODID, bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) public class CCKeysImpl { public static void register() { diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CopycatsClientImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CopycatsClientImpl.java new file mode 100644 index 000000000..6362b21df --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CopycatsClientImpl.java @@ -0,0 +1,20 @@ +package com.copycatsplus.copycats.neoforge; + +import com.copycatsplus.copycats.Copycats; +import com.copycatsplus.copycats.CopycatsClient; +import com.copycatsplus.copycats.foundation.copycat.model.kinetic.RendererReloadCache; +import dev.engine_room.flywheel.api.event.ReloadLevelRendererEvent; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.common.Mod; +import net.neoforged.fml.javafmlmod.FMLModContainer; +import net.neoforged.neoforge.common.NeoForge; + +@Mod(value = Copycats.MODID, dist = Dist.CLIENT) +public class CopycatsClientImpl { + + public CopycatsClientImpl(FMLModContainer container, IEventBus modBus) { + CopycatsClient.init(); + NeoForge.EVENT_BUS.addListener(RendererReloadCache::onReloadLevelRenderer); + } +} diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CopycatsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CopycatsImpl.java new file mode 100644 index 000000000..e3f8f2b96 --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/CopycatsImpl.java @@ -0,0 +1,37 @@ +package com.copycatsplus.copycats.neoforge; + +import com.copycatsplus.copycats.Copycats; +import com.copycatsplus.copycats.compat.Mods; +import com.copycatsplus.copycats.compat.neoforge.AdditionalPlacementsCompatNeoForge; +import com.copycatsplus.copycats.datagen.neoforge.CCDatagenImpl; +import com.copycatsplus.copycats.datagen.recipes.neoforge.CCCraftingConditions; +import com.copycatsplus.copycats.utility.LogicalSidedProvider; +import net.neoforged.bus.api.EventPriority; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.ModContainer; +import net.neoforged.fml.common.Mod; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.event.server.ServerStartingEvent; + +@Mod(Copycats.MODID) +public class CopycatsImpl { + + static IEventBus modBus; + + public CopycatsImpl(IEventBus modBus, ModContainer container) { + CopycatsImpl.modBus = modBus; + Copycats.getRegistrate().registerEventListeners(modBus); + CCCreativeTabsImpl.register(CopycatsImpl.modBus); + Copycats.init(); + + CCCraftingConditions.register(CopycatsImpl.modBus); + NeoForge.EVENT_BUS.addListener(this::serverStarting); + + modBus.addListener(EventPriority.LOWEST, CCDatagenImpl::gatherData); + Mods.ADDITIONAL_PLACEMENTS.executeIfInstalled(() -> AdditionalPlacementsCompatNeoForge::register); + } + + private void serverStarting(ServerStartingEvent event) { + LogicalSidedProvider.setServer(event::getServer); + } +} \ No newline at end of file diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/compat/doubleslabs/DSConfigCommonMixin.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/compat/doubleslabs/DSConfigCommonMixin.java similarity index 95% rename from forge/src/main/java/com/copycatsplus/copycats/forge/mixin/compat/doubleslabs/DSConfigCommonMixin.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/compat/doubleslabs/DSConfigCommonMixin.java index bdf7776e3..e129b34d5 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/compat/doubleslabs/DSConfigCommonMixin.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/compat/doubleslabs/DSConfigCommonMixin.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.forge.mixin.compat.doubleslabs; +package com.copycatsplus.copycats.neoforge.mixin.compat.doubleslabs; import cjminecraft.doubleslabs.common.config.DSConfig; import com.copycatsplus.copycats.compat.Mods; diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/featuretoggle/SubMenuConfigScreenMixin.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/featuretoggle/SubMenuConfigScreenMixin.java similarity index 59% rename from forge/src/main/java/com/copycatsplus/copycats/forge/mixin/featuretoggle/SubMenuConfigScreenMixin.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/featuretoggle/SubMenuConfigScreenMixin.java index 6f1d4e2e2..520f28c92 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/featuretoggle/SubMenuConfigScreenMixin.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/featuretoggle/SubMenuConfigScreenMixin.java @@ -1,19 +1,18 @@ -package com.copycatsplus.copycats.forge.mixin.featuretoggle; +package com.copycatsplus.copycats.neoforge.mixin.featuretoggle; import com.copycatsplus.copycats.Copycats; import com.copycatsplus.copycats.config.CCConfigs; import com.copycatsplus.copycats.network.CCPackets; import com.copycatsplus.copycats.network.ConfigSyncPacket; -import com.copycatsplus.copycats.network.PlayerSelection; -import com.simibubi.create.foundation.config.ui.ConfigScreen; -import com.simibubi.create.foundation.config.ui.SubMenuConfigScreen; +import net.createmod.catnip.config.ui.ConfigScreen; +import net.createmod.catnip.config.ui.SubMenuConfigScreen; import net.minecraft.client.Minecraft; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.common.util.LogicalSidedProvider; -import net.minecraftforge.fml.LogicalSide; -import net.minecraftforge.fml.config.ModConfig; -import net.minecraftforge.fml.loading.FMLEnvironment; -import net.minecraftforge.fml.util.thread.EffectiveSide; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.fml.LogicalSide; +import net.neoforged.fml.config.ModConfig; +import net.neoforged.fml.loading.FMLEnvironment; +import net.neoforged.fml.util.thread.EffectiveSide; +import net.neoforged.neoforge.common.util.LogicalSidedProvider; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -31,7 +30,7 @@ public class SubMenuConfigScreenMixin { private void saveChangesAndRefresh(CallbackInfo ci) { if (ConfigScreen.modID.equals(Copycats.MODID)) { if (EffectiveSide.get().isServer() || FMLEnvironment.dist == Dist.CLIENT && Minecraft.getInstance().hasSingleplayerServer()) - LogicalSidedProvider.WORKQUEUE.get(LogicalSide.SERVER).submit(() -> CCPackets.PACKETS.sendTo(PlayerSelection.all(), new ConfigSyncPacket(CCConfigs.common().getSyncConfig(), ModConfig.Type.COMMON))); + LogicalSidedProvider.WORKQUEUE.get(LogicalSide.SERVER).submit(() -> CCPackets.network().sendToAllClients(new ConfigSyncPacket(CCConfigs.common().getSyncConfig(), ModConfig.Type.COMMON))); } } } diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/CopycatBlockEntityMixin.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/CopycatBlockEntityMixin.java similarity index 77% rename from forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/CopycatBlockEntityMixin.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/CopycatBlockEntityMixin.java index c1cae99e5..09c63e753 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/CopycatBlockEntityMixin.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/CopycatBlockEntityMixin.java @@ -1,20 +1,21 @@ -package com.copycatsplus.copycats.forge.mixin.foundation.copycat; +package com.copycatsplus.copycats.neoforge.mixin.foundation.copycat; import com.copycatsplus.copycats.content.copycat.sliding_door.CopycatSlidingDoorBlockEntity; import com.copycatsplus.copycats.foundation.copycat.CCCopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlockEntity; -import com.copycatsplus.copycats.foundation.copycat.model.forge.CopycatModelForge; +import com.copycatsplus.copycats.foundation.copycat.model.neoforge.CopycatModelNeoForge; import com.copycatsplus.copycats.content.copycat.fluid_pipe.CopycatFluidPipeBlockEntity; import com.copycatsplus.copycats.content.copycat.fluid_pipe.CopycatStraightPipeBlockEntity; import com.copycatsplus.copycats.content.copycat.shaft.CopycatShaftBlockEntity; -import com.copycatsplus.copycats.utility.forge.ModelDataUtils; +import com.copycatsplus.copycats.utility.neoforge.ModelDataUtils; import com.simibubi.create.foundation.blockEntity.SmartBlockEntity; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.data.ModelData; import org.jetbrains.annotations.NotNull; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; /** * Implement platform-specific methods for copycat block entities. @@ -34,12 +35,18 @@ public CopycatBlockEntityMixin(BlockEntityType type, BlockPos pos, BlockState super(type, pos, state); } + @Override + @Unique + public void onLoad() { + super.onLoad(); + } + @Override public @NotNull ModelData getModelData() { return ModelDataUtils.mergeData( super.getModelData(), ModelData.builder() - .with(CopycatModelForge.MATERIAL_PROPERTY, getMaterial()) + .with(CopycatModelNeoForge.MATERIAL_PROPERTY, getMaterial()) .build() ).build(); } diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/CopycatBlockMixin.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/CopycatBlockMixin.java similarity index 81% rename from forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/CopycatBlockMixin.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/CopycatBlockMixin.java index c0c144646..f0dc00a3c 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/CopycatBlockMixin.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/CopycatBlockMixin.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.forge.mixin.foundation.copycat; +package com.copycatsplus.copycats.neoforge.mixin.foundation.copycat; import com.copycatsplus.copycats.content.copycat.button.CopycatButtonBlock; import com.copycatsplus.copycats.content.copycat.door.CopycatDoorBlock; @@ -7,7 +7,6 @@ import com.copycatsplus.copycats.content.copycat.fluid_pipe.CopycatFluidPipeBlock; import com.copycatsplus.copycats.content.copycat.fluid_pipe.CopycatGlassFluidPipeBlock; import com.copycatsplus.copycats.content.copycat.ladder.CopycatLadderBlock; -import com.copycatsplus.copycats.content.copycat.flat_pane.CopycatFlatPaneBlock; import com.copycatsplus.copycats.content.copycat.pane.CopycatPaneBlock; import com.copycatsplus.copycats.content.copycat.pressure_plate.CopycatPressurePlateBlock; import com.copycatsplus.copycats.content.copycat.pressure_plate.CopycatWeightedPressurePlate; @@ -17,26 +16,31 @@ import com.copycatsplus.copycats.content.copycat.trapdoor.CopycatTrapdoorBlock; import com.copycatsplus.copycats.content.copycat.wall.CopycatWallBlock; import com.copycatsplus.copycats.foundation.copycat.CCCopycatBlock; -import com.copycatsplus.copycats.foundation.copycat.CopycatMaterialStore; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.simibubi.create.AllBlocks; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.SpawnPlacements; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.*; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; +import net.neoforged.neoforge.common.world.AuxiliaryLightManager; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; import static com.copycatsplus.copycats.foundation.copycat.ICopycatBlock.getMaterial; @@ -82,9 +86,11 @@ public float getFriction(BlockState state, LevelReader level, BlockPos pos, Enti @Override public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) { - return CopycatMaterialStore.getMaterial(level, pos).left() - .map(material -> material.getLightEmission(level, pos)) - .orElse(super.getLightEmission(state, level, pos)); + AuxiliaryLightManager lightManager = level.getAuxLightManager(pos); + if (lightManager != null) + return lightManager.getLightAt(pos); + + return super.getLightEmission(state, level, pos); } @Override @@ -99,7 +105,7 @@ public float getExplosionResistance(BlockState state, BlockGetter level, BlockPo @SuppressWarnings("deprecation") @Override - public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos, + public ItemStack getCloneItemStack(BlockState state, HitResult target, LevelReader level, BlockPos pos, Player player) { BlockState material = getMaterial(level, pos); if (AllBlocks.COPYCAT_BASE.has(material) || player != null && player.isShiftKeyDown()) @@ -128,12 +134,6 @@ public boolean canEntityDestroy(BlockState state, BlockGetter level, BlockPos po return getMaterial(level, pos).canEntityDestroy(level, pos, entity); } - @Override - public boolean isValidSpawn(BlockState state, BlockGetter level, BlockPos pos, SpawnPlacements.Type type, - EntityType entityType) { - return false; - } - @Override public void fallOn(@NotNull Level pLevel, @NotNull BlockState pState, @NotNull BlockPos pPos, @NotNull Entity pEntity, float p_152430_) { BlockState material = getMaterial(pLevel, pPos); @@ -151,4 +151,24 @@ public float getDestroyProgress(@NotNull BlockState pState, @NotNull Player pPla public BlockState getAppearance(BlockState state, BlockAndTintGetter level, BlockPos pos, Direction side, @Nullable BlockState queryState, @Nullable BlockPos queryPos) { return ICopycatBlock.getAppearance(this, state, level, pos, side, queryState, queryPos); } + + /* + * The following overrides are just to make the compiler happy about this mixin class. + * They do not actually overwrite the corresponding methods. + */ + @Override + @Unique + public abstract BlockState rotate(BlockState state, Rotation rotation); + + @Override + @Unique + public abstract BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror); + + @Override + @Unique + public abstract ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult); + + @Override + @Unique + public abstract InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult); } diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockEntityMixin.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockEntityMixin.java similarity index 80% rename from forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockEntityMixin.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockEntityMixin.java index b402cf290..0e33dbd05 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockEntityMixin.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockEntityMixin.java @@ -1,20 +1,21 @@ -package com.copycatsplus.copycats.forge.mixin.foundation.copycat.multistate; +package com.copycatsplus.copycats.neoforge.mixin.foundation.copycat.multistate; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; import com.copycatsplus.copycats.foundation.copycat.multistate.MultiStateCopycatBlockEntity; import com.copycatsplus.copycats.content.copycat.cogwheel.CopycatCogWheelBlockEntity; -import com.copycatsplus.copycats.utility.forge.ModelDataUtils; +import com.copycatsplus.copycats.utility.neoforge.ModelDataUtils; import com.simibubi.create.foundation.blockEntity.SmartBlockEntity; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.data.ModelData; import org.jetbrains.annotations.NotNull; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; import java.util.Collections; -import static com.copycatsplus.copycats.foundation.copycat.model.forge.CopycatModelForge.MATERIALS_PROPERTY; +import static com.copycatsplus.copycats.foundation.copycat.model.neoforge.CopycatModelNeoForge.MATERIALS_PROPERTY; /** * Implement platform-specific methods for multi-state copycat block entities. @@ -31,6 +32,12 @@ public MultiStateCopycatBlockEntityMixin(BlockEntityType type, BlockPos pos, super(type, pos, state); } + @Override + @Unique + public void onLoad() { + super.onLoad(); + } + @Override public @NotNull ModelData getModelData() { return ModelDataUtils.mergeData( diff --git a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockMixin.java b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockMixin.java similarity index 87% rename from forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockMixin.java rename to neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockMixin.java index 32157c01b..948f7c588 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/forge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockMixin.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/neoforge/mixin/foundation/copycat/multistate/MultiStateCopycatBlockMixin.java @@ -1,6 +1,5 @@ -package com.copycatsplus.copycats.forge.mixin.foundation.copycat.multistate; +package com.copycatsplus.copycats.neoforge.mixin.foundation.copycat.multistate; -import com.copycatsplus.copycats.foundation.copycat.CopycatMaterialStore; import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlock; import com.copycatsplus.copycats.foundation.copycat.multistate.IMultiStateCopycatBlockEntity; @@ -11,27 +10,25 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.SpawnPlacements; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.*; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.*; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; -import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.extensions.IForgeBlock; +import net.neoforged.neoforge.common.extensions.IBlockExtension; +import net.neoforged.neoforge.common.world.AuxiliaryLightManager; import org.jetbrains.annotations.NotNull; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Pseudo; +import org.spongepowered.asm.mixin.Unique; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; /** @@ -44,7 +41,7 @@ CopycatCogWheelBlock.class }) @Pseudo -public abstract class MultiStateCopycatBlockMixin extends Block implements IForgeBlock, IMultiStateCopycatBlock { +public abstract class MultiStateCopycatBlockMixin extends Block implements IBlockExtension, IMultiStateCopycatBlock { public MultiStateCopycatBlockMixin(Properties properties) { super(properties); @@ -90,19 +87,11 @@ public float getFriction(BlockState state, LevelReader level, BlockPos pos, Enti @Override public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) { - if (state.getBlock() instanceof IMultiStateCopycatBlock copycatBlock) { - AtomicInteger light = new AtomicInteger(0); + AuxiliaryLightManager lightManager = level.getAuxLightManager(pos); + if (lightManager != null) + return lightManager.getLightAt(pos); - Map materials = CopycatMaterialStore.getMaterial(level, pos).right().orElse(null); - if (materials == null) - return super.getLightEmission(state, level, pos); - materials.forEach((key, bs) -> { - light.accumulateAndGet(bs.getLightEmission(), Math::max); - }); - return light.get(); - } else { - return super.getLightEmission(state, level, pos); - } + return super.getLightEmission(state, level, pos); } @Override @@ -123,7 +112,7 @@ public float getExplosionResistance(BlockState state, BlockGetter level, BlockPo } @Override - public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos, + public ItemStack getCloneItemStack(BlockState state, HitResult target, LevelReader level, BlockPos pos, Player player) { String property = target == null ? null @@ -181,12 +170,6 @@ public float getEnchantPowerBonus(BlockState state, LevelReader level, BlockPos } } - @Override - public boolean isValidSpawn(BlockState state, BlockGetter level, BlockPos pos, SpawnPlacements.Type type, - EntityType entityType) { - return false; - } - @Override public void fallOn(@NotNull Level pLevel, @NotNull BlockState state, @NotNull BlockPos pPos, @NotNull Entity pEntity, float p_152430_) { if (state.getBlock() instanceof IMultiStateCopycatBlock copycatBlock) { @@ -226,4 +209,24 @@ public float getDestroyProgress(@NotNull BlockState pState, @NotNull Player pPla public BlockState getAppearance(BlockState state, BlockAndTintGetter renderView, BlockPos pos, Direction side, @org.jetbrains.annotations.Nullable BlockState sourceState, @org.jetbrains.annotations.Nullable BlockPos sourcePos) { return IMultiStateCopycatBlock.getAppearance(this, state, renderView, pos, side, sourceState, sourcePos); } + + /* + * The following overrides are just to make the compiler happy about this mixin class. + * They do not actually overwrite the corresponding methods. + */ + @Override + @Unique + public abstract BlockState rotate(BlockState state, Rotation rotation); + + @Override + @Unique + public abstract BlockState mirror(@NotNull BlockState pState, @NotNull Mirror pMirror); + + @Override + @Unique + public abstract ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult); + + @Override + @Unique + public abstract InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult); } diff --git a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/BlockEntityUtilsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/BlockEntityUtilsImpl.java similarity index 81% rename from forge/src/main/java/com/copycatsplus/copycats/utility/forge/BlockEntityUtilsImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/BlockEntityUtilsImpl.java index de7843b61..050104f2d 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/BlockEntityUtilsImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/BlockEntityUtilsImpl.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.utility.forge; +package com.copycatsplus.copycats.utility.neoforge; import net.minecraft.world.level.block.entity.BlockEntity; diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/InteractionUtilsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/InteractionUtilsImpl.java new file mode 100644 index 000000000..2030a11b0 --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/InteractionUtilsImpl.java @@ -0,0 +1,12 @@ +package com.copycatsplus.copycats.utility.neoforge; + +import net.minecraft.world.entity.ai.attributes.AttributeInstance; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.player.Player; + +public class InteractionUtilsImpl { + + public static AttributeInstance getPlayerReach(Player player) { + return player.getAttribute(Attributes.BLOCK_INTERACTION_RANGE); + } +} diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/ItemUtilsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/ItemUtilsImpl.java new file mode 100644 index 000000000..377aef2d3 --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/ItemUtilsImpl.java @@ -0,0 +1,16 @@ +package com.copycatsplus.copycats.utility.neoforge; + +import net.minecraft.core.HolderLookup; +import net.minecraft.nbt.Tag; +import net.minecraft.world.item.ItemStack; + +public class ItemUtilsImpl { + + public static ItemStack copyStackWithSize(ItemStack itemStack, int size) { + return itemStack.copyWithCount(size); + } + + public static Tag serializeNBT(ItemStack stack, HolderLookup.Provider registries) { + return stack.saveOptional(registries); + } +} diff --git a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/ModelDataUtils.java b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/ModelDataUtils.java similarity index 78% rename from forge/src/main/java/com/copycatsplus/copycats/utility/forge/ModelDataUtils.java rename to neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/ModelDataUtils.java index 5810d7e8a..2cb314002 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/ModelDataUtils.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/ModelDataUtils.java @@ -1,7 +1,8 @@ -package com.copycatsplus.copycats.utility.forge; +package com.copycatsplus.copycats.utility.neoforge; -import net.minecraftforge.client.model.data.ModelData; -import net.minecraftforge.client.model.data.ModelProperty; + +import net.neoforged.neoforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.data.ModelProperty; public class ModelDataUtils { public static ModelData.Builder mergeData(ModelData data1, ModelData data2) { diff --git a/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/NBTUtilsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/NBTUtilsImpl.java new file mode 100644 index 000000000..9431802c2 --- /dev/null +++ b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/NBTUtilsImpl.java @@ -0,0 +1,12 @@ +package com.copycatsplus.copycats.utility.neoforge; + +import net.minecraft.core.HolderLookup; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.item.ItemStack; + +public class NBTUtilsImpl { + + public static CompoundTag serializeStack(ItemStack stack, HolderLookup.Provider registries) { + return (CompoundTag) stack.saveOptional(registries); + } +} diff --git a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/PlatformEnvironmentImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/PlatformEnvironmentImpl.java similarity index 63% rename from forge/src/main/java/com/copycatsplus/copycats/utility/forge/PlatformEnvironmentImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/PlatformEnvironmentImpl.java index cf841d3dc..c1f901872 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/PlatformEnvironmentImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/PlatformEnvironmentImpl.java @@ -1,8 +1,8 @@ -package com.copycatsplus.copycats.utility.forge; +package com.copycatsplus.copycats.utility.neoforge; import com.copycatsplus.copycats.utility.Platform; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.fml.loading.FMLEnvironment; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.fml.loading.FMLEnvironment; public class PlatformEnvironmentImpl { diff --git a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/PlatformImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/PlatformImpl.java similarity index 60% rename from forge/src/main/java/com/copycatsplus/copycats/utility/forge/PlatformImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/PlatformImpl.java index daee4be19..59c12fdd1 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/PlatformImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/PlatformImpl.java @@ -1,11 +1,11 @@ -package com.copycatsplus.copycats.utility.forge; +package com.copycatsplus.copycats.utility.neoforge; import com.copycatsplus.copycats.utility.Platform; public class PlatformImpl { public static Platform getCurrent() { - return Platform.FORGE; + return Platform.NEOFORGE; } } diff --git a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/TooltipUtilsImpl.java b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/TooltipUtilsImpl.java similarity index 88% rename from forge/src/main/java/com/copycatsplus/copycats/utility/forge/TooltipUtilsImpl.java rename to neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/TooltipUtilsImpl.java index dd44e585f..2e6bec0b8 100644 --- a/forge/src/main/java/com/copycatsplus/copycats/utility/forge/TooltipUtilsImpl.java +++ b/neoforge/src/main/java/com/copycatsplus/copycats/utility/neoforge/TooltipUtilsImpl.java @@ -1,4 +1,4 @@ -package com.copycatsplus.copycats.utility.forge; +package com.copycatsplus.copycats.utility.neoforge; import com.simibubi.create.foundation.item.TooltipModifier; import org.jetbrains.annotations.NotNull; 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 000000000..a6652c099 --- /dev/null +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -0,0 +1,39 @@ +modLoader="javafml" +loaderVersion="${neoforge_loader_version_range}" +license="${mod_license}" +issueTrackerURL="${mod_issues}" +[[mods]] + modId="${archives_base_name}" + version="${version}" + displayName="${mod_name}" + updateJSONURL="https://raw.githubusercontent.com/copycats-plus/copycats/multiloader/update.json" + displayURL="${mod_url}" + logoFile="copycats_icon.png" + credits="${mod_credits}" + authors="${mod_authors}" + description='''${mod_description}''' + +[[dependencies.${archives_base_name}]] + modId="neoforge" + mandatory=true + versionRange="${neoforge_version_range}" + ordering="NONE" + side="BOTH" +[[dependencies.${archives_base_name}]] + modId="minecraft" + mandatory=true + versionRange="${minecraft_version_range}" + ordering="NONE" + side="BOTH" +[[dependencies.${archives_base_name}]] + modId="create" + mandatory=true + versionRange="${create_neoforge_range}" + ordering="NONE" + side="BOTH" + +[[mixins]] +config = "copycats-common.mixins.json" + +[[mixins]] +config = "copycats-neoforge.mixins.json" diff --git a/forge/src/main/resources/copycats-forge.mixins.json b/neoforge/src/main/resources/copycats-neoforge.mixins.json similarity index 59% rename from forge/src/main/resources/copycats-forge.mixins.json rename to neoforge/src/main/resources/copycats-neoforge.mixins.json index 199540782..4e4425643 100644 --- a/forge/src/main/resources/copycats-forge.mixins.json +++ b/neoforge/src/main/resources/copycats-neoforge.mixins.json @@ -1,21 +1,18 @@ { "required": true, "minVersion": "0.8", - "package": "com.copycatsplus.copycats.forge.mixin", + "package": "com.copycatsplus.copycats.neoforge.mixin", "plugin": "com.copycatsplus.copycats.mixin.MixinPlugin", "compatibilityLevel": "JAVA_17", "mixins": [ "compat.doubleslabs.DSConfigCommonMixin", - "compat.registrate.CreateRegistrateMixin", "foundation.copycat.CopycatBlockEntityMixin", "foundation.copycat.CopycatBlockMixin", "foundation.copycat.multistate.MultiStateCopycatBlockEntityMixin", - "foundation.copycat.multistate.MultiStateCopycatBlockMixin", - "network.ServerGamePacketListenerImplMixin" + "foundation.copycat.multistate.MultiStateCopycatBlockMixin" ], "client": [ - "featuretoggle.SubMenuConfigScreenMixin", - "network.ClientPacketListenerMixin" + "featuretoggle.SubMenuConfigScreenMixin" ], "injectors": { "defaultRequire": 1 diff --git a/forge/src/main/resources/pack.mcmeta b/neoforge/src/main/resources/pack.mcmeta similarity index 66% rename from forge/src/main/resources/pack.mcmeta rename to neoforge/src/main/resources/pack.mcmeta index 28e23409f..54ad97c59 100644 --- a/forge/src/main/resources/pack.mcmeta +++ b/neoforge/src/main/resources/pack.mcmeta @@ -2,6 +2,6 @@ "pack": { "description": "Copycats resources", "pack_format": 15, - "forge:server_data_pack_format": 12 + "neoforge:server_data_pack_format": 12 } } diff --git a/settings.gradle b/settings.gradle index 06a89e44e..171f221f8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,10 +3,11 @@ pluginManagement { maven { url "https://maven.fabricmc.net/" } maven { url "https://maven.architectury.dev/" } maven { url "https://maven.minecraftforge.net/" } + maven { url "https://maven.neoforged.net/releases/" } gradlePluginPortal() } } include("common") include("fabric") -include("forge") \ No newline at end of file +include("neoforge") \ No newline at end of file