diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 20e8e50a..a04f63ca 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -8,7 +8,7 @@ jobs: name: "Codecov" steps: - uses: actions/checkout@v4 - - name: Setup java + - name: Setup java 17 uses: actions/setup-java@v3 with: distribution: "temurin" @@ -16,7 +16,7 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build project - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v2.9.0 with: arguments: test jacocoTestReport - name: Upload coverage reports to Codecov diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ec716ec0..37607a9f 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -5,9 +5,9 @@ name: Java CI on: push: - branches: [ main, 1.20.1 ] + branches: [ main ] pull_request: - branches: [ main, 1.20.1 ] + branches: [ main ] jobs: build: @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: java-version: '17' @@ -23,7 +23,7 @@ jobs: - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1 - name: Build with Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v2.9.0 with: arguments: build - uses: actions/upload-artifact@v3 diff --git a/.github/workflows/page.yml b/.github/workflows/page.yml new file mode 100644 index 00000000..a7e371b4 --- /dev/null +++ b/.github/workflows/page.yml @@ -0,0 +1,42 @@ +name: Generate dokka github pages + +on: + push: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: temurin + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Generate documentation directory + uses: gradle/gradle-build-action@v2.9.0 + with: + arguments: dokkaHtml + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./build/dokka/html + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@main \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 3c5ce708..00000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. -# -# You can adjust the behavior by modifying this file. -# For more information, see: -# https://github.com/actions/stale -name: Mark stale issues and pull requests - -on: - schedule: - - cron: '0 7 * * *' - -jobs: - stale: - - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - - steps: - - uses: actions/stale@v8 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue is stale because it has been open 40 days with no activity. Remove stale label or comment or this will be closed in 5 days.' - stale-pr-message: 'This pull request is stale because it has been open 40 days with no activity. Remove stale label or comment or this will be closed in 5 days.' - close-issue-label: 'inactivity-closed' - close-pr-label: 'inactivity-closed' - days-before-stale: 40 - days-before-close: 5 diff --git a/.gitignore b/.gitignore index 8f81c1b6..2ff9efb8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ ### ForgeGradle ### # Minecraft client/server files run/ +run-data/ ### Intellij+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider diff --git a/CHANGELOG.md b/CHANGELOG.md index c471d88a..bd101d02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. +## [1.20.1-1.0.6] - 2023-10-13 + +### Added Ingot Fusion Enchanter (been in the works for a month with more than two rewrites) : +### This allows you to upgrade certain items. Currently only works with the MAGMA_STRIKE_PICKAXE. More to come in the future. +### Added imperium sword, pickaxe, axe, ingot and ore. More to come in the future. +### Added saphire tool recipes to the tool crafting table. +### Fixed issue with JEI for custom crafting tables where some recipes were not showing. +### Added support for enchanted items to be crafted in the custom crafting tables. +### Fixed some other issues I came across while testing. + ## [1.20.1-1.0.5] - 2023-09-26 ### Added JEI integration for custom crafting tables. @@ -13,8 +23,8 @@ All notable changes to this project will be documented in this file. ## [1.20.1-1.0.3] - 2023-9-23 -### Add advancments for root and ruby. More to come in future. -### Switched some recipies to use tags instead of specific items. This will allow for more flexability in future. +### Add advancements for root and ruby. More to come in the future. +### Switched some recipes to use tags instead of specific items. This will allow for more flexibility in the future. ## [1.20.1-1.0.2] - 2023-9-3 @@ -41,16 +51,16 @@ All notable changes to this project will be documented in this file. ### Added enderite ore, block, ingot, tools and armour. Thx to redrosewarrior1 for some of the textures. ### Rainbow armour now has a texture. Thx to redrosewarrior1 for the textures. ### Known issue with ore generation. Will be fixed in future. -### Fixed issue where nothing was craftable in tool crafting table. -### Fixed issue where the crafting book gave the wrong patern for recipes in both armour and tool crafting tables. +### Fixed issue where nothing was craft-able in tool crafting table. +### Fixed issue where the crafting book gave the wrong pattern for recipes in both armor and tool crafting tables. ### Fixed issue were stats for tools such as attack damage where incorrect. ## [1.19.4-1.0.0.beta.6] - 2023-7-20 -### Added missing recipe for tool crafting table -### Added all tool set for ruby +### Added a missing recipe for tool crafting table +### Added all tool sets for ruby ### Added aquarium trident. - Textures not added yet. -### Added shields for all custom ores. - Textures not added yet. +### Added shields for all custom ores. — Textures aren't added yet. ## [1.19.4-1.0.0.beta.5] - 2023-5-3 @@ -63,7 +73,7 @@ All notable changes to this project will be documented in this file. ## [1.19.4-1.0.0.beta.3] - 2023-4-25 -### Bug fixe where game crashed due to outdated patchouli version +### Bug fixe where game crashed due to an outdated patchouli version ### Added new custom tool table ## [1.19.4-1.0.0.beta.2] - 2023-4-17 @@ -120,5 +130,5 @@ All notable changes to this project will be documented in this file. ### I fixed a lot of bugs. ### Create menu should now appear with properly formatted names for each item/block. ### Ignore the warning when starting. The issue will be fixed in due course. -### I switched from Java to Kotlin. Does not affect you. +### I switched from Java to Kotlin. It Does not affect you. ### Now required kotlin for forge \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index a31af7c1..55199d3c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,11 +1,18 @@ import io.gitlab.arturbosch.detekt.Detekt +import java.net.URL import net.minecraftforge.gradle.userdev.UserDevExtension +import org.jetbrains.dokka.base.DokkaBase +import org.jetbrains.dokka.base.DokkaBaseConfiguration +import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.gradle.tasks.KotlinCompile buildscript { repositories { mavenCentral() } - dependencies { classpath("io.github.realyusufismail:jconfig:1.0.8") } + dependencies { + classpath("org.jetbrains.dokka:dokka-base:1.9.0") + classpath("io.github.realyusufismail:jconfig:1.0.8") + } } plugins { @@ -16,6 +23,7 @@ plugins { id("org.parchmentmc.librarian.forgegradle") version "1.+" id("io.gitlab.arturbosch.detekt") version "1.23.0" id("net.darkhax.curseforgegradle") version "1.1.16" + id("org.jetbrains.dokka") version "1.9.0" jacoco // code coverage reports } @@ -129,6 +137,8 @@ configure { } } +configurations { compileOnly { extendsFrom(configurations.annotationProcessor.get()) } } + sourceSets.main { resources.srcDir("src/generated/resources") } repositories { @@ -155,6 +165,10 @@ dependencies { compileOnly(fg.deobf("mezz.jei:jei-${mcVersion}-common-api:" + properties["jeiVersion"])) compileOnly(fg.deobf("mezz.jei:jei-${mcVersion}-forge-api:" + properties["jeiVersion"])) runtimeOnly(fg.deobf("mezz.jei:jei-${mcVersion}-forge:" + properties["jeiVersion"])) + + // lombok + compileOnly("org.projectlombok:lombok:" + properties["lombokVersion"]) + annotationProcessor("org.projectlombok:lombok:" + properties["lombokVersion"]) } tasks.test { @@ -198,6 +212,33 @@ spotless { indentWithSpaces() endWithNewline() } + + java { + target("**/*.java") + googleJavaFormat() + trimTrailingWhitespace() + indentWithSpaces() + endWithNewline() + licenseHeader( + """/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ """) + } } tasks.javadoc { @@ -269,3 +310,29 @@ tasks.create("cfPublish", net.darkhax.curseforgegradle.TaskPublishCurseForge::cl mainFile.addModLoader("forge") mainFile.addGameVersion(mcVersion) } + +tasks.getByName("dokkaHtml", DokkaTask::class) { + dokkaSourceSets.configureEach { + includes.from("README.md") + jdkVersion.set(17) + sourceLink { + localDirectory.set(file("src/main/kotlin")) + remoteUrl.set( + URL( + "https://github.com/RealYusufIsmail-Mc-Mods/Armour-and-Tools-Mod/blob/main/src/main/kotlin")) + remoteLineSuffix.set("#L") + } + + sourceLink { + localDirectory.set(file("src/main/java")) + remoteUrl.set( + URL( + "https://github.com/RealYusufIsmail-Mc-Mods/Armour-and-Tools-Mod/blob/main/src/main/java")) + remoteLineSuffix.set("#L") + } + + pluginConfiguration { + footerMessage = "Copyright © 2023 RealYusufIsmail MC Mods" + } + } +} diff --git a/gradle.properties b/gradle.properties index 7ca6c0db..1df42ef8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,4 +7,5 @@ kotlinForForgeVersion = 4.4.0 logbackVersion = 1.4.11 junitVersion = 5.10.0 coreVersion = 1.20.1-1.0.1 -jeiVersion = 15.2.0.27 \ No newline at end of file +jeiVersion = 15.2.0.27 +lombokVersion = 1.18.30 \ No newline at end of file diff --git a/gradle/config/detekt.yml b/gradle/config/detekt.yml index 10f3f57b..b411f941 100644 --- a/gradle/config/detekt.yml +++ b/gradle/config/detekt.yml @@ -129,7 +129,7 @@ complexity: active: false threshold: 60 LongParameterList: - active: true + active: false functionThreshold: 6 constructorThreshold: 10 ignoreDefaultParameters: false diff --git a/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 index 69b04235..9d4e46a1 100644 --- a/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 +++ b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 @@ -1,13 +1,15 @@ -// 1.20.1 2023-09-03T09:44:53.454996 Registries +// 1.20.1 2023-10-12T22:09:59.3276706 Registries 8ebeb9bcc133ba172a3775d0e796bc03967d305e data/armourandtoolsmod/worldgen/configured_feature/aqumarine_ore.json efcff90a0c2ce2de5ad73b08e38af0880ff404de data/armourandtoolsmod/worldgen/configured_feature/enderite_ore.json b77f5a337f5557cc75c6aa6e358f59b658ba914c data/armourandtoolsmod/worldgen/configured_feature/graphite_ore.json +3586104847bae073d8ffda6725cfe9f65fd3db37 data/armourandtoolsmod/worldgen/configured_feature/imperium_ore.json b6141dbad16c493a2dd3da977a099762593c0ce1 data/armourandtoolsmod/worldgen/configured_feature/rainbow_ore.json 3057438b0a0e49c8fa64f17eca031307d1247594 data/armourandtoolsmod/worldgen/configured_feature/ruby_ore.json ae5ee97a8e0db56c8b686c63d73efad162974df7 data/armourandtoolsmod/worldgen/configured_feature/sapphire_ore.json f27642c578ca288c102d5a06421fcd879102fd7a data/armourandtoolsmod/worldgen/placed_feature/aqumarine_ore.json a0c79f9bf1ba7248cab71480bb71041682400cdd data/armourandtoolsmod/worldgen/placed_feature/enderite_ore.json 65608a650f79607aeb96f0ad3ed9a099f59aec67 data/armourandtoolsmod/worldgen/placed_feature/graphite_ore.json +c8eccb16b2db153e5902b8c8ab07a2a7f51a2f36 data/armourandtoolsmod/worldgen/placed_feature/imperium_ore.json c784f4c858f7b80fcc27ca88c8f80774bfa35b23 data/armourandtoolsmod/worldgen/placed_feature/rainbow_ore.json 7bb425cc1128f1c7cce61f9ef23b30e7bf3b3331 data/armourandtoolsmod/worldgen/placed_feature/ruby_ore.json ed58618a3af3d63c835c2a5dccff501b8272f323 data/armourandtoolsmod/worldgen/placed_feature/sapphire_ore.json diff --git a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d index d4cfbde3..79ccde6c 100644 --- a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d +++ b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d @@ -1,10 +1,11 @@ -// 1.20.1 2023-08-28T05:16:02.6192725 Loot Tables +// 1.20.1 2023-10-12T22:09:59.3226175 Loot Tables 2898515efda3fb01ac7eb6337875f6310869a683 data/armourandtoolsmod/loot_tables/blocks/aqumarine_block.json 1efb52b906488da11f7948ed6a21285c1ae085c5 data/armourandtoolsmod/loot_tables/blocks/aqumarine_ore.json 0f854404a05c040106f826bf3e6eb1debb2b8513 data/armourandtoolsmod/loot_tables/blocks/custom_armour_crafting_table.json 56189365fbfbeedbc9086e95af54637dc1288e25 data/armourandtoolsmod/loot_tables/blocks/custom_tool_crafting_table.json 037852d2164bc89fdf7eec7ca820d976bfb8cf00 data/armourandtoolsmod/loot_tables/blocks/deepslate_aqumarine_ore.json 052b565467fcb498276abcd82329fa8e9f3dac0c data/armourandtoolsmod/loot_tables/blocks/deepslate_graphite_ore.json +c80a43cdf06bb47f0ea5ac5792cff47d6dd1365a data/armourandtoolsmod/loot_tables/blocks/deepslate_imperium_ore.json 5b1d35ef7749092a2048ab38bc74861db42d08d9 data/armourandtoolsmod/loot_tables/blocks/deepslate_rainbow_ore.json 353b1fcc43692ef4d531d28725c0cbae9f21beed data/armourandtoolsmod/loot_tables/blocks/deepslate_ruby_ore.json 5152d7bfc26caa8fbafd7d728a3bde94f17071f1 data/armourandtoolsmod/loot_tables/blocks/deepslate_sapphire_ore.json @@ -12,6 +13,8 @@ ee3c7cea455b43662bb85c65ba097a66fad15e2b data/armourandtoolsmod/loot_tables/bloc 0a1baaef0c26d8186cfebd9b5f7e8a319d14187d data/armourandtoolsmod/loot_tables/blocks/enderite_ore.json baf5c9934dbe9336e2362956ea6223cd4f067fd5 data/armourandtoolsmod/loot_tables/blocks/graphite_block.json 4e4d7f9e13f901fe3ae5ca406313f683dda24fbb data/armourandtoolsmod/loot_tables/blocks/graphite_ore.json +17468a98a420053cfde63911493d9289cffa48f4 data/armourandtoolsmod/loot_tables/blocks/imperium_ore.json +e71ceb5931a3484e4792e6c73a0f9ff13d769c6f data/armourandtoolsmod/loot_tables/blocks/ingot_fusion_toll_enhancer.json be352efe18892a6d569480eb2c34423ab7e8f199 data/armourandtoolsmod/loot_tables/blocks/rainbow_block.json 8c9c9a72eb8e8424e527174afee3bee8f54a6c0d data/armourandtoolsmod/loot_tables/blocks/rainbow_ore.json 1b4f1728a73c79f1834e8d896bd7af391a8782ac data/armourandtoolsmod/loot_tables/blocks/ruby_block.json diff --git a/src/generated/resources/.cache/9cedfe5b9b9b8fb51ee0cbcde6ee21cf9da7c57c b/src/generated/resources/.cache/9cedfe5b9b9b8fb51ee0cbcde6ee21cf9da7c57c index 646b505c..fc163805 100644 --- a/src/generated/resources/.cache/9cedfe5b9b9b8fb51ee0cbcde6ee21cf9da7c57c +++ b/src/generated/resources/.cache/9cedfe5b9b9b8fb51ee0cbcde6ee21cf9da7c57c @@ -1,6 +1,7 @@ -// 1.20.1 2023-08-28T05:16:02.6122709 Tags for minecraft:block mod id armourandtoolsmod +// 1.20.1 2023-10-12T22:09:59.3123883 Tags for minecraft:block mod id armourandtoolsmod f4e0d28b203a60fd241885a727654636c8762650 data/forge/tags/blocks/deepslate_ores/aqumarine_ores.json 186e50e522fb2ae91c6e315a523523796b105b56 data/forge/tags/blocks/deepslate_ores/graphite_ores.json +08f48b19390eb9e06478f989851d261c8cb384a4 data/forge/tags/blocks/deepslate_ores/imperium_ores.json d66c065dfb98375b77835223afe692a26c7be84b data/forge/tags/blocks/deepslate_ores/rainbow_ores.json cd94fb683ebafe1cbde0ba3a30280d57b587fc34 data/forge/tags/blocks/deepslate_ores/ruby_ores.json 6a274e766194dfaf9c967be14c4b26a4ff637a8b data/forge/tags/blocks/deepslate_ores/sapphire_ores.json @@ -8,6 +9,7 @@ f773a519f0e034a7e3ca24464a8b960396d4da4c data/forge/tags/blocks/needs_gold_tool. 1372356eb4655b6d26d8a5a16aaa3032bbb738d4 data/forge/tags/blocks/ores/aqumarine_ores.json fef5965e3903fc07aa6146bd17e74efd9b313fb6 data/forge/tags/blocks/ores/enderite_ores.json 974c70b44df044135463b300ebed43eee38001b3 data/forge/tags/blocks/ores/graphite_ores.json +e892786d477f668113418b8239abc7bb6395f33f data/forge/tags/blocks/ores/imperium_ores.json fa835a8b8eb217767d6139f02c46edfa27377555 data/forge/tags/blocks/ores/rainbow_ores.json f5b270d5c60fdfc53020be6469026c27bc742f1e data/forge/tags/blocks/ores/ruby_ores.json 47d725a30030287aa216532b38ba1d0774dd627f data/forge/tags/blocks/ores/sapphire_ores.json @@ -17,7 +19,7 @@ b4f0641534858a5001fc966241f11ffc58353dea data/forge/tags/blocks/storage_blocks/a 55c124f845d639b73cb5bffcdcc94bcfd8967966 data/forge/tags/blocks/storage_blocks/rainbow.json bc5ebfcaf115155b63f0817517bdc3efc0934364 data/forge/tags/blocks/storage_blocks/ruby.json 2e755598d83145bf0d52488c9d8e3c41331dccc3 data/forge/tags/blocks/storage_blocks/sapphire.json -e02f0a033c0eb74be90322606c5f21845d302cf1 data/minecraft/tags/blocks/mineable/pickaxe.json +a5acd6d8f782164d765c73d2438d0289b32f2bcd data/minecraft/tags/blocks/mineable/pickaxe.json 98eed05f65788348c30e906407f790c6a4d70f32 data/minecraft/tags/blocks/needs_diamond_tool.json -305db57c519bc4cfa07a662c8beeffec12ffac38 data/minecraft/tags/blocks/needs_iron_tool.json +7f6f40bd05ba0003ea6e54eee50655a1d2fc1fcb data/minecraft/tags/blocks/needs_iron_tool.json a9b03e3b99a673d01bb7413cc6092c7a9b5be634 data/minecraft/tags/blocks/needs_stone_tool.json diff --git a/src/generated/resources/.cache/9f61bb65fbe4cfb8a15e0d3253c99409d3dd169b b/src/generated/resources/.cache/9f61bb65fbe4cfb8a15e0d3253c99409d3dd169b index 2c26027e..0678f642 100644 --- a/src/generated/resources/.cache/9f61bb65fbe4cfb8a15e0d3253c99409d3dd169b +++ b/src/generated/resources/.cache/9f61bb65fbe4cfb8a15e0d3253c99409d3dd169b @@ -1,4 +1,4 @@ -// 1.20.1 2023-09-24T20:24:31.0315422 Item Models: armourandtoolsmod +// 1.20.1 2023-10-12T22:09:59.3196167 Item Models: armourandtoolsmod 6fdab53e9321f76ef7edd0a135b6879656abdad7 assets/armourandtoolsmod/models/item/amethyst_axe.json f523d3f594a0d1a51fb553f028ab2b20eee793dd assets/armourandtoolsmod/models/item/amethyst_boots.json 8377e984c59ebdaa220b7d1c0973dfd4653e52fb assets/armourandtoolsmod/models/item/amethyst_chestplate.json @@ -34,6 +34,10 @@ a999cd10ee1b427640b86cb303e4b33cbd82cfa8 assets/armourandtoolsmod/models/item/gr 7f03d28ac4363abcd78d60dee0823ebcbdbe4848 assets/armourandtoolsmod/models/item/graphite_leggings.json 2aecba55504a8f58919a7ed564db44ac4a46cf40 assets/armourandtoolsmod/models/item/graphite_shield.json 6bd7890815727bba27c0471942890c4044023bf4 assets/armourandtoolsmod/models/item/graphite_shield_blocking.json +c689e4209f0c9c5d72a90efb880fda6fa5de4119 assets/armourandtoolsmod/models/item/imperium.json +b9bf414d688bbea27c22d22470fb3119ab3820c0 assets/armourandtoolsmod/models/item/imperium_pickaxe.json +205f8bdfd7249defd6d60e27deed940842c6650b assets/armourandtoolsmod/models/item/imperium_sword.json +585fa6ddfbf0355703c29b0cb9c14b985f3fe6cd assets/armourandtoolsmod/models/item/magma_strike_pickaxe.json 62517ca368679b6de05f59df5cf0ba2be1600829 assets/armourandtoolsmod/models/item/rainbow.json e7a2dce51d378c49e596294d6ea2bf6f8d5bf6a2 assets/armourandtoolsmod/models/item/rainbow_boots.json 790e68bc582401a2289e8be785368d04c946185c assets/armourandtoolsmod/models/item/rainbow_chestplate.json @@ -44,6 +48,7 @@ e7a2dce51d378c49e596294d6ea2bf6f8d5bf6a2 assets/armourandtoolsmod/models/item/ra 33b68057db18389d58595a300e616f0e1f848ada assets/armourandtoolsmod/models/item/raw_aqumarine.json e2e4e00dea2145b5ae54560c28a85eae2bf5bed5 assets/armourandtoolsmod/models/item/raw_enderite.json 68070919d55c07e9e09eb39a3a50362475cfcc14 assets/armourandtoolsmod/models/item/raw_graphite.json +3061dcb2768b3fb493283254c3ba51bb39d60f79 assets/armourandtoolsmod/models/item/raw_imperium.json 073845b113c727ef0adce18c38781aa211ab8867 assets/armourandtoolsmod/models/item/raw_rainbow.json 40dd62b983e59172e5640256e298c1ab3704de25 assets/armourandtoolsmod/models/item/raw_ruby.json 7321aefdabda17126533ee833870352ecb756978 assets/armourandtoolsmod/models/item/raw_sapphire.json diff --git a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e index e28b98f8..ab0d2584 100644 --- a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -1,9 +1,10 @@ -// 1.20.1 2023-09-24T20:24:31.0366423 Recipes +// 1.20.1 2023-10-13T09:46:45.7593442 Recipes 64b2fa52dbca9188c5fed6b3a1d1426c2b380ed1 data/armourandtoolsmod/advancements/recipes/building_blocks/aqumarine_block_recipe.json 7d54606f53db4f400123dfb6907c02f087b53786 data/armourandtoolsmod/advancements/recipes/building_blocks/custom_armour_crafting_table_recipe.json 9c72e5c5a44803c45a34320f73263008e4bada72 data/armourandtoolsmod/advancements/recipes/building_blocks/custom_tool_crafting_table_recipe.json b1fa135141f599ea4d7fab4f77cd7aae863f0819 data/armourandtoolsmod/advancements/recipes/building_blocks/enderite_block_recipe.json 1acc3f7f2761775fc7efe033dd5b77393a66ca9d data/armourandtoolsmod/advancements/recipes/building_blocks/graphite_block_recipe.json +ccb320284e7430286cffdffd1a9ce9b6babe48f6 data/armourandtoolsmod/advancements/recipes/building_blocks/ingot_fusion_toll_enhancer_recipe.json c7a9daf7e9793d66f69bdfd53a8e535251b0a75c data/armourandtoolsmod/advancements/recipes/building_blocks/rainbow_block_recipe.json a1191d311fcf166617e619855f1c89f218ed3d0a data/armourandtoolsmod/advancements/recipes/building_blocks/ruby_block_recipe.json 4e2d078faefa50aebd181dcc29d0c0d22e75bff4 data/armourandtoolsmod/advancements/recipes/building_blocks/sapphire_block_recipe.json @@ -44,6 +45,7 @@ c642de905ce8e6b87d8d9c6a776480d5d5335646 data/armourandtoolsmod/advancements/rec 1da9de6c6a5c07dc66b392bb507a437a3a2086b9 data/armourandtoolsmod/advancements/recipes/misc/blasting_aqumarine_trident.json 8b7f09c2641f571163d351d1e7d12d0002fe821a data/armourandtoolsmod/advancements/recipes/misc/blasting_deepslate_aqumarine_ore.json c9f89ed0c1cf85b7d741006f820f59445b6570eb data/armourandtoolsmod/advancements/recipes/misc/blasting_deepslate_graphite_ore.json +94d18b20f86c0520e3132441323981f782ff1af7 data/armourandtoolsmod/advancements/recipes/misc/blasting_deepslate_imperium_ore.json c07cb3c50293b4e7f0e719738657886da0e4f0a2 data/armourandtoolsmod/advancements/recipes/misc/blasting_deepslate_rainbow_ore.json 6347da67981c03ef4dd93c6ba4a452b4abf015e9 data/armourandtoolsmod/advancements/recipes/misc/blasting_deepslate_ruby_ore.json 7fe9ac66d15c9ba799b4e3273e1156af890fe661 data/armourandtoolsmod/advancements/recipes/misc/blasting_deepslate_sapphire_ore.json @@ -63,6 +65,9 @@ ed6863180fbdb2aca431c6bcdb0f6df8afe69409 data/armourandtoolsmod/advancements/rec ee8e188e67a2f84b6c44f9192afb3df90a2dbeec data/armourandtoolsmod/advancements/recipes/misc/blasting_graphite_leggings.json c2713f717ff034d981cc364a316a1d1ba5b193e5 data/armourandtoolsmod/advancements/recipes/misc/blasting_graphite_ore.json e0bc24cbc2dfaf553c81d5df49dae90e26607755 data/armourandtoolsmod/advancements/recipes/misc/blasting_graphite_shield.json +c1037c2bcfe5d85a4a2b5a99af8046b4a07483f7 data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_ore.json +89eec26122dc068e0959737ef75541c6e267c7cb data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_pickaxe.json +be19fe520153ab0d464ee94f2e0d8eef995d4a9e data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_sword.json 4b741bf870196f2f5e99ab7ea7f0ad5231af6b78 data/armourandtoolsmod/advancements/recipes/misc/blasting_rainbow_boots.json 20388126da52b373ebcc1a33af22ad2427f2e730 data/armourandtoolsmod/advancements/recipes/misc/blasting_rainbow_chestplate.json 0b75836d5abc9865e2c66b363486656fc3f7243a data/armourandtoolsmod/advancements/recipes/misc/blasting_rainbow_helmet.json @@ -72,6 +77,7 @@ cb26f2aa48a3dd77099c07ce7de232bebef9a9aa data/armourandtoolsmod/advancements/rec 0850dae06e25bbf2c1b2945374ae973c1a6b8af6 data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_aqumarine.json 4abd2efebf5520a66b84548d28129c24255e3c12 data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_enderite.json 439470381e3121b18d0a62a08eb8297ed4cbec99 data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_graphite.json +4354d2e08cdac65b77b57e7c75a37aefff86dc8a data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_imperium.json b89be5df3c953a270ea839ca5898bf7c1193539d data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_rainbow.json 86059c216bc6943213702d7695997b010f077d9a data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_ruby.json b7e76846c125f9f68a05d49ebb636b2ac656c6e4 data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_sapphire.json @@ -107,6 +113,7 @@ f9a05422123bfed508fd57ade8ae076d6d3e9f87 data/armourandtoolsmod/advancements/rec 196452c4a9bba2b81c261f0b9c083a847e67dfdc data/armourandtoolsmod/advancements/recipes/misc/smelting_aqumarine_trident.json 9c37b6f168979f96ee24f9143c237395d4b7894e data/armourandtoolsmod/advancements/recipes/misc/smelting_deepslate_aqumarine_ore.json f0b78cc5431a28aa63f0c8ff7c6907ee467f3dde data/armourandtoolsmod/advancements/recipes/misc/smelting_deepslate_graphite_ore.json +a1cf1012000deb960c34558568790dcf6842f2e1 data/armourandtoolsmod/advancements/recipes/misc/smelting_deepslate_imperium_ore.json 76e72325f77b49c8b5d773e2f236aed73defa96d data/armourandtoolsmod/advancements/recipes/misc/smelting_deepslate_rainbow_ore.json 05b817f3113534fae563be099250f596bb340512 data/armourandtoolsmod/advancements/recipes/misc/smelting_deepslate_ruby_ore.json 25496969a81dc5396321fa699ad6ef71a6845593 data/armourandtoolsmod/advancements/recipes/misc/smelting_deepslate_sapphire_ore.json @@ -126,6 +133,9 @@ ab96657c7a924abefeacb0c6aab067361dbd9385 data/armourandtoolsmod/advancements/rec 6d38ce697d71dc070a82b5df079fc55e817db0f5 data/armourandtoolsmod/advancements/recipes/misc/smelting_graphite_leggings.json 82ad6894705e8823f89fcc51b271ced2c718f043 data/armourandtoolsmod/advancements/recipes/misc/smelting_graphite_ore.json 19adb32ab595ae5f70d35594871c85b005916583 data/armourandtoolsmod/advancements/recipes/misc/smelting_graphite_shield.json +58dc85362f1e0e10f0f3ee9147ffeea5eda0ee99 data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_ore.json +a999f4b6bf2382323461e4f6a58f702dcd0b9856 data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_pickaxe.json +89d4c9bedd50834da0b7c2eeb6afb0f0ba445715 data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_sword.json 862fdef31621aa2292be16dfc763fbbde13a436b data/armourandtoolsmod/advancements/recipes/misc/smelting_rainbow_boots.json 6d6be5cee0e052ce45e8cc5bcb5119ee11886ff4 data/armourandtoolsmod/advancements/recipes/misc/smelting_rainbow_chestplate.json 28d6e51f8e14ee87e470e00b4184cd693a5866cc data/armourandtoolsmod/advancements/recipes/misc/smelting_rainbow_helmet.json @@ -135,6 +145,7 @@ d6491169a6fed068edd6eb2bcbf0d8e7a91e5a52 data/armourandtoolsmod/advancements/rec 152c3c75c2dadd8e80812523316b4143ee1028c9 data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_aqumarine.json e23db98788b0af3cc60a306e55936e15ebb2ccab data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_enderite.json a2afd163fee51f111d2f5cbc9078833cb0503e44 data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_graphite.json +a8c847ec60b7357929a4cabbff1c0e84c8c7de10 data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_imperium.json 51244dfde5aa6d9fed7419f8898a0aca090051ad data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_rainbow.json a8645c8ccdfdb178b2dab19a44bde81133e050d8 data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_ruby.json 64f93f80f3fd7d77b9457a00884713fd799047eb data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_sapphire.json @@ -172,6 +183,8 @@ bf51aa0688586b63f984c9d439054c995048cc22 data/armourandtoolsmod/advancements/rec 6a977849effd37c6e745b3a04fdac602e51c2320 data/armourandtoolsmod/advancements/recipes/tools/enderite_shovel.json 1257c4ee51ccdd562a046dd492053f53887f9703 data/armourandtoolsmod/advancements/recipes/tools/enderite_sword.json d20438d6632aaa0e31ae4ad6ee9af2595dfd2bf8 data/armourandtoolsmod/advancements/recipes/tools/graphite_shield.json +768bf0e682d50ab6265661a6b5dc5e53218a9c24 data/armourandtoolsmod/advancements/recipes/tools/imperium_pickaxe.json +23056e96123073ccd762a7d763afabf93bf99724 data/armourandtoolsmod/advancements/recipes/tools/imperium_sword.json aa1edd9262dfc43253edef429a1dda3be6705e24 data/armourandtoolsmod/advancements/recipes/tools/rainbow_shield.json cb4451ef3aafb1a17926203b75bc3bb85c156667 data/armourandtoolsmod/advancements/recipes/tools/ruby_axe.json d7395d76ae997531eb308841d393de9cb4062585 data/armourandtoolsmod/advancements/recipes/tools/ruby_hoe.json @@ -179,22 +192,28 @@ e0a2d46e6a562d46dccc42eedcda00b89d3a7cd2 data/armourandtoolsmod/advancements/rec 3209f918eb86bebe3a16a1344863b0247ba31d6e data/armourandtoolsmod/advancements/recipes/tools/ruby_shield.json 8eb669e829e5a81651b5691926c209d16e317be4 data/armourandtoolsmod/advancements/recipes/tools/ruby_shovel.json afaa0f79973970a20fc6ad1a6b628e40e73b2ae7 data/armourandtoolsmod/advancements/recipes/tools/ruby_sword.json +b107aadcab847b199085f9c69083751eb7bf0a0b data/armourandtoolsmod/advancements/recipes/tools/sapphire_axe.json +c0d8469bd06d4576da46e02cc0dc15954ee859a7 data/armourandtoolsmod/advancements/recipes/tools/sapphire_hoe.json +25eca0fc984e510dae3aed27012f60df2b296eb9 data/armourandtoolsmod/advancements/recipes/tools/sapphire_pickaxe.json 406cfeb511bd6a34d4fcf0a30868e5fa7073bd25 data/armourandtoolsmod/advancements/recipes/tools/sapphire_shield.json -78da516c72de91179803d7068271bcde9500cee8 data/armourandtoolsmod/recipes/amethyst_axe.json -36968ac2704b6aba42cbae8bd74269a8ca416f6a data/armourandtoolsmod/recipes/amethyst_boots.json -f6ab1e0d36c50e07935b2072de4731f32e2b9c64 data/armourandtoolsmod/recipes/amethyst_chestplate.json -bea7ce15249ba10c57c55d5317f9ef7ba9690bc6 data/armourandtoolsmod/recipes/amethyst_helmet.json -b9fe5e028726e2d8f40af5057827f67b042bfd23 data/armourandtoolsmod/recipes/amethyst_leggings.json -c618893ff6ccca28aec74287c696afc2f7a86756 data/armourandtoolsmod/recipes/amethyst_pickaxe.json -51046fd173379c47970cbe62f4b7d42afd51695b data/armourandtoolsmod/recipes/amethyst_shovel.json -372b46fc4dde30b0f749b8887b9dc279e83826cc data/armourandtoolsmod/recipes/amethyst_sword.json +895e10ca5f689259a276802e07de278ba6682ead data/armourandtoolsmod/advancements/recipes/tools/sapphire_shovel.json +1296cd3603319a79a10046ebf6b9f0be618f1f9e data/armourandtoolsmod/advancements/recipes/tools/sapphire_sword.json +ef7ef1d4b425916d8205de09e00227225687c9de data/armourandtoolsmod/advancements/recipes/tool/magma_strike_pickaxe.json +9cfe0a80df9637e4f0a594063ec9d3da5ae1ea92 data/armourandtoolsmod/recipes/amethyst_axe.json +37c59fcd7e6870869c09b655269118c12b6f58ae data/armourandtoolsmod/recipes/amethyst_boots.json +492c2c6866f720415ef3f69e5cb8019775939919 data/armourandtoolsmod/recipes/amethyst_chestplate.json +b5b33aef5c5fec332d41973c493fc81b43e2376a data/armourandtoolsmod/recipes/amethyst_helmet.json +57b0885c30518800891d6ef03e5a308471b9b57f data/armourandtoolsmod/recipes/amethyst_leggings.json +6067624d32108ef99773bafd255a5538a501c1dc data/armourandtoolsmod/recipes/amethyst_pickaxe.json +89ccba0ac32b5dc269cfcc38a1e6a7969cdd564c data/armourandtoolsmod/recipes/amethyst_shovel.json +98926a8d84ad7159793592a4cd4de67cbb47e696 data/armourandtoolsmod/recipes/amethyst_sword.json 1576f1a4728f4419a491d43ef95bd24c5396b1f5 data/armourandtoolsmod/recipes/aqumarine_block_recipe.json -2694ab0117a105b22ad8538756304a8b1a85177f data/armourandtoolsmod/recipes/aqumarine_boots.json -56c467a68cefbaba0f6fa802ddd58a3a5714aa94 data/armourandtoolsmod/recipes/aqumarine_chestplate.json -bf5789d99692fb32c86d6aec74abdf0d21dfa061 data/armourandtoolsmod/recipes/aqumarine_helmet.json -ba37b1887d6824c88a39f8dd7fae6f9e4caa544a data/armourandtoolsmod/recipes/aqumarine_leggings.json -28c662a1094ddf09d17102824038329b734f484c data/armourandtoolsmod/recipes/aqumarine_shield.json -f8df4ff77f201dad064bbc0de65898c32e2700c7 data/armourandtoolsmod/recipes/aqumarine_trident.json +52a469a10c2bc4ae10c4b8d19b51ca477cf94f96 data/armourandtoolsmod/recipes/aqumarine_boots.json +9dc8543b18e506463e212bf0d53df7b70937259d data/armourandtoolsmod/recipes/aqumarine_chestplate.json +37228579152c282701ad7350876955d7772a60eb data/armourandtoolsmod/recipes/aqumarine_helmet.json +8888a61ecb494ff942baa6a8d408ed2481c1e097 data/armourandtoolsmod/recipes/aqumarine_leggings.json +319083e4d9e5039792974aadc87b41a9eec9909f data/armourandtoolsmod/recipes/aqumarine_shield.json +7a6a40ed519e3e296ed000dda2c3bb73d159602d data/armourandtoolsmod/recipes/aqumarine_trident.json 3ba9b5664117242513a4dbed09829d10b55c3023 data/armourandtoolsmod/recipes/blasting_aqumarine_boots.json 527e99a8f5b27206e1b01e6445378ed02e5838b8 data/armourandtoolsmod/recipes/blasting_aqumarine_chestplate.json 68b3798d90f0228ec1b16505d79f19da75695706 data/armourandtoolsmod/recipes/blasting_aqumarine_helmet.json @@ -204,6 +223,7 @@ add1364bea93f082cfbde5ea7691601bcb39c167 data/armourandtoolsmod/recipes/blasting 0664ebaea50346e487b1f1d80e6f64bf83bc30ea data/armourandtoolsmod/recipes/blasting_aqumarine_trident.json 33dda1dab04283c3a1db5ff577ae5f0e67ab6785 data/armourandtoolsmod/recipes/blasting_deepslate_aqumarine_ore.json fa451aadfe0d1733d98c5fdf218737b65ba7977a data/armourandtoolsmod/recipes/blasting_deepslate_graphite_ore.json +1ceb5abed9a96a3149f9eb3fbb6cacd3d1e57b54 data/armourandtoolsmod/recipes/blasting_deepslate_imperium_ore.json 085a3f25fabbe82511cedcdd68fa34b757f3eccc data/armourandtoolsmod/recipes/blasting_deepslate_rainbow_ore.json ec365638e9f2d0c9be0d7d45f058b5985a5f1ff7 data/armourandtoolsmod/recipes/blasting_deepslate_ruby_ore.json dbab236832da5fd5f08b6f1d6180cfe9f8efd6b9 data/armourandtoolsmod/recipes/blasting_deepslate_sapphire_ore.json @@ -223,6 +243,9 @@ d9ef585b752aeda863cdca3e139469359fb53126 data/armourandtoolsmod/recipes/blasting 6979c6ecfd06efa11535896c3c39455f2b70d545 data/armourandtoolsmod/recipes/blasting_graphite_leggings.json d0a2e50b965e216ffe4101faaa5a20b7e7e6227e data/armourandtoolsmod/recipes/blasting_graphite_ore.json 404478e2e1c735cbfd37280e7b6e87ca935df6ac data/armourandtoolsmod/recipes/blasting_graphite_shield.json +de28c31cbda03faee6881e077d26411fa22a3578 data/armourandtoolsmod/recipes/blasting_imperium_ore.json +e5ad7dbb328973b6c5d109c4c38a7ba03a46ed80 data/armourandtoolsmod/recipes/blasting_imperium_pickaxe.json +5b1841a1c12d1c07aa89df4511b0214885c94722 data/armourandtoolsmod/recipes/blasting_imperium_sword.json a169e362521aa2c9c066e8a528f92dd202bda6b5 data/armourandtoolsmod/recipes/blasting_rainbow_boots.json 3761490c5e09279ecbe6053bbd81e46430c3e658 data/armourandtoolsmod/recipes/blasting_rainbow_chestplate.json 8251b2695c495f4c51b1de507d5ae5b00d7b93d5 data/armourandtoolsmod/recipes/blasting_rainbow_helmet.json @@ -232,6 +255,7 @@ a065ed2a7a56e9ea420c348d6f8480a7eb378822 data/armourandtoolsmod/recipes/blasting 2df433ab712f2619ac6544628563d43c1e1c598f data/armourandtoolsmod/recipes/blasting_raw_aqumarine.json 6ed3be5bb73f40fb06d4619c025cea285dde2459 data/armourandtoolsmod/recipes/blasting_raw_enderite.json d31238fe257d170f74f7f7708b8c728e6a7e762e data/armourandtoolsmod/recipes/blasting_raw_graphite.json +da6f6d87ee8748bbc580fc27a01c8ea04b309029 data/armourandtoolsmod/recipes/blasting_raw_imperium.json e39c39afebd3ce99c9706304b9cb1b8eb381c8e1 data/armourandtoolsmod/recipes/blasting_raw_rainbow.json fade1b6ad76c4069def6c17886b0a896b37ab71f data/armourandtoolsmod/recipes/blasting_raw_ruby.json a4fe178488bfda3b133388e0e8a7437d80da4f0b data/armourandtoolsmod/recipes/blasting_raw_sapphire.json @@ -259,46 +283,55 @@ cb4206693e1d2a4815e0227563721ad9d4b9a534 data/armourandtoolsmod/recipes/blasting 7d10f4ca19ab35884b482afad8bab7f52288e3cb data/armourandtoolsmod/recipes/blasting_sapphire_sword.json 5d841a1e90a62ba975f11ef400c691929067acf6 data/armourandtoolsmod/recipes/custom_armour_crafting_table_recipe.json 9c09562a537846f561aebc1c713898556cabc19a data/armourandtoolsmod/recipes/custom_tool_crafting_table_recipe.json -90820028553e315ac1e8f6bee86783bba78dfcf1 data/armourandtoolsmod/recipes/enderite_axe.json +8fb226a28b694e976f31b17ed63427341ac02cc2 data/armourandtoolsmod/recipes/enderite_axe.json 60ce27cd8d6df6c12cac00caeece898800f85e77 data/armourandtoolsmod/recipes/enderite_block_recipe.json -e67c2d988ad756e42af48b29edd20840549ec19d data/armourandtoolsmod/recipes/enderite_boots.json -5dedc67177819bb40a3c5eaaf13df01536117d08 data/armourandtoolsmod/recipes/enderite_chestplate.json -8ff5506df41ec779a3238dfcf9c0578b10e45bac data/armourandtoolsmod/recipes/enderite_helmet.json -e4b4391e789ed2731e32a2f9bbd16eef247359fd data/armourandtoolsmod/recipes/enderite_hoe.json -7696ec9db570b1f304fa3967e969b0c2e5f1898e data/armourandtoolsmod/recipes/enderite_leggings.json -6a93c6674f2a9edaff15ef83a38562dfcae7f4e0 data/armourandtoolsmod/recipes/enderite_pickaxe.json -d83e41e9bd266cab1bb53ebb0ee6f3f17b2f3d54 data/armourandtoolsmod/recipes/enderite_shovel.json -c63f15ba9403366bca54c69a15123b9f6a2e323f data/armourandtoolsmod/recipes/enderite_sword.json +fcda421db9bb70a201123a67d90bc59eab26a1b0 data/armourandtoolsmod/recipes/enderite_boots.json +aaa740d8851bfc86be1f4e485556f4932d3e842d data/armourandtoolsmod/recipes/enderite_chestplate.json +ed75749827576266150a54555faf65a7861b0df5 data/armourandtoolsmod/recipes/enderite_helmet.json +ba7060215f0ad2b9089447567512d065275abc3a data/armourandtoolsmod/recipes/enderite_hoe.json +fa43fb867e74b3eeb087704647fdb01de34cb494 data/armourandtoolsmod/recipes/enderite_leggings.json +ceff229c84a1d83a17a0380c6db142e348266663 data/armourandtoolsmod/recipes/enderite_pickaxe.json +e18aa8926fca8b12b88769c0ab6d1b18f2337670 data/armourandtoolsmod/recipes/enderite_shovel.json +595022a10eca17769a2136e5f5dfec8f09952afe data/armourandtoolsmod/recipes/enderite_sword.json 8ff83a33d3d0ea58fc5c9f9a80185fa3633e20de data/armourandtoolsmod/recipes/graphite_block_recipe.json -a5933be44721356f09a3aca47deb959b77260ddc data/armourandtoolsmod/recipes/graphite_boots.json -08fb673cfd9e3a5fb9875ace57bf976de1bea061 data/armourandtoolsmod/recipes/graphite_chestplate.json -adf63b0d9c8b2e333a5e4769a2fc0183f483544e data/armourandtoolsmod/recipes/graphite_helmet.json -2e3deec619c89fe5e2f3df072bbb7174c36b877b data/armourandtoolsmod/recipes/graphite_leggings.json -b790592cbe2e046b1e8169e2fb4a8da1483a8dfb data/armourandtoolsmod/recipes/graphite_shield.json +43e61ca8f72242f4799aac943910b34e047fbc1d data/armourandtoolsmod/recipes/graphite_boots.json +ea39cbfa896ebd4cc60af827cc27d1438cdb0aeb data/armourandtoolsmod/recipes/graphite_chestplate.json +b0f61021c51cbf69455d7d1de606d763841f3b9f data/armourandtoolsmod/recipes/graphite_helmet.json +3f2ce086e2b439a8c23fe3f11b70f4f4a44a0fa2 data/armourandtoolsmod/recipes/graphite_leggings.json +ad0c097621f95c5b6ecf7071f400c04d0a0539e1 data/armourandtoolsmod/recipes/graphite_shield.json +186a1e677fe29e54cd3f9266473edddc24ecd969 data/armourandtoolsmod/recipes/imperium_pickaxe.json +b38e6d05408603e66f68bca8e1f130a81f2b3878 data/armourandtoolsmod/recipes/imperium_sword.json +eb7bc1fd278b7b1e16aab1d6068656a0b69c6d36 data/armourandtoolsmod/recipes/ingot_fusion_toll_enhancer_recipe.json +dcadccfdd9e219de6e433b1b34cf5c1a20aaee73 data/armourandtoolsmod/recipes/magma_strike_pickaxe.json 0399917d7fdda6f9af410c709805dfb149b2451c data/armourandtoolsmod/recipes/rainbow_block_recipe.json -5caa6184a7c066fac3bbc8e3869ae712171fe202 data/armourandtoolsmod/recipes/rainbow_boots.json -cc01dc105a026c1a42db2e4a7bea9ca208ef22e2 data/armourandtoolsmod/recipes/rainbow_chestplate.json -c06bee816a8ccbfbb3df44571a3cd62be6a40634 data/armourandtoolsmod/recipes/rainbow_helmet.json -40643e166ec04b182edea9889fe6b78c2f6cf22a data/armourandtoolsmod/recipes/rainbow_leggings.json -0f170ab606065f65d8f20e4770e587407ca052a8 data/armourandtoolsmod/recipes/rainbow_shield.json -07246a55e091f3235af14f2e99e3d0344c6b3e58 data/armourandtoolsmod/recipes/ruby_axe.json +9e4117f89e11f11fb8d19b1981e215582e5ac0b5 data/armourandtoolsmod/recipes/rainbow_boots.json +acc1a952978e1ddef1c694f2b0f5f84a69cd5c6b data/armourandtoolsmod/recipes/rainbow_chestplate.json +f41797c78358c63ad8bd96bd3daa4ffa26f4ba51 data/armourandtoolsmod/recipes/rainbow_helmet.json +9cfb9c28a5b422397eb2d9b57cc1d01cc3b5898c data/armourandtoolsmod/recipes/rainbow_leggings.json +062284fc8875f8e578961888291e9da493650cbc data/armourandtoolsmod/recipes/rainbow_shield.json +9d2dd490968f078c24025d8fb364545cff34ac7f data/armourandtoolsmod/recipes/ruby_axe.json 4553256d555f24b2023b17f5ea6578d10366bd28 data/armourandtoolsmod/recipes/ruby_block_recipe.json -01b99ff51fb6524549b41d3de822b980efd208eb data/armourandtoolsmod/recipes/ruby_boots.json -dcd276aec63316a21ee202aba544078d29bb8b0a data/armourandtoolsmod/recipes/ruby_chestplate.json -adcdbe114c0865e328f69c71552f6c3da79836a8 data/armourandtoolsmod/recipes/ruby_helmet.json +815ff854c5f0c74c1c2d4365b6f7d6efd25195a3 data/armourandtoolsmod/recipes/ruby_boots.json +ef1f072d99cd4388f0c61f1aa6066a3aee0c52c7 data/armourandtoolsmod/recipes/ruby_chestplate.json +50351969a5306f1b62f8b96a885128efd2b07584 data/armourandtoolsmod/recipes/ruby_helmet.json 332481d945739b2bc2f7a57a445f098effe087ae data/armourandtoolsmod/recipes/ruby_helmet_smithing_trim.json -fc9a09728c9ec94ab9f747cf641e2d1ee6c6bbf9 data/armourandtoolsmod/recipes/ruby_hoe.json -7ea74b3ea626590af6dba5bf10353b9f00ab7c11 data/armourandtoolsmod/recipes/ruby_leggings.json -4dbf949fe5541d795af6c011281a62c684a164d2 data/armourandtoolsmod/recipes/ruby_pickaxe.json -c1fc52067865c6662daaed01546834191a6437a2 data/armourandtoolsmod/recipes/ruby_shield.json -2aaf25d72e5d0cdb626af9c6c9fa1a8cf814a50a data/armourandtoolsmod/recipes/ruby_shovel.json -3611ee8560e4b90001986fbbb4a360a86c2ae608 data/armourandtoolsmod/recipes/ruby_sword.json +3c1d1867b81f5e538fb7e031f9f5c60faa781b7b data/armourandtoolsmod/recipes/ruby_hoe.json +454dd6f67949fd98787c3d1da1815d9b24e6f9f8 data/armourandtoolsmod/recipes/ruby_leggings.json +d5fc3669cd02ad96cd2776fb9be085ad294cc557 data/armourandtoolsmod/recipes/ruby_pickaxe.json +1bcd55a9a30fdc081d99a87cc20942eab2e7d6af data/armourandtoolsmod/recipes/ruby_shield.json +f114a256311cb8461e35b79bbf03564c361ee834 data/armourandtoolsmod/recipes/ruby_shovel.json +35d8ce1ab594a72a9ef607cf5f7646c3d5a7518d data/armourandtoolsmod/recipes/ruby_sword.json +d99e6f365eb18d2b39325f2fb5725eaa4402f5e5 data/armourandtoolsmod/recipes/sapphire_axe.json 89491cb4c6a2c38b52171d225e847b0857290162 data/armourandtoolsmod/recipes/sapphire_block_recipe.json -917cccfc27989ce512fbbc8952d0153adf30f3b0 data/armourandtoolsmod/recipes/sapphire_boots.json -2929a4bd84b4f6593f98c25af26e6057a166ef9e data/armourandtoolsmod/recipes/sapphire_chestplate.json -154035ec444e32191d130b14aa18f98755556f65 data/armourandtoolsmod/recipes/sapphire_helmet.json -981acf7506bb5eb37bf50933abeec496f2b7eae0 data/armourandtoolsmod/recipes/sapphire_leggings.json -920f4232fd13a4f0f31e3e3b083c97ff65a76b1b data/armourandtoolsmod/recipes/sapphire_shield.json +646089896c110d2816c2ebf8abc843d5d0ac08e2 data/armourandtoolsmod/recipes/sapphire_boots.json +a46a042370cb129cc866c3698582d50f5c192852 data/armourandtoolsmod/recipes/sapphire_chestplate.json +3dbb0117bd17adbbb5ae4a7ad8c4880d23434f97 data/armourandtoolsmod/recipes/sapphire_helmet.json +f9aecf47a4331f008e75ecf0f30cfc2e9c38c848 data/armourandtoolsmod/recipes/sapphire_hoe.json +f95d2229db790ddbe07801b20975ead5c00f70b0 data/armourandtoolsmod/recipes/sapphire_leggings.json +408759a8bc3bb5ef3bfeb4c8b0bd6dba3c8f670a data/armourandtoolsmod/recipes/sapphire_pickaxe.json +70ab6b20d45738dd90a70c295f4a83c23a651b66 data/armourandtoolsmod/recipes/sapphire_shield.json +193aec4d75dbf24b5dd9216d935d50e9719c773f data/armourandtoolsmod/recipes/sapphire_shovel.json +634df79a4f6be6a92813c307a64c34d80179b52c data/armourandtoolsmod/recipes/sapphire_sword.json f8cf7f6bb5b6e5a9ce5a17bed676f409889ef231 data/armourandtoolsmod/recipes/smelting_aqumarine_boots.json e368772b68e458c259c10eb88b7d15869e726987 data/armourandtoolsmod/recipes/smelting_aqumarine_chestplate.json 95a71b575cef57e97e65c445689855a53dfc79be data/armourandtoolsmod/recipes/smelting_aqumarine_helmet.json @@ -308,6 +341,7 @@ e368772b68e458c259c10eb88b7d15869e726987 data/armourandtoolsmod/recipes/smelting 10f360754f4bfc21b8ca804e66e3b41601e49212 data/armourandtoolsmod/recipes/smelting_aqumarine_trident.json 4f2a03e74af293bb40015a711581026e6723019f data/armourandtoolsmod/recipes/smelting_deepslate_aqumarine_ore.json 24c6afe53017c4a31841a574c4af964fd4bb930f data/armourandtoolsmod/recipes/smelting_deepslate_graphite_ore.json +1499a4e882dba34f8c5d81dcf86d283715436df3 data/armourandtoolsmod/recipes/smelting_deepslate_imperium_ore.json ba5677fbec717e0c287b00ec96352b1976fcba44 data/armourandtoolsmod/recipes/smelting_deepslate_rainbow_ore.json 30d1489fc939d1043d93e8113d57bf540eb39acf data/armourandtoolsmod/recipes/smelting_deepslate_ruby_ore.json b7c6380a58e0367f331a4defccc9ac295ae18336 data/armourandtoolsmod/recipes/smelting_deepslate_sapphire_ore.json @@ -327,6 +361,9 @@ ff327dcaf31c429d8ea405828b42b53bb5409dfb data/armourandtoolsmod/recipes/smelting 92057c8adeb2fb7b55de20cc51a49f68d12bf839 data/armourandtoolsmod/recipes/smelting_graphite_leggings.json 10e97a407c586d2445dbcf0c258755e7218761e0 data/armourandtoolsmod/recipes/smelting_graphite_ore.json 397ad7fe2a5886b07a77b9ee078a282017c72db9 data/armourandtoolsmod/recipes/smelting_graphite_shield.json +4bd9d5766f8408bce46c1ef88e1f7db94bdf4dbd data/armourandtoolsmod/recipes/smelting_imperium_ore.json +bc64b1c76fb697ceefa32c41e7c3d16fd699d2de data/armourandtoolsmod/recipes/smelting_imperium_pickaxe.json +294e17646d77fed677b4ce3cc9695fc5eca2b9e9 data/armourandtoolsmod/recipes/smelting_imperium_sword.json 18c59f9125fe3f99eafe536af6e5851f2a46f80b data/armourandtoolsmod/recipes/smelting_rainbow_boots.json 4f1606302fe518c5597af87088dbd502f4640331 data/armourandtoolsmod/recipes/smelting_rainbow_chestplate.json a0c5d53f8fc617b57cfd2fb46a61e2df860e889f data/armourandtoolsmod/recipes/smelting_rainbow_helmet.json @@ -336,6 +373,7 @@ a0c5d53f8fc617b57cfd2fb46a61e2df860e889f data/armourandtoolsmod/recipes/smelting 3a2956c7da9f50b32faae0b204eb54512df25d06 data/armourandtoolsmod/recipes/smelting_raw_aqumarine.json d8203ea8d54fa213f251890b3800bafeab5c2421 data/armourandtoolsmod/recipes/smelting_raw_enderite.json a79d0a8b02fc5f8edfbe3192dc50e45789610eec data/armourandtoolsmod/recipes/smelting_raw_graphite.json +150436abb9d1e31737a2ec5effa051264b9d41cf data/armourandtoolsmod/recipes/smelting_raw_imperium.json 52f9bade04ae8b6b2f59d33002b20b48f0496050 data/armourandtoolsmod/recipes/smelting_raw_rainbow.json bc318e30c5c19e3c590c397f0c3c4bc1600ba247 data/armourandtoolsmod/recipes/smelting_raw_ruby.json a7e04556a9cf920ab1640b4f3b0779ea05139e17 data/armourandtoolsmod/recipes/smelting_raw_sapphire.json diff --git a/src/generated/resources/.cache/b051adeca7b8303d1a7d46afb7c4eaf8cfa3a7f5 b/src/generated/resources/.cache/b051adeca7b8303d1a7d46afb7c4eaf8cfa3a7f5 index 26bac2ea..af1351ad 100644 --- a/src/generated/resources/.cache/b051adeca7b8303d1a7d46afb7c4eaf8cfa3a7f5 +++ b/src/generated/resources/.cache/b051adeca7b8303d1a7d46afb7c4eaf8cfa3a7f5 @@ -1,18 +1,21 @@ -// 1.20.1 2023-08-28T05:16:02.6162711 Tags for minecraft:item mod id armourandtoolsmod +// 1.20.1 2023-10-12T22:09:59.3186154 Tags for minecraft:item mod id armourandtoolsmod f4e0d28b203a60fd241885a727654636c8762650 data/forge/tags/items/deepslate_ores/aqumarine_ores.json 186e50e522fb2ae91c6e315a523523796b105b56 data/forge/tags/items/deepslate_ores/graphite_ores.json +08f48b19390eb9e06478f989851d261c8cb384a4 data/forge/tags/items/deepslate_ores/imperium_ores.json d66c065dfb98375b77835223afe692a26c7be84b data/forge/tags/items/deepslate_ores/rainbow_ores.json cd94fb683ebafe1cbde0ba3a30280d57b587fc34 data/forge/tags/items/deepslate_ores/ruby_ores.json 6a274e766194dfaf9c967be14c4b26a4ff637a8b data/forge/tags/items/deepslate_ores/sapphire_ores.json 04d29499ff85f8124c50ef07269cf25db07ae07d data/forge/tags/items/ingots/aqumarine.json dc53c8e250d79a891fb7b091453ddbf4a97be9c8 data/forge/tags/items/ingots/enderite.json c963a5fc1309d90f803cfdfbf05f02ace6abb49b data/forge/tags/items/ingots/graphite.json +fcffdb7f1440f079493fd4add5abc1c711efbabe data/forge/tags/items/ingots/imperium.json 264adb63393b61bea724cadd9fe78dee27f9b867 data/forge/tags/items/ingots/rainbow.json a9e8b31cf275be39ab498638115ee072f1c88065 data/forge/tags/items/ingots/ruby.json 5e8b8285fff705424cf2afb6d0df6e0fdab067ea data/forge/tags/items/ingots/sapphire.json 1372356eb4655b6d26d8a5a16aaa3032bbb738d4 data/forge/tags/items/ores/aqumarine_ores.json fef5965e3903fc07aa6146bd17e74efd9b313fb6 data/forge/tags/items/ores/enderite_ores.json 974c70b44df044135463b300ebed43eee38001b3 data/forge/tags/items/ores/graphite_ores.json +e892786d477f668113418b8239abc7bb6395f33f data/forge/tags/items/ores/imperium_ores.json fa835a8b8eb217767d6139f02c46edfa27377555 data/forge/tags/items/ores/rainbow_ores.json f5b270d5c60fdfc53020be6469026c27bc742f1e data/forge/tags/items/ores/ruby_ores.json 47d725a30030287aa216532b38ba1d0774dd627f data/forge/tags/items/ores/sapphire_ores.json diff --git a/src/generated/resources/.cache/b437fe956183b85bad8f19eb71f021ad5d4a1455 b/src/generated/resources/.cache/b437fe956183b85bad8f19eb71f021ad5d4a1455 index 9c2713eb..7154a2cb 100644 --- a/src/generated/resources/.cache/b437fe956183b85bad8f19eb71f021ad5d4a1455 +++ b/src/generated/resources/.cache/b437fe956183b85bad8f19eb71f021ad5d4a1455 @@ -1,10 +1,11 @@ -// 1.20.1 2023-08-28T05:16:02.6313285 Armour and Tools Mod Blockstates +// 1.20.1 2023-10-12T22:09:59.3306702 Armour and Tools Mod Blockstates 2e7a970f6d2f498e44c8111ab18365eb11feb9ec assets/armourandtoolsmod/blockstates/aqumarine_block.json 54fe09c01a2e09240df74b50d546d52a3f055d6c assets/armourandtoolsmod/blockstates/aqumarine_ore.json 14011b50d9bf8bbaeb041d4da1d2f0c5303ddef7 assets/armourandtoolsmod/blockstates/custom_armour_crafting_table.json 0f7b0db22ffb5c04bb3aaae00ebd07a8a5e7dc38 assets/armourandtoolsmod/blockstates/custom_tool_crafting_table.json 56cac7a7dc1b3cec4831e0489b6dfe8c903ef239 assets/armourandtoolsmod/blockstates/deepslate_aqumarine_ore.json 6634c0b42d6703bfe41629eb8d2ae3aec5d8e53d assets/armourandtoolsmod/blockstates/deepslate_graphite_ore.json +58e8c4ac32b20cf87a4b886b6bab93f5d8519c94 assets/armourandtoolsmod/blockstates/deepslate_imperium_ore.json 4e30728c4657a667559406ef693e49fc8b099f1a assets/armourandtoolsmod/blockstates/deepslate_rainbow_ore.json 3747e8ebc1746317f633e2c899e2d941f094734e assets/armourandtoolsmod/blockstates/deepslate_ruby_ore.json c8512e5a03eec24140e6961b05767d6ef0fb4177 assets/armourandtoolsmod/blockstates/deepslate_sapphire_ore.json @@ -12,6 +13,8 @@ c8512e5a03eec24140e6961b05767d6ef0fb4177 assets/armourandtoolsmod/blockstates/de dd94bac512b66e6bfc7167e1efd6d19e7603cfbd assets/armourandtoolsmod/blockstates/enderite_ore.json 5e08334bf3b4305ed8c8e5bd49e7ddb3181ef482 assets/armourandtoolsmod/blockstates/graphite_block.json 4bedced77b9f7a7387a64bf8343ddb0f38b630c0 assets/armourandtoolsmod/blockstates/graphite_ore.json +b2e20f5a5036e9fb9be6f4b63609c9c4aa1ba371 assets/armourandtoolsmod/blockstates/imperium_ore.json +d950e01376c01d6fdc91a8d6de6eb3ae179fb075 assets/armourandtoolsmod/blockstates/ingot_fusion_toll_enhancer.json a7fc4d7c5702aac2d7d8dde4cdf85761bc17b328 assets/armourandtoolsmod/blockstates/rainbow_block.json 2ee63bda3f405985ced49a0bb440757d4604bf50 assets/armourandtoolsmod/blockstates/rainbow_ore.json 051baf056e542c7ec5a787b36466989f550c34e9 assets/armourandtoolsmod/blockstates/ruby_block.json @@ -24,6 +27,7 @@ abf3538b38a6074395bd2b434de9ceaff8fcf8f7 assets/armourandtoolsmod/models/block/c 17253f7906c2b7f44057bb55b7595b619a541e2d assets/armourandtoolsmod/models/block/custom_tool_crafting_table.json ce344ac7cf91a296e6b373259c1f33c4c37fd7a2 assets/armourandtoolsmod/models/block/deepslate_aqumarine_ore.json cb1cd47ef020a5b2b7d99feb10549348fcaf3087 assets/armourandtoolsmod/models/block/deepslate_graphite_ore.json +22a29840565ef94c3453f0be7fc28c4438c53055 assets/armourandtoolsmod/models/block/deepslate_imperium_ore.json d3e3c3b837a0ae320f97907cbe56f026668bf0ec assets/armourandtoolsmod/models/block/deepslate_rainbow_ore.json 823214b9303d01ca46cfe86e6e8a1fd2c2f7cc5f assets/armourandtoolsmod/models/block/deepslate_ruby_ore.json 128286da08fc8c25dbffe4987f64c6d94bbd7563 assets/armourandtoolsmod/models/block/deepslate_sapphire_ore.json @@ -31,6 +35,9 @@ b07323a775ec3f1763b3c962b5d88c90d99e75a9 assets/armourandtoolsmod/models/block/e 7ae33083e9abb3b737adcadb357b22a965235e11 assets/armourandtoolsmod/models/block/enderite_ore.json d7eebd8671ec4eebb5cca3e052d40e71adb5452d assets/armourandtoolsmod/models/block/graphite_block.json 963578bbc0213efb09abaeb28ef490575858a880 assets/armourandtoolsmod/models/block/graphite_ore.json +6276fea9ecc3de7e639dafbea5abb1f45cd13a93 assets/armourandtoolsmod/models/block/imperium_ore.json +f4954b01aaf1b85248d6f52ec350a3ae63bfd9cb assets/armourandtoolsmod/models/block/ingot_fusion_toll_enhancer.json +f4954b01aaf1b85248d6f52ec350a3ae63bfd9cb assets/armourandtoolsmod/models/block/ingot_fusion_toll_enhancer_on.json 70b12befd6c2592923ec2034968ac0f2e25ea4c2 assets/armourandtoolsmod/models/block/rainbow_block.json ab39e04a10b45067e9bbbb9adc90663705707a2d assets/armourandtoolsmod/models/block/rainbow_ore.json c81947216ccbbcff05acd805ede5bc22e8de0310 assets/armourandtoolsmod/models/block/ruby_block.json @@ -43,6 +50,7 @@ c2b636566f927ee09b21b43ecc09ca52cc0a09b4 assets/armourandtoolsmod/models/item/aq 222c2e8476c5855a641b2ea5cd73e7bbfdeb31e8 assets/armourandtoolsmod/models/item/custom_tool_crafting_table.json d5f995b7d1f2e1efb8c548570e7df12eea351ca6 assets/armourandtoolsmod/models/item/deepslate_aqumarine_ore.json 7b80f30b63f3af5968e9ef014c83e0e0c7982016 assets/armourandtoolsmod/models/item/deepslate_graphite_ore.json +cdbeda258c6811ec3f233fecbfe929bb6df78b7a assets/armourandtoolsmod/models/item/deepslate_imperium_ore.json 8c1ee937187b027644772eab504d11a793cfe170 assets/armourandtoolsmod/models/item/deepslate_rainbow_ore.json 2db8dc2d5dac33d833edb3ffb7c3f91d6da03d45 assets/armourandtoolsmod/models/item/deepslate_ruby_ore.json 54ef792b4c0ac90bfa8cdf33e0defb137058d8e5 assets/armourandtoolsmod/models/item/deepslate_sapphire_ore.json @@ -50,6 +58,8 @@ d5f995b7d1f2e1efb8c548570e7df12eea351ca6 assets/armourandtoolsmod/models/item/de 0dcf9c375173535daa54cb002ae8322fa5f21ebb assets/armourandtoolsmod/models/item/enderite_ore.json 40d8fe283ae9334173aa5cb34c3fe2eff59c584a assets/armourandtoolsmod/models/item/graphite_block.json e968896fc4c6ac9c0abff1d23cc576138bdb9e46 assets/armourandtoolsmod/models/item/graphite_ore.json +ee6799e55699527939aecf85402b98b43dcb1bf4 assets/armourandtoolsmod/models/item/imperium_ore.json +16a5fd8223f64c59e32fc4f75dc55a986b03c4df assets/armourandtoolsmod/models/item/ingot_fusion_toll_enhancer.json 241bc326669ed4b6f05d6ccbb37070a46f5d83c8 assets/armourandtoolsmod/models/item/rainbow_block.json 33ba53e3ed9e948a872ab89715acbce1b22957dd assets/armourandtoolsmod/models/item/rainbow_ore.json ba5b646dfe3caf522b146a66b85b490535ac4df4 assets/armourandtoolsmod/models/item/ruby_block.json diff --git a/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 b/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 index 847f03ef..a4874d9d 100644 --- a/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 +++ b/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 @@ -1,2 +1,2 @@ -// 1.20.1 2023-09-24T20:32:12.0083899 Languages: en_us -4510074163c2f4204899bc6c5c71c9b0d4a9c0fc assets/armourandtoolsmod/lang/en_us.json +// 1.20.1 2023-10-12T22:09:59.3296691 Languages: en_us +8b0152e07cd1a1ee30bf67cc31642c7f52bea792 assets/armourandtoolsmod/lang/en_us.json diff --git a/src/generated/resources/.cache/e5c5eb35b4ba40351ecb7d9f04c3527f2f5779b0 b/src/generated/resources/.cache/e5c5eb35b4ba40351ecb7d9f04c3527f2f5779b0 index c78bb369..642df838 100644 --- a/src/generated/resources/.cache/e5c5eb35b4ba40351ecb7d9f04c3527f2f5779b0 +++ b/src/generated/resources/.cache/e5c5eb35b4ba40351ecb7d9f04c3527f2f5779b0 @@ -1,4 +1,4 @@ -// 1.20.1 2023-09-24T20:24:31.0467546 Advancements +// 1.20.1 2023-10-12T22:09:59.3341749 Advancements 615aa58042c1c9ffe9d0ce52c4d2ff2fabafceeb data/armourandtoolsmod/advancements/aqumarine_armour.json c646a34402926a2fce2839d07d57bc89bbc36658 data/armourandtoolsmod/advancements/aqumarine_block.json 1640ef0ec6e127c1afe8e6b060ba29e844d3a9e9 data/armourandtoolsmod/advancements/aqumarine_ingot.json @@ -12,6 +12,9 @@ b08601bbad0cc8efe4d3845320f4088038e28d43 data/armourandtoolsmod/advancements/gra b19cf2c2995b5cccb13b120cf7f939e9da8846f0 data/armourandtoolsmod/advancements/graphite_block.json 36250e8d2c72bbd2777714185259135746a5322f data/armourandtoolsmod/advancements/graphite_ingot.json 9adf555b52ffdf629389ea55196ca5cd10282975 data/armourandtoolsmod/advancements/graphite_ore.json +6d78dca81e0426274ca9944db826df140d7558af data/armourandtoolsmod/advancements/imperium_ingot.json +14397bc6ac6b9cdb50cc33b5bffdd40d903c864f data/armourandtoolsmod/advancements/imperium_ore.json +f6a37c07879a2fd2d12fbe264861eb4cb6e50072 data/armourandtoolsmod/advancements/imperium_tools.json 5920445e4112df9049a32cfb9f64a6563f3f21ca data/armourandtoolsmod/advancements/rainbow_armour.json c823856ed4fd1c9cc14082a0e815cda7d7305692 data/armourandtoolsmod/advancements/rainbow_block.json 602389b3a613f86e1ae958a052e0635effb8ef6e data/armourandtoolsmod/advancements/rainbow_ingot.json diff --git a/src/generated/resources/assets/armourandtoolsmod/blockstates/deepslate_imperium_ore.json b/src/generated/resources/assets/armourandtoolsmod/blockstates/deepslate_imperium_ore.json new file mode 100644 index 00000000..784d38df --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/blockstates/deepslate_imperium_ore.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "armourandtoolsmod:block/deepslate_imperium_ore" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/blockstates/imperium_ore.json b/src/generated/resources/assets/armourandtoolsmod/blockstates/imperium_ore.json new file mode 100644 index 00000000..97e70f77 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/blockstates/imperium_ore.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "armourandtoolsmod:block/imperium_ore" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/blockstates/ingot_fusion_toll_enhancer.json b/src/generated/resources/assets/armourandtoolsmod/blockstates/ingot_fusion_toll_enhancer.json new file mode 100644 index 00000000..11a9cf85 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/blockstates/ingot_fusion_toll_enhancer.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "armourandtoolsmod:block/ingot_fusion_toll_enhancer" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/lang/en_us.json b/src/generated/resources/assets/armourandtoolsmod/lang/en_us.json index 38cbe84c..6df21577 100644 --- a/src/generated/resources/assets/armourandtoolsmod/lang/en_us.json +++ b/src/generated/resources/assets/armourandtoolsmod/lang/en_us.json @@ -67,6 +67,7 @@ "block.armourandtoolsmod.custom_tool_crafting_table": "Custom Tool Crafting Table", "block.armourandtoolsmod.deepslate_aqumarine_ore": "Deepslate Aqumarine Ore", "block.armourandtoolsmod.deepslate_graphite_ore": "Deepslate Graphite Ore", + "block.armourandtoolsmod.deepslate_imperium_ore": "Deepslate Imperium Ore", "block.armourandtoolsmod.deepslate_rainbow_ore": "Deepslate Rainbow Ore", "block.armourandtoolsmod.deepslate_ruby_ore": "Deepslate Ruby Ore", "block.armourandtoolsmod.deepslate_sapphire_ore": "Deepslate Sapphire Ore", @@ -74,6 +75,8 @@ "block.armourandtoolsmod.enderite_ore": "Enderite Ore", "block.armourandtoolsmod.graphite_block": "Graphite Block", "block.armourandtoolsmod.graphite_ore": "Graphite Ore", + "block.armourandtoolsmod.imperium_ore": "Imperium Ore", + "block.armourandtoolsmod.ingot_fusion_toll_enhancer": "Ingot Fusion Toll Enhancer", "block.armourandtoolsmod.rainbow_block": "Rainbow Block", "block.armourandtoolsmod.rainbow_ore": "Rainbow Ore", "block.armourandtoolsmod.ruby_block": "Ruby Block", @@ -84,6 +87,8 @@ "container.custom_armour_crafting_table.description": "Craft your own custom armour!", "container.custom_tool_crafting_table": "Tool Crafting Table", "container.custom_tool_crafting_table.description": "Craft your own custom tools!", + "container.ingot_fusion_toll_enhancer": "Ingot Fusion Toll Enhancer", + "container.ingot_fusion_toll_enhancer.description": "Enhance your tools and armour!", "creativetab.armourandtoolsmod": "Armour and Item Mod", "item.armourandtoolsmod.amethyst_axe": "Amethyst Axe", "item.armourandtoolsmod.amethyst_boots": "Amethyst Boots", @@ -116,6 +121,10 @@ "item.armourandtoolsmod.graphite_helmet": "Graphite Helmet", "item.armourandtoolsmod.graphite_leggings": "Graphite Leggings", "item.armourandtoolsmod.graphite_shield": "Graphite Shield", + "item.armourandtoolsmod.imperium": "Imperium", + "item.armourandtoolsmod.imperium_pickaxe": "Imperium Pickaxe", + "item.armourandtoolsmod.imperium_sword": "Imperium Sword", + "item.armourandtoolsmod.magma_strike_pickaxe": "Magma Strike Pickaxe", "item.armourandtoolsmod.rainbow": "Rainbow Ingot", "item.armourandtoolsmod.rainbow_boots": "Rainbow Boots", "item.armourandtoolsmod.rainbow_chestplate": "Rainbow Chestplate", @@ -125,6 +134,7 @@ "item.armourandtoolsmod.raw_aqumarine": "Raw Aqumarine", "item.armourandtoolsmod.raw_enderite": "Raw Enderite", "item.armourandtoolsmod.raw_graphite": "Raw Graphite", + "item.armourandtoolsmod.raw_imperium": "Raw Imperium", "item.armourandtoolsmod.raw_rainbow": "Raw Rainbow", "item.armourandtoolsmod.raw_ruby": "Raw Ruby", "item.armourandtoolsmod.raw_sapphire": "Raw Sapphire", diff --git a/src/generated/resources/assets/armourandtoolsmod/models/block/deepslate_imperium_ore.json b/src/generated/resources/assets/armourandtoolsmod/models/block/deepslate_imperium_ore.json new file mode 100644 index 00000000..b9923dcc --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/block/deepslate_imperium_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "armourandtoolsmod:block/deepslate_imperium_ore" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/block/imperium_ore.json b/src/generated/resources/assets/armourandtoolsmod/models/block/imperium_ore.json new file mode 100644 index 00000000..ff041df6 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/block/imperium_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "armourandtoolsmod:block/imperium_ore" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/block/ingot_fusion_toll_enhancer.json b/src/generated/resources/assets/armourandtoolsmod/models/block/ingot_fusion_toll_enhancer.json new file mode 100644 index 00000000..6674fd43 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/block/ingot_fusion_toll_enhancer.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/orientable", + "textures": { + "front": "armourandtoolsmod:block/ingot_fusion_toll_enhancer_front", + "side": "armourandtoolsmod:block/ingot_fusion_toll_enhancer_side", + "top": "armourandtoolsmod:block/ingot_fusion_toll_enhancer_top" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/block/ingot_fusion_toll_enhancer_on.json b/src/generated/resources/assets/armourandtoolsmod/models/block/ingot_fusion_toll_enhancer_on.json new file mode 100644 index 00000000..6674fd43 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/block/ingot_fusion_toll_enhancer_on.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/orientable", + "textures": { + "front": "armourandtoolsmod:block/ingot_fusion_toll_enhancer_front", + "side": "armourandtoolsmod:block/ingot_fusion_toll_enhancer_side", + "top": "armourandtoolsmod:block/ingot_fusion_toll_enhancer_top" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/item/deepslate_imperium_ore.json b/src/generated/resources/assets/armourandtoolsmod/models/item/deepslate_imperium_ore.json new file mode 100644 index 00000000..b66f135c --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/item/deepslate_imperium_ore.json @@ -0,0 +1,3 @@ +{ + "parent": "armourandtoolsmod:block/deepslate_imperium_ore" +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/item/imperium.json b/src/generated/resources/assets/armourandtoolsmod/models/item/imperium.json new file mode 100644 index 00000000..56b07484 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/item/imperium.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "armourandtoolsmod:item/imperium" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/item/imperium_ore.json b/src/generated/resources/assets/armourandtoolsmod/models/item/imperium_ore.json new file mode 100644 index 00000000..60246089 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/item/imperium_ore.json @@ -0,0 +1,3 @@ +{ + "parent": "armourandtoolsmod:block/imperium_ore" +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/item/imperium_pickaxe.json b/src/generated/resources/assets/armourandtoolsmod/models/item/imperium_pickaxe.json new file mode 100644 index 00000000..7a5b2bc8 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/item/imperium_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "armourandtoolsmod:item/imperium_pickaxe" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/item/imperium_sword.json b/src/generated/resources/assets/armourandtoolsmod/models/item/imperium_sword.json new file mode 100644 index 00000000..9aa145d7 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/item/imperium_sword.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "armourandtoolsmod:item/imperium_sword" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/item/ingot_fusion_toll_enhancer.json b/src/generated/resources/assets/armourandtoolsmod/models/item/ingot_fusion_toll_enhancer.json new file mode 100644 index 00000000..1d1f350a --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/item/ingot_fusion_toll_enhancer.json @@ -0,0 +1,3 @@ +{ + "parent": "armourandtoolsmod:block/ingot_fusion_toll_enhancer" +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/item/magma_strike_pickaxe.json b/src/generated/resources/assets/armourandtoolsmod/models/item/magma_strike_pickaxe.json new file mode 100644 index 00000000..9ddd9220 --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/item/magma_strike_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "armourandtoolsmod:item/magma_strike_pickaxe" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/armourandtoolsmod/models/item/raw_imperium.json b/src/generated/resources/assets/armourandtoolsmod/models/item/raw_imperium.json new file mode 100644 index 00000000..5f09da7b --- /dev/null +++ b/src/generated/resources/assets/armourandtoolsmod/models/item/raw_imperium.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "armourandtoolsmod:item/raw_imperium" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/imperium_ingot.json b/src/generated/resources/data/armourandtoolsmod/advancements/imperium_ingot.json new file mode 100644 index 00000000..621ec00f --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/imperium_ingot.json @@ -0,0 +1,36 @@ +{ + "parent": "armourandtoolsmod:imperium_ore", + "criteria": { + "get_scrap": { + "conditions": { + "items": [ + { + "tag": "forge:ingots/imperium" + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "advancements.armourandtoolsmod.imperium_ingot.description" + }, + "frame": "goal", + "hidden": false, + "icon": { + "item": "armourandtoolsmod:imperium" + }, + "show_toast": true, + "title": { + "translate": "advancements.armourandtoolsmod.imperium_ingot.title" + } + }, + "requirements": [ + [ + "get_scrap" + ] + ], + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/advancements/imperium_ore.json new file mode 100644 index 00000000..b16252f8 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/imperium_ore.json @@ -0,0 +1,36 @@ +{ + "parent": "armourandtoolsmod:root", + "criteria": { + "get_ore": { + "conditions": { + "items": [ + { + "tag": "forge:ores/imperium_ores" + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "advancements.armourandtoolsmod.imperium_ore.description" + }, + "frame": "goal", + "hidden": false, + "icon": { + "item": "armourandtoolsmod:imperium_ore" + }, + "show_toast": true, + "title": { + "translate": "advancements.armourandtoolsmod.imperium_ore.title" + } + }, + "requirements": [ + [ + "get_ore" + ] + ], + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/imperium_tools.json b/src/generated/resources/data/armourandtoolsmod/advancements/imperium_tools.json new file mode 100644 index 00000000..c36528d5 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/imperium_tools.json @@ -0,0 +1,52 @@ +{ + "parent": "armourandtoolsmod:imperium_ingot", + "criteria": { + "imperium_pickaxe": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:imperium_pickaxe" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "imperium_sword": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:imperium_sword" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "advancements.armourandtoolsmod.imperium_tools.description" + }, + "frame": "goal", + "hidden": false, + "icon": { + "item": "armourandtoolsmod:imperium_sword", + "nbt": "{Damage:0}" + }, + "show_toast": true, + "title": { + "translate": "advancements.armourandtoolsmod.imperium_tools.title" + } + }, + "requirements": [ + [ + "imperium_sword", + "imperium_pickaxe" + ] + ], + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/building_blocks/ingot_fusion_toll_enhancer_recipe.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/building_blocks/ingot_fusion_toll_enhancer_recipe.json new file mode 100644 index 00000000..a630d59b --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/building_blocks/ingot_fusion_toll_enhancer_recipe.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:iron_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:ingot_fusion_toll_enhancer_recipe" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:ingot_fusion_toll_enhancer_recipe" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_deepslate_imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_deepslate_imperium_ore.json new file mode 100644 index 00000000..ea363cc3 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_deepslate_imperium_ore.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:deepslate_imperium_ore" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:blasting_deepslate_imperium_ore" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:blasting_deepslate_imperium_ore" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_ore.json new file mode 100644 index 00000000..7112e274 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_ore.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:imperium_ore" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:blasting_imperium_ore" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:blasting_imperium_ore" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_pickaxe.json new file mode 100644 index 00000000..2ba40543 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_pickaxe.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:imperium_pickaxe" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:blasting_imperium_pickaxe" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:blasting_imperium_pickaxe" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_sword.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_sword.json new file mode 100644 index 00000000..a6214f9d --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_imperium_sword.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:imperium_sword" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:blasting_imperium_sword" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:blasting_imperium_sword" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_imperium.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_imperium.json new file mode 100644 index 00000000..a093240f --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/blasting_raw_imperium.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:raw_imperium" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:blasting_raw_imperium" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:blasting_raw_imperium" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_deepslate_imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_deepslate_imperium_ore.json new file mode 100644 index 00000000..1db228cf --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_deepslate_imperium_ore.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:deepslate_imperium_ore" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:smelting_deepslate_imperium_ore" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:smelting_deepslate_imperium_ore" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_ore.json new file mode 100644 index 00000000..5a1dd1d9 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_ore.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:imperium_ore" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:smelting_imperium_ore" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:smelting_imperium_ore" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_pickaxe.json new file mode 100644 index 00000000..ac54ab95 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_pickaxe.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:imperium_pickaxe" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:smelting_imperium_pickaxe" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:smelting_imperium_pickaxe" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_sword.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_sword.json new file mode 100644 index 00000000..07114cd7 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_imperium_sword.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:imperium_sword" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:smelting_imperium_sword" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:smelting_imperium_sword" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_imperium.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_imperium.json new file mode 100644 index 00000000..2cc5922d --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/misc/smelting_raw_imperium.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:raw_imperium" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:smelting_raw_imperium" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:smelting_raw_imperium" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tool/magma_strike_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tool/magma_strike_pickaxe.json new file mode 100644 index 00000000..e7e0538b --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tool/magma_strike_pickaxe.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_imperium_ingot": { + "conditions": { + "items": [ + { + "items": [ + "armourandtoolsmod:imperium" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:magma_strike_pickaxe" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_imperium_ingot", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:magma_strike_pickaxe" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/imperium_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/imperium_pickaxe.json new file mode 100644 index 00000000..258d75c4 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/imperium_pickaxe.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "tag": "forge:ingots/imperium" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:imperium_pickaxe" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:imperium_pickaxe" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/imperium_sword.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/imperium_sword.json new file mode 100644 index 00000000..b65a977e --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/imperium_sword.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "tag": "forge:ingots/imperium" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:imperium_sword" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:imperium_sword" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_axe.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_axe.json new file mode 100644 index 00000000..6126f92c --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_axe.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "tag": "forge:ingots/sapphire" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:sapphire_axe" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:sapphire_axe" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_hoe.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_hoe.json new file mode 100644 index 00000000..e252cab7 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_hoe.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "tag": "forge:ingots/sapphire" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:sapphire_hoe" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:sapphire_hoe" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_pickaxe.json new file mode 100644 index 00000000..f99c92c9 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_pickaxe.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "tag": "forge:ingots/sapphire" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:sapphire_pickaxe" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:sapphire_pickaxe" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_shovel.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_shovel.json new file mode 100644 index 00000000..91735dea --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_shovel.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "tag": "forge:ingots/sapphire" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:sapphire_shovel" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:sapphire_shovel" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_sword.json b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_sword.json new file mode 100644 index 00000000..22f51d69 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/advancements/recipes/tools/sapphire_sword.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "tag": "forge:ingots/sapphire" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "armourandtoolsmod:sapphire_sword" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "armourandtoolsmod:sapphire_sword" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/loot_tables/blocks/deepslate_imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/loot_tables/blocks/deepslate_imperium_ore.json new file mode 100644 index 00000000..29e72189 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/loot_tables/blocks/deepslate_imperium_ore.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "armourandtoolsmod:deepslate_imperium_ore" + }, + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:ore_drops", + "function": "minecraft:apply_bonus" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "armourandtoolsmod:raw_imperium" + } + ] + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "armourandtoolsmod:blocks/deepslate_imperium_ore" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/loot_tables/blocks/imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/loot_tables/blocks/imperium_ore.json new file mode 100644 index 00000000..af420eef --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/loot_tables/blocks/imperium_ore.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "armourandtoolsmod:imperium_ore" + }, + { + "type": "minecraft:item", + "functions": [ + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:ore_drops", + "function": "minecraft:apply_bonus" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "armourandtoolsmod:raw_imperium" + } + ] + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "armourandtoolsmod:blocks/imperium_ore" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/loot_tables/blocks/ingot_fusion_toll_enhancer.json b/src/generated/resources/data/armourandtoolsmod/loot_tables/blocks/ingot_fusion_toll_enhancer.json new file mode 100644 index 00000000..8a25045a --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/loot_tables/blocks/ingot_fusion_toll_enhancer.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "armourandtoolsmod:ingot_fusion_toll_enhancer" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "armourandtoolsmod:blocks/ingot_fusion_toll_enhancer" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_axe.json b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_axe.json index e51f00df..eef90a44 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_axe.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_axe.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:amethyst_axe" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_boots.json b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_boots.json index 1a94ae34..65715d82 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_boots.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_boots.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:amethyst_boots" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_chestplate.json b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_chestplate.json index 04f404df..fee3b685 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_chestplate.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_chestplate.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:amethyst_chestplate" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_helmet.json b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_helmet.json index d391f26f..dfa45273 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_helmet.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_helmet.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:amethyst_helmet" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_leggings.json b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_leggings.json index 74309fbd..326d5b60 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_leggings.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_leggings.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:amethyst_leggings" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_pickaxe.json index 08f3ecb8..e1272b5f 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_pickaxe.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_pickaxe.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:amethyst_pickaxe" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_shovel.json b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_shovel.json index 7ab488f3..5b630461 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_shovel.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_shovel.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:amethyst_shovel" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_sword.json b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_sword.json index 3e19e349..4d8d014d 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_sword.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/amethyst_sword.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:amethyst_sword" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_boots.json b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_boots.json index 6c62d990..44dfdff6 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_boots.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_boots.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:aqumarine_boots" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_chestplate.json b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_chestplate.json index 6bec76a8..009c6dea 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_chestplate.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_chestplate.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:aqumarine_chestplate" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_helmet.json b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_helmet.json index a4f7847a..9527d5e2 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_helmet.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_helmet.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:aqumarine_helmet" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_leggings.json b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_leggings.json index 05ade97b..b06cb18c 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_leggings.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_leggings.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:aqumarine_leggings" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_shield.json b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_shield.json index 023b4f87..b5242061 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_shield.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_shield.json @@ -18,6 +18,16 @@ "SSS" ], "result": { - "item": "armourandtoolsmod:aqumarine_shield" - } + "item": "armourandtoolsmod:aqumarine_shield", + "nbt": { + "Enchantments": [ + { + "id": "minecraft:fire_aspect", + "lvl": 2 + } + ], + "HideFlags": 0 + } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_trident.json b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_trident.json index 65bd1291..b368f3fb 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_trident.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/aqumarine_trident.json @@ -15,6 +15,16 @@ " S " ], "result": { - "item": "armourandtoolsmod:aqumarine_trident" - } + "item": "armourandtoolsmod:aqumarine_trident", + "nbt": { + "Enchantments": [ + { + "id": "minecraft:fire_aspect", + "lvl": 2 + } + ], + "HideFlags": 0 + } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/blasting_deepslate_imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_deepslate_imperium_ore.json new file mode 100644 index 00000000..99be0324 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_deepslate_imperium_ore.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:blasting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:deepslate_imperium_ore" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/blasting_imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_imperium_ore.json new file mode 100644 index 00000000..8676bd9e --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_imperium_ore.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:blasting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:imperium_ore" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/blasting_imperium_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_imperium_pickaxe.json new file mode 100644 index 00000000..39369ee5 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_imperium_pickaxe.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:blasting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:imperium_pickaxe" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/blasting_imperium_sword.json b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_imperium_sword.json new file mode 100644 index 00000000..90171089 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_imperium_sword.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:blasting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:imperium_sword" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/blasting_raw_imperium.json b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_raw_imperium.json new file mode 100644 index 00000000..50607db5 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/blasting_raw_imperium.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:blasting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:raw_imperium" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_axe.json b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_axe.json index d38dec50..5b7eb807 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_axe.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_axe.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:enderite_axe" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_boots.json b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_boots.json index aaf48ace..18d48356 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_boots.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_boots.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:enderite_boots" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_chestplate.json b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_chestplate.json index c456bde8..6688c0cd 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_chestplate.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_chestplate.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:enderite_chestplate" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_helmet.json b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_helmet.json index d27d512d..e430ee24 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_helmet.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_helmet.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:enderite_helmet" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_hoe.json b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_hoe.json index b6cec871..939b3b9a 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_hoe.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_hoe.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:enderite_hoe" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_leggings.json b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_leggings.json index adc9ff28..7bc74496 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_leggings.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_leggings.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:enderite_leggings" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_pickaxe.json index d02cbcdf..3e3bae00 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_pickaxe.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_pickaxe.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:enderite_pickaxe" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_shovel.json b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_shovel.json index 0865554d..837007f0 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_shovel.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_shovel.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:enderite_shovel" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_sword.json b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_sword.json index c5aabb5a..eaf315ed 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/enderite_sword.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/enderite_sword.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:enderite_sword" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_boots.json b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_boots.json index 1400890f..eb3ed739 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_boots.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_boots.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:graphite_boots" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_chestplate.json b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_chestplate.json index 96606b0a..0a473d53 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_chestplate.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_chestplate.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:graphite_chestplate" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_helmet.json b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_helmet.json index a49400f6..4ced0f7e 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_helmet.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_helmet.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:graphite_helmet" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_leggings.json b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_leggings.json index 5bbfc72e..f9f2de09 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_leggings.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_leggings.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:graphite_leggings" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_shield.json b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_shield.json index b9d814aa..6c5bdac2 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/graphite_shield.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/graphite_shield.json @@ -18,6 +18,16 @@ "SSS" ], "result": { - "item": "armourandtoolsmod:graphite_shield" - } + "item": "armourandtoolsmod:graphite_shield", + "nbt": { + "Enchantments": [ + { + "id": "minecraft:fire_aspect", + "lvl": 2 + } + ], + "HideFlags": 0 + } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/imperium_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/recipes/imperium_pickaxe.json new file mode 100644 index 00000000..f722e19f --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/imperium_pickaxe.json @@ -0,0 +1,30 @@ +{ + "type": "armourandtoolsmod:custom_tool_crafter", + "category": "pickaxe", + "key": { + "A": { + "tag": "forge:ingots/imperium" + }, + "S": { + "item": "minecraft:stick" + } + }, + "pattern": [ + "AAA", + " S ", + " S " + ], + "result": { + "item": "armourandtoolsmod:imperium_pickaxe", + "nbt": { + "Enchantments": [ + { + "id": "minecraft:fire_aspect", + "lvl": 2 + } + ], + "HideFlags": 0 + } + }, + "showNotification": false +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/imperium_sword.json b/src/generated/resources/data/armourandtoolsmod/recipes/imperium_sword.json new file mode 100644 index 00000000..53b4b50e --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/imperium_sword.json @@ -0,0 +1,30 @@ +{ + "type": "armourandtoolsmod:custom_tool_crafter", + "category": "sword", + "key": { + "A": { + "tag": "forge:ingots/imperium" + }, + "S": { + "item": "minecraft:stick" + } + }, + "pattern": [ + " A ", + " A ", + " S " + ], + "result": { + "item": "armourandtoolsmod:imperium_sword", + "nbt": { + "Enchantments": [ + { + "id": "minecraft:fire_aspect", + "lvl": 2 + } + ], + "HideFlags": 0 + } + }, + "showNotification": false +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ingot_fusion_toll_enhancer_recipe.json b/src/generated/resources/data/armourandtoolsmod/recipes/ingot_fusion_toll_enhancer_recipe.json new file mode 100644 index 00000000..01461a08 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ingot_fusion_toll_enhancer_recipe.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "A": { + "item": "minecraft:iron_block" + }, + "B": { + "item": "minecraft:iron_ingot" + }, + "C": { + "tag": "minecraft:base_stone_overworld" + } + }, + "pattern": [ + "ABA", + "CBC", + "CBC" + ], + "result": { + "item": "armourandtoolsmod:ingot_fusion_toll_enhancer" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/magma_strike_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/recipes/magma_strike_pickaxe.json new file mode 100644 index 00000000..f082a6a0 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/magma_strike_pickaxe.json @@ -0,0 +1,18 @@ +{ + "type": "armourandtoolsmod:ingot_fusion_toll_enhancer", + "category": "tool", + "ingredient1": { + "item": "armourandtoolsmod:imperium" + }, + "ingredient2": { + "item": "armourandtoolsmod:imperium_pickaxe" + }, + "ingredient3": { + "item": "armourandtoolsmod:imperium" + }, + "result": { + "count": 1, + "item": "armourandtoolsmod:magma_strike_pickaxe", + "nbt": "{Damage:0}" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_boots.json b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_boots.json index ac1114b9..3c7f0d44 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_boots.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_boots.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:rainbow_boots" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_chestplate.json b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_chestplate.json index 508b23b8..0f08d851 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_chestplate.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_chestplate.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:rainbow_chestplate" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_helmet.json b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_helmet.json index b2c2febe..0c2a0335 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_helmet.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_helmet.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:rainbow_helmet" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_leggings.json b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_leggings.json index 56773331..a059df80 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_leggings.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_leggings.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:rainbow_leggings" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_shield.json b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_shield.json index f26c8bd2..5437aaba 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_shield.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/rainbow_shield.json @@ -18,6 +18,16 @@ "SSS" ], "result": { - "item": "armourandtoolsmod:rainbow_shield" - } + "item": "armourandtoolsmod:rainbow_shield", + "nbt": { + "Enchantments": [ + { + "id": "minecraft:fire_aspect", + "lvl": 2 + } + ], + "HideFlags": 0 + } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_axe.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_axe.json index 19f3ba51..c5ee8a7d 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_axe.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_axe.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:ruby_axe" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_boots.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_boots.json index 8b8b059c..cdbcb5a4 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_boots.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_boots.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:ruby_boots" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_chestplate.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_chestplate.json index 4e33d2ac..b010e62d 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_chestplate.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_chestplate.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:ruby_chestplate" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_helmet.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_helmet.json index dd32df2c..f275c0fa 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_helmet.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_helmet.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:ruby_helmet" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_hoe.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_hoe.json index 65daa05c..a36f3a7c 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_hoe.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_hoe.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:ruby_hoe" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_leggings.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_leggings.json index 50761a23..73aff652 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_leggings.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_leggings.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:ruby_leggings" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_pickaxe.json index e7973936..4c085e65 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_pickaxe.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_pickaxe.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:ruby_pickaxe" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_shield.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_shield.json index 7d1a7b80..5cacbbd0 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_shield.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_shield.json @@ -18,6 +18,16 @@ "SSS" ], "result": { - "item": "armourandtoolsmod:ruby_shield" - } + "item": "armourandtoolsmod:ruby_shield", + "nbt": { + "Enchantments": [ + { + "id": "minecraft:fire_aspect", + "lvl": 2 + } + ], + "HideFlags": 0 + } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_shovel.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_shovel.json index 9f610e63..f5ba2219 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_shovel.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_shovel.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:ruby_shovel" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_sword.json b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_sword.json index 6dc95bbd..c74b2fbe 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/ruby_sword.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/ruby_sword.json @@ -16,5 +16,6 @@ ], "result": { "item": "armourandtoolsmod:ruby_sword" - } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_axe.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_axe.json new file mode 100644 index 00000000..36d4e98a --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_axe.json @@ -0,0 +1,21 @@ +{ + "type": "armourandtoolsmod:custom_tool_crafter", + "category": "axe", + "key": { + "A": { + "tag": "forge:ingots/sapphire" + }, + "S": { + "item": "minecraft:stick" + } + }, + "pattern": [ + " AA", + " SA", + " S " + ], + "result": { + "item": "armourandtoolsmod:sapphire_axe" + }, + "showNotification": false +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_boots.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_boots.json index d033f2aa..bac95e2c 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_boots.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_boots.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:sapphire_boots" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_chestplate.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_chestplate.json index a7a9afb7..e5c8498f 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_chestplate.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_chestplate.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:sapphire_chestplate" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_helmet.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_helmet.json index 4dea964c..aa88b03c 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_helmet.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_helmet.json @@ -12,5 +12,6 @@ ], "result": { "item": "armourandtoolsmod:sapphire_helmet" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_hoe.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_hoe.json new file mode 100644 index 00000000..6a811dd5 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_hoe.json @@ -0,0 +1,21 @@ +{ + "type": "armourandtoolsmod:custom_tool_crafter", + "category": "hoe", + "key": { + "A": { + "tag": "forge:ingots/sapphire" + }, + "S": { + "item": "minecraft:stick" + } + }, + "pattern": [ + "AA ", + " S ", + " S " + ], + "result": { + "item": "armourandtoolsmod:sapphire_hoe" + }, + "showNotification": false +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_leggings.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_leggings.json index f0e5e8eb..8bd72dad 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_leggings.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_leggings.json @@ -13,5 +13,6 @@ ], "result": { "item": "armourandtoolsmod:sapphire_leggings" - } + }, + "show_notification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_pickaxe.json new file mode 100644 index 00000000..664b5a8d --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_pickaxe.json @@ -0,0 +1,21 @@ +{ + "type": "armourandtoolsmod:custom_tool_crafter", + "category": "pickaxe", + "key": { + "A": { + "tag": "forge:ingots/sapphire" + }, + "S": { + "item": "minecraft:stick" + } + }, + "pattern": [ + "AAA", + " S ", + " S " + ], + "result": { + "item": "armourandtoolsmod:sapphire_pickaxe" + }, + "showNotification": false +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_shield.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_shield.json index ed7d5459..bbf8cd2d 100644 --- a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_shield.json +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_shield.json @@ -18,6 +18,16 @@ "SSS" ], "result": { - "item": "armourandtoolsmod:sapphire_shield" - } + "item": "armourandtoolsmod:sapphire_shield", + "nbt": { + "Enchantments": [ + { + "id": "minecraft:fire_aspect", + "lvl": 2 + } + ], + "HideFlags": 0 + } + }, + "showNotification": false } \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_shovel.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_shovel.json new file mode 100644 index 00000000..b0eba9d9 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_shovel.json @@ -0,0 +1,21 @@ +{ + "type": "armourandtoolsmod:custom_tool_crafter", + "category": "shovel", + "key": { + "A": { + "tag": "forge:ingots/sapphire" + }, + "S": { + "item": "minecraft:stick" + } + }, + "pattern": [ + " A ", + " S ", + " S " + ], + "result": { + "item": "armourandtoolsmod:sapphire_shovel" + }, + "showNotification": false +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_sword.json b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_sword.json new file mode 100644 index 00000000..15368df1 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/sapphire_sword.json @@ -0,0 +1,21 @@ +{ + "type": "armourandtoolsmod:custom_tool_crafter", + "category": "sword", + "key": { + "A": { + "tag": "forge:ingots/sapphire" + }, + "S": { + "item": "minecraft:stick" + } + }, + "pattern": [ + " A ", + " A ", + " S " + ], + "result": { + "item": "armourandtoolsmod:sapphire_sword" + }, + "showNotification": false +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/smelting_deepslate_imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_deepslate_imperium_ore.json new file mode 100644 index 00000000..639c21fb --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_deepslate_imperium_ore.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smelting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:deepslate_imperium_ore" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/smelting_imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_imperium_ore.json new file mode 100644 index 00000000..c3c64141 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_imperium_ore.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smelting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:imperium_ore" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/smelting_imperium_pickaxe.json b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_imperium_pickaxe.json new file mode 100644 index 00000000..0b530dd7 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_imperium_pickaxe.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smelting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:imperium_pickaxe" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/smelting_imperium_sword.json b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_imperium_sword.json new file mode 100644 index 00000000..774266c0 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_imperium_sword.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smelting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:imperium_sword" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/recipes/smelting_raw_imperium.json b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_raw_imperium.json new file mode 100644 index 00000000..a1529ab1 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/recipes/smelting_raw_imperium.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smelting", + "cookingtime": 300, + "experience": 0.6, + "ingredient": { + "item": "armourandtoolsmod:raw_imperium" + }, + "result": "armourandtoolsmod:imperium" +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/worldgen/configured_feature/imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/worldgen/configured_feature/imperium_ore.json new file mode 100644 index 00000000..01991ce4 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/worldgen/configured_feature/imperium_ore.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:ore", + "config": { + "discard_chance_on_air_exposure": 0.0, + "size": 4, + "targets": [ + { + "state": { + "Name": "armourandtoolsmod:imperium_ore" + }, + "target": { + "block": "minecraft:netherrack", + "predicate_type": "minecraft:block_match" + } + } + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/armourandtoolsmod/worldgen/placed_feature/imperium_ore.json b/src/generated/resources/data/armourandtoolsmod/worldgen/placed_feature/imperium_ore.json new file mode 100644 index 00000000..00bf7750 --- /dev/null +++ b/src/generated/resources/data/armourandtoolsmod/worldgen/placed_feature/imperium_ore.json @@ -0,0 +1,27 @@ +{ + "feature": "armourandtoolsmod:imperium_ore", + "placement": [ + { + "type": "minecraft:count", + "count": 4 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 50 + }, + "min_inclusive": { + "absolute": -64 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/deepslate_ores/imperium_ores.json b/src/generated/resources/data/forge/tags/blocks/deepslate_ores/imperium_ores.json new file mode 100644 index 00000000..7f57287f --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/deepslate_ores/imperium_ores.json @@ -0,0 +1,5 @@ +{ + "values": [ + "armourandtoolsmod:deepslate_imperium_ore" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/ores/imperium_ores.json b/src/generated/resources/data/forge/tags/blocks/ores/imperium_ores.json new file mode 100644 index 00000000..1aff1254 --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/ores/imperium_ores.json @@ -0,0 +1,5 @@ +{ + "values": [ + "armourandtoolsmod:imperium_ore" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/deepslate_ores/imperium_ores.json b/src/generated/resources/data/forge/tags/items/deepslate_ores/imperium_ores.json new file mode 100644 index 00000000..7f57287f --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/deepslate_ores/imperium_ores.json @@ -0,0 +1,5 @@ +{ + "values": [ + "armourandtoolsmod:deepslate_imperium_ore" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/imperium.json b/src/generated/resources/data/forge/tags/items/ingots/imperium.json new file mode 100644 index 00000000..1e14f19d --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/imperium.json @@ -0,0 +1,5 @@ +{ + "values": [ + "armourandtoolsmod:imperium" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ores/imperium_ores.json b/src/generated/resources/data/forge/tags/items/ores/imperium_ores.json new file mode 100644 index 00000000..1aff1254 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ores/imperium_ores.json @@ -0,0 +1,5 @@ +{ + "values": [ + "armourandtoolsmod:imperium_ore" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 173de125..f4b6772a 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -12,13 +12,16 @@ "armourandtoolsmod:graphite_ore", "armourandtoolsmod:aqumarine_ore", "armourandtoolsmod:enderite_ore", + "armourandtoolsmod:imperium_ore", "armourandtoolsmod:deepslate_ruby_ore", "armourandtoolsmod:deepslate_rainbow_ore", "armourandtoolsmod:deepslate_sapphire_ore", "armourandtoolsmod:deepslate_graphite_ore", "armourandtoolsmod:deepslate_aqumarine_ore", + "armourandtoolsmod:deepslate_imperium_ore", "armourandtoolsmod:custom_armour_crafting_table", "armourandtoolsmod:custom_tool_crafting_table", + "armourandtoolsmod:ingot_fusion_toll_enhancer", "armourandtoolsmod:custom_armour_crafting_table" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json index 4fc36c66..0cf50ab7 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -1,7 +1,9 @@ { "values": [ "armourandtoolsmod:ruby_ore", + "armourandtoolsmod:imperium_ore", "armourandtoolsmod:deepslate_ruby_ore", + "armourandtoolsmod:deepslate_imperium_ore", "armourandtoolsmod:ruby_block" ] } \ No newline at end of file diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/IngotFusionTollEnhancer.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/IngotFusionTollEnhancer.java new file mode 100644 index 00000000..ed0a1078 --- /dev/null +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/IngotFusionTollEnhancer.java @@ -0,0 +1,213 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.blocks; + +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.IngotFusionTollEnhancerBlockEntity; +import io.github.realyusufismail.armourandtoolsmod.core.init.BlockEntityTypeInit; +import java.util.List; +import java.util.Objects; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.Container; +import net.minecraft.world.Containers; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.*; +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.BlockBehaviour; +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.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraftforge.network.NetworkHooks; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * @see net.minecraft.world.level.block.FurnaceBlock + */ +public class IngotFusionTollEnhancer extends BaseEntityBlock { + public static final BooleanProperty LIT = BlockStateProperties.LIT; + private static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; + + public IngotFusionTollEnhancer() { + super( + BlockBehaviour.Properties.of() + .strength(5.0F, 6.0F) + .sound(SoundType.METAL) + .mapColor(MapColor.DIAMOND)); + this.registerDefaultState( + defaultBlockState().setValue(FACING, Direction.NORTH).setValue(LIT, false)); + } + + public static @NotNull Component getContainerTitle() { + return Component.translatable("container.ingot_fusion_toll_enhancer"); + } + + public static Component getContainerDescription() { + return Component.translatable("container.ingot_fusion_toll_enhancer.description"); + } + + @Override + public @NotNull InteractionResult use( + @NotNull BlockState blockState, + @NotNull Level level, + @NotNull BlockPos blockPos, + @NotNull Player player, + @NotNull InteractionHand interactionHand, + @NotNull BlockHitResult blockHitResult) { + if (!level.isClientSide) { + BlockEntity blockEntity = level.getBlockEntity(blockPos); + if (blockEntity instanceof IngotFusionTollEnhancerBlockEntity) { + try { + Objects.requireNonNull(player, "Player is null"); + Objects.requireNonNull(blockEntity, "BlockEntity is null"); + + NetworkHooks.openScreen( + (ServerPlayer) player, (IngotFusionTollEnhancerBlockEntity) blockEntity, blockPos); + } catch (Exception e) { + throw new RuntimeException("Failed to open screen." + e); + } + } + } + return InteractionResult.sidedSuccess(level.isClientSide); + } + + @Override + public void onRemove( + BlockState oldState, + Level level, + BlockPos blockPos, + BlockState newState, + boolean movedByPiston) { + if (!oldState.is(newState.getBlock())) { + BlockEntity blockEntity = level.getBlockEntity(blockPos); + if (blockEntity instanceof IngotFusionTollEnhancerBlockEntity) { + if (level instanceof ServerLevel) { + Containers.dropContents(level, blockPos, (Container) blockEntity); + level.updateNeighbourForOutputSignal(blockPos, this); + } + level.updateNeighbourForOutputSignal(blockPos, this); + } + super.onRemove(oldState, level, blockPos, newState, movedByPiston); + } + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { + return new IngotFusionTollEnhancerBlockEntity(pPos, pState); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + return this.defaultBlockState() + .setValue(FACING, context.getHorizontalDirection().getOpposite()); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(FACING, LIT); + } + + @Override + public boolean hasDynamicShape() { + return true; + } + + /** + * @deprecated call via {@link + * net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase#hasAnalogOutputSignal} + * whenever possible. Implementing/overriding is fine. + */ + @Override + public boolean hasAnalogOutputSignal(BlockState pState) { + return true; + } + + /** + * The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED + * for TESR-only, LIQUID for vanilla liquids, INVISIBLE to skip all rendering + * + * @deprecated call via {@link + * net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase#getRenderShape} + * whenever possible. Implementing/overriding is fine. + */ + public @NotNull RenderShape getRenderShape(BlockState pState) { + return RenderShape.MODEL; + } + + /** + * Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, + * returns the passed blockstate. + * + * @deprecated call via {@link + * net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase#rotate} whenever + * possible. Implementing/overriding is fine. + */ + @Override + public BlockState rotate(BlockState pState, Rotation pRotation) { + return pState.setValue(FACING, pRotation.rotate(pState.getValue(FACING))); + } + + /** + * Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns + * the passed blockstate. + * + * @deprecated call via {@link + * net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase#mirror} whenever + * possible. Implementing/overriding is fine. + */ + @Override + public @NotNull BlockState mirror(BlockState pState, Mirror pMirror) { + return pState.rotate(pMirror.getRotation(pState.getValue(FACING))); + } + + @Override + public void appendHoverText( + ItemStack pStack, @Nullable BlockGetter pLevel, List pTooltip, TooltipFlag pFlag) { + pTooltip.add(getContainerDescription()); + } + + @Nullable + @Override + public BlockEntityTicker getTicker( + Level level, BlockState state, BlockEntityType type) { + return level.isClientSide + ? null + : createTickerHelper( + type, + BlockEntityTypeInit.INGOT_FUSION_TOLL_ENHANCER.get(), + IngotFusionTollEnhancerBlockEntity::serverTick); + } +} diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/armour/CustomArmourCraftingTableScreen.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/armour/CustomArmourCraftingTableScreen.java index 711207c3..5df64be0 100644 --- a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/armour/CustomArmourCraftingTableScreen.java +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/armour/CustomArmourCraftingTableScreen.java @@ -1,13 +1,29 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.realyusufismail.armourandtoolsmod.blocks.armour; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; +import java.util.Objects; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.ImageButton; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent; import net.minecraft.client.gui.screens.recipebook.RecipeUpdateListener; -import net.minecraft.client.renderer.GameRenderer; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -15,114 +31,137 @@ import net.minecraft.world.inventory.Slot; import org.jetbrains.annotations.NotNull; -import java.util.Objects; - -public class CustomArmourCraftingTableScreen extends AbstractContainerScreen - implements RecipeUpdateListener { - private static final ResourceLocation CRAFTING_TABLE_LOCATION = - new ResourceLocation("textures/gui/container/crafting_table.png"); - private static final ResourceLocation RECIPE_BUTTON_LOCATION = - new ResourceLocation("textures/gui/recipe_button.png"); - private final RecipeBookComponent recipeBookComponent = new RecipeBookComponent(); - private boolean widthTooNarrow; - - public CustomArmourCraftingTableScreen(CustomArmourCraftingTableMenu pMenu, Inventory pPlayerInventory, - Component pTitle) { - super(pMenu, pPlayerInventory, pTitle); - } - - protected void init() { - super.init(); - this.widthTooNarrow = this.width < 379; - this.recipeBookComponent.init(this.width, this.height, Objects.requireNonNull(this.minecraft, "Minecraft is null in table screen"), this.widthTooNarrow, - this.menu); - this.leftPos = this.recipeBookComponent.updateScreenPosition(this.width, this.imageWidth); - this.addRenderableWidget(new ImageButton(this.leftPos + 5, this.height / 2 - 49, 20, 18, 0, - 0, 19, RECIPE_BUTTON_LOCATION, (p_98484_) -> { - this.recipeBookComponent.toggleVisibility(); - this.leftPos = this.recipeBookComponent.updateScreenPosition(this.width, - this.imageWidth); - p_98484_.setPosition(this.leftPos + 5, this.height / 2 - 49); - })); - this.addWidget(this.recipeBookComponent); - this.setInitialFocus(this.recipeBookComponent); - this.titleLabelX = 29; - } - - public void containerTick() { - super.containerTick(); - this.recipeBookComponent.tick(); - } - - /** - * Renders the graphical user interface (GUI) element. - * @param pGuiGraphics the GuiGraphics object used for rendering. - * @param pMouseX the x-coordinate of the mouse cursor. - * @param pMouseY the y-coordinate of the mouse cursor. - * @param pPartialTick the partial tick time. - */ - public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { - this.renderBackground(pGuiGraphics); - if (this.recipeBookComponent.isVisible() && this.widthTooNarrow) { - this.renderBg(pGuiGraphics, pPartialTick, pMouseX, pMouseY); - this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); - } else { - this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); - super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); - this.recipeBookComponent.renderGhostRecipe(pGuiGraphics, this.leftPos, this.topPos, true, pPartialTick); - } - - this.renderTooltip(pGuiGraphics, pMouseX, pMouseY); - this.recipeBookComponent.renderTooltip(pGuiGraphics, this.leftPos, this.topPos, pMouseX, pMouseY); - } - - protected void renderBg(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) { - int i = this.leftPos; - int j = (this.height - this.imageHeight) / 2; - pGuiGraphics.blit(CRAFTING_TABLE_LOCATION, i, j, 0, 0, this.imageWidth, this.imageHeight); - } - - protected boolean isHovering(int pX, int pY, int pWidth, int pHeight, double pMouseX, - double pMouseY) { - return (!this.widthTooNarrow || !this.recipeBookComponent.isVisible()) - && super.isHovering(pX, pY, pWidth, pHeight, pMouseX, pMouseY); - } - - public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) { - if (this.recipeBookComponent.mouseClicked(pMouseX, pMouseY, pButton)) { - this.setFocused(this.recipeBookComponent); - return true; - } else { - return this.widthTooNarrow && this.recipeBookComponent.isVisible() || super.mouseClicked(pMouseX, pMouseY, pButton); - } - } - - protected boolean hasClickedOutside(double pMouseX, double pMouseY, int pGuiLeft, int pGuiTop, - int pMouseButton) { - boolean flag = pMouseX < (double) pGuiLeft || pMouseY < (double) pGuiTop - || pMouseX >= (double) (pGuiLeft + this.imageWidth) - || pMouseY >= (double) (pGuiTop + this.imageHeight); - return this.recipeBookComponent.hasClickedOutside(pMouseX, pMouseY, this.leftPos, - this.topPos, this.imageWidth, this.imageHeight, pMouseButton) && flag; - } - - /** - * Called when the mouse is clicked over a slot or outside the gui. - */ - protected void slotClicked(@NotNull Slot pSlot, int pSlotId, int pMouseButton, @NotNull ClickType pType) { - super.slotClicked(pSlot, pSlotId, pMouseButton, pType); - this.recipeBookComponent.slotClicked(pSlot); - } - - public void recipesUpdated() { - this.recipeBookComponent.recipesUpdated(); - } - - public void removed() { - super.removed(); +public class CustomArmourCraftingTableScreen + extends AbstractContainerScreen implements RecipeUpdateListener { + private static final ResourceLocation CRAFTING_TABLE_LOCATION = + new ResourceLocation("textures/gui/container/crafting_table.png"); + private static final ResourceLocation RECIPE_BUTTON_LOCATION = + new ResourceLocation("textures/gui/recipe_button.png"); + private final RecipeBookComponent recipeBookComponent = new RecipeBookComponent(); + private boolean widthTooNarrow; + + public CustomArmourCraftingTableScreen( + CustomArmourCraftingTableMenu pMenu, Inventory pPlayerInventory, Component pTitle) { + super(pMenu, pPlayerInventory, pTitle); + } + + protected void init() { + super.init(); + this.widthTooNarrow = this.width < 379; + this.recipeBookComponent.init( + this.width, + this.height, + Objects.requireNonNull(this.minecraft, "Minecraft is null in table screen"), + this.widthTooNarrow, + this.menu); + this.leftPos = this.recipeBookComponent.updateScreenPosition(this.width, this.imageWidth); + this.addRenderableWidget( + new ImageButton( + this.leftPos + 5, + this.height / 2 - 49, + 20, + 18, + 0, + 0, + 19, + RECIPE_BUTTON_LOCATION, + (p_98484_) -> { + this.recipeBookComponent.toggleVisibility(); + this.leftPos = + this.recipeBookComponent.updateScreenPosition(this.width, this.imageWidth); + p_98484_.setPosition(this.leftPos + 5, this.height / 2 - 49); + })); + this.addWidget(this.recipeBookComponent); + this.setInitialFocus(this.recipeBookComponent); + this.titleLabelX = 29; + } + + public void containerTick() { + super.containerTick(); + this.recipeBookComponent.tick(); + } + + /** + * Renders the graphical user interface (GUI) element. + * + * @param pGuiGraphics the GuiGraphics object used for rendering. + * @param pMouseX the x-coordinate of the mouse cursor. + * @param pMouseY the y-coordinate of the mouse cursor. + * @param pPartialTick the partial tick time. + */ + public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { + this.renderBackground(pGuiGraphics); + if (this.recipeBookComponent.isVisible() && this.widthTooNarrow) { + this.renderBg(pGuiGraphics, pPartialTick, pMouseX, pMouseY); + this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); + } else { + this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); + super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); + this.recipeBookComponent.renderGhostRecipe( + pGuiGraphics, this.leftPos, this.topPos, true, pPartialTick); } - public @NotNull RecipeBookComponent getRecipeBookComponent() { - return this.recipeBookComponent; + this.renderTooltip(pGuiGraphics, pMouseX, pMouseY); + this.recipeBookComponent.renderTooltip( + pGuiGraphics, this.leftPos, this.topPos, pMouseX, pMouseY); + } + + protected void renderBg(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) { + int i = this.leftPos; + int j = (this.height - this.imageHeight) / 2; + pGuiGraphics.blit(CRAFTING_TABLE_LOCATION, i, j, 0, 0, this.imageWidth, this.imageHeight); + } + + protected boolean isHovering( + int pX, int pY, int pWidth, int pHeight, double pMouseX, double pMouseY) { + return (!this.widthTooNarrow || !this.recipeBookComponent.isVisible()) + && super.isHovering(pX, pY, pWidth, pHeight, pMouseX, pMouseY); + } + + public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) { + if (this.recipeBookComponent.mouseClicked(pMouseX, pMouseY, pButton)) { + this.setFocused(this.recipeBookComponent); + return true; + } else { + return this.widthTooNarrow && this.recipeBookComponent.isVisible() + || super.mouseClicked(pMouseX, pMouseY, pButton); } + } + + protected boolean hasClickedOutside( + double pMouseX, double pMouseY, int pGuiLeft, int pGuiTop, int pMouseButton) { + boolean flag = + pMouseX < (double) pGuiLeft + || pMouseY < (double) pGuiTop + || pMouseX >= (double) (pGuiLeft + this.imageWidth) + || pMouseY >= (double) (pGuiTop + this.imageHeight); + return this.recipeBookComponent.hasClickedOutside( + pMouseX, + pMouseY, + this.leftPos, + this.topPos, + this.imageWidth, + this.imageHeight, + pMouseButton) + && flag; + } + + /** Called when the mouse is clicked over a slot or outside the gui. */ + protected void slotClicked( + @NotNull Slot pSlot, int pSlotId, int pMouseButton, @NotNull ClickType pType) { + super.slotClicked(pSlot, pSlotId, pMouseButton, pType); + this.recipeBookComponent.slotClicked(pSlot); + } + + public void recipesUpdated() { + this.recipeBookComponent.recipesUpdated(); + } + + public void removed() { + super.removed(); + } + + public @NotNull RecipeBookComponent getRecipeBookComponent() { + return this.recipeBookComponent; + } } diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/IngotFusionTollEnhancerBlockEntity.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/IngotFusionTollEnhancerBlockEntity.java new file mode 100644 index 00000000..3403c576 --- /dev/null +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/IngotFusionTollEnhancerBlockEntity.java @@ -0,0 +1,507 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.blocks.infusion; + +import com.google.common.collect.Lists; +import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod; +import io.github.realyusufismail.armourandtoolsmod.blocks.IngotFusionTollEnhancer; +import io.github.realyusufismail.armourandtoolsmod.core.init.BlockEntityTypeInit; +import io.github.realyusufismail.armourandtoolsmod.core.init.BlockInit; +import io.github.realyusufismail.armourandtoolsmod.core.init.ItemInit; +import io.github.realyusufismail.armourandtoolsmod.core.init.RecipeTypeInit; +import io.github.realyusufismail.armourandtoolsmod.recipe.infusion.IngotFusionTollEnhancerRecipe; +import it.unimi.dsi.fastutil.objects.Object2IntMap; +import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.val; +import net.minecraft.SharedConstants; +import net.minecraft.Util; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.tags.ItemTags; +import net.minecraft.util.Mth; +import net.minecraft.world.*; +import net.minecraft.world.entity.ExperienceOrb; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.player.StackedContents; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ContainerData; +import net.minecraft.world.inventory.RecipeHolder; +import net.minecraft.world.inventory.StackedContentsCompatible; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.AbstractCookingRecipe; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeManager; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity; +import net.minecraft.world.level.block.entity.BaseContainerBlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * @see net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity + */ +public class IngotFusionTollEnhancerBlockEntity extends BaseContainerBlockEntity + implements WorldlyContainer, RecipeHolder, StackedContentsCompatible { + + @Getter + private final RecipeManager.CachedCheck quickCheck; + + // recipe + private final RecipeType type = + RecipeTypeInit.INGOT_FUSION_TOLL_ENHANCER.get(); + + private final Object2IntOpenHashMap recipesUsed = new Object2IntOpenHashMap<>(); + + // slots + public static final int NUMBER_OF_SLOTS = 5; + public static final int FUEL_SLOT = 3; + public static final int RESULT_SLOT = 4; + public static final int NUMBER_OF_DATA = 3; + + @Getter + private NonNullList items = NonNullList.withSize(NUMBER_OF_SLOTS, ItemStack.EMPTY); + + // ingredients + private ItemStack ingredient1; + private ItemStack ingredient2; + private ItemStack ingredient3; + + // data + @Getter @Setter int creatingTime = 0; + @Getter @Setter int creatingTotalTime = 200; + @Getter @Setter int fuel = 0; + + protected final ContainerData dataAccess = + new ContainerData() { + public int get(int p_58431_) { + return switch (p_58431_) { + case 0 -> IngotFusionTollEnhancerBlockEntity.this.creatingTime; + case 1 -> IngotFusionTollEnhancerBlockEntity.this.creatingTotalTime; + case 2 -> IngotFusionTollEnhancerBlockEntity.this.fuel; + default -> throw new IllegalArgumentException("Invalid index: " + p_58431_); + }; + } + + public void set(int p_58433_, int p_58434_) { + switch (p_58433_) { + case 0 -> IngotFusionTollEnhancerBlockEntity.this.creatingTime = p_58434_; + case 1 -> IngotFusionTollEnhancerBlockEntity.this.creatingTotalTime = p_58434_; + case 2 -> IngotFusionTollEnhancerBlockEntity.this.fuel = p_58434_; + } + } + + public int getCount() { + return NUMBER_OF_DATA; + } + }; + + public IngotFusionTollEnhancerBlockEntity(BlockPos blockPos, BlockState blockState) { + super(BlockEntityTypeInit.INGOT_FUSION_TOLL_ENHANCER.get(), blockPos, blockState); + + this.quickCheck = RecipeManager.createCheck(RecipeTypeInit.INGOT_FUSION_TOLL_ENHANCER.get()); + } + + @Override + public void load(CompoundTag pTag) { + super.load(pTag); + this.items = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); + ContainerHelper.loadAllItems(pTag, this.items); + this.creatingTime = pTag.getInt("CraftTime"); + this.creatingTotalTime = pTag.getInt("CraftTimeTotal"); + this.fuel = getFuels().getOrDefault(this.items.get(FUEL_SLOT).getItem(), 0); + + val compoundtag = pTag.getCompound("RecipesUsed"); + + for (String s : compoundtag.getAllKeys()) { + this.recipesUsed.put(new ResourceLocation(s), compoundtag.getInt(s)); + } + } + + @Override + protected void saveAdditional(CompoundTag pTag) { + pTag.putInt("CraftTime", this.creatingTime); + pTag.putInt("CraftTimeTotal", this.creatingTotalTime); + pTag.putInt("Fuel", this.fuel); + + ContainerHelper.saveAllItems(pTag, this.items); + val compoundtag = new CompoundTag(); + this.recipesUsed.forEach( + (p_187449_, p_187450_) -> { + compoundtag.putInt(p_187449_.toString(), p_187450_); + }); + + pTag.put("RecipesUsed", compoundtag); + + super.saveAdditional(pTag); + } + + @Override + protected @NotNull Component getDefaultName() { + return IngotFusionTollEnhancer.getContainerTitle(); + } + + @Override + protected AbstractContainerMenu createMenu(int pContainerId, Inventory pInventory) { + ArmourAndToolsMod.ArmorAndToolsMod.getLogger().info("Creating menu"); + return new IngotFusionTollEnhancerMenu(pContainerId, this, this.dataAccess, pInventory); + } + + @Override + public int getContainerSize() { + return this.items.size(); + } + + @Override + public boolean isEmpty() { + for (ItemStack itemstack : this.items) { + if (!itemstack.isEmpty()) { + return false; + } + } + + return true; + } + + @Override + public ItemStack getItem(int pSlot) { + return pSlot >= 0 && pSlot < this.items.size() ? this.items.get(pSlot) : ItemStack.EMPTY; + } + + @Override + public ItemStack removeItem(int pSlot, int pAmount) { + return ContainerHelper.removeItem(this.items, pSlot, pAmount); + } + + @Override + public ItemStack removeItemNoUpdate(int pSlot) { + return ContainerHelper.takeItem(this.items, pSlot); + } + + @Override + public void setItem(int pSlot, ItemStack pStack) { + if (pSlot >= 0 && pSlot < this.items.size()) { + this.items.set(pSlot, pStack); + } + } + + @Override + public boolean stillValid(Player pPlayer) { + if (this.level.getBlockEntity(this.worldPosition) != this) { + return false; + } else { + return pPlayer.distanceToSqr( + (double) this.worldPosition.getX() + 0.5D, + (double) this.worldPosition.getY() + 0.5D, + (double) this.worldPosition.getZ() + 0.5D) + <= 64.0D; + } + } + + @Override + public void clearContent() { + this.items.clear(); + } + + public static void serverTick( + @NotNull Level level, + @NotNull BlockPos pos, + @NotNull BlockState state, + @NotNull IngotFusionTollEnhancerBlockEntity blockEntity) { + ItemStack itemstack = blockEntity.items.get(FUEL_SLOT); + + // Do i need blockEntity.fuel in this if statement? + if (blockEntity.fuel <= 0 && getFuels().containsKey(itemstack.getItem())) { + blockEntity.fuel = getFuels().get(itemstack.getItem()); + itemstack.shrink(1); + blockEntity.setChanged(); + } + + boolean flag = blockEntity.isCreatable(level); + boolean flag1 = blockEntity.creatingTime > 0; + ItemStack ingredient1 = blockEntity.items.get(0); + ItemStack ingredient2 = blockEntity.items.get(1); + ItemStack ingredient3 = blockEntity.items.get(2); + if (flag1) { // Says flag is false + --blockEntity.creatingTime; + boolean flag2 = blockEntity.creatingTime == 0; + if (flag2 && flag) { + blockEntity.createItem(level); + blockEntity.setChanged(); + } else if (!flag) { + blockEntity.creatingTime = 0; + blockEntity.setChanged(); + } else if (blockEntity.ingredient1 != ingredient1 + || blockEntity.ingredient2 != ingredient2 + || blockEntity.ingredient3 != ingredient3) { + blockEntity.creatingTime = 0; + blockEntity.setChanged(); + } + } else if (flag && blockEntity.fuel > 0) { + --blockEntity.fuel; + // TODO: Add ability to alter creating time. + blockEntity.creatingTime = 200; + blockEntity.ingredient1 = ingredient1; + blockEntity.ingredient2 = ingredient2; + blockEntity.ingredient3 = ingredient3; + blockEntity.setChanged(); + } + } + + private boolean isCreatable(Level level) { + ItemStack ingredient1 = this.items.get(0); + ItemStack ingredient2 = this.items.get(1); + ItemStack ingredient3 = this.items.get(2); + + if (!ingredient1.isEmpty() && !ingredient2.isEmpty() && !ingredient3.isEmpty()) { + + // TODO: Need to check this for loop + for (int i = 0; i < 3; ++i) { + if (!this.items.get(i).isEmpty()) { + if (!this.items.get(RESULT_SLOT).isEmpty()) { + continue; + } + + ItemStack ingredient = this.items.get(i); + if (!ingredient.isEmpty() && hasRecipe(ingredient)) { + return true; + } + } + } + } + return false; + } + + private void createItem(Level level) { + var ingredient1 = this.items.get(0); + var ingredient2 = this.items.get(1); + var ingredient3 = this.items.get(2); + + var output = getOutput(level, ingredient1, ingredient2, ingredient3); + this.items.set(RESULT_SLOT, output); + + val blockPos = this.getBlockPos(); + if (ingredient1.hasCraftingRemainingItem()) { + val ingredient1Remaining = ingredient1.getCraftingRemainingItem(); + ingredient1.shrink(1); + if (ingredient1.isEmpty()) { + ingredient1 = ingredient1Remaining; + } else if (!this.level.isClientSide) { + Containers.dropItemStack( + this.level, + (double) blockPos.getX(), + (double) blockPos.getY(), + (double) blockPos.getZ(), + ingredient1Remaining); + } + } else { + ingredient1.shrink(1); + } + + if (ingredient2.hasCraftingRemainingItem()) { + val ingredient2Remaining = ingredient2.getCraftingRemainingItem(); + ingredient2.shrink(1); + if (ingredient2.isEmpty()) { + ingredient2 = ingredient2Remaining; + } else if (!this.level.isClientSide) { + Containers.dropItemStack( + this.level, + (double) blockPos.getX(), + (double) blockPos.getY(), + (double) blockPos.getZ(), + ingredient2Remaining); + } + } else { + ingredient2.shrink(1); + } + + if (ingredient3.hasCraftingRemainingItem()) { + val ingredient3Remaining = ingredient3.getCraftingRemainingItem(); + ingredient3.shrink(1); + if (ingredient3.isEmpty()) { + ingredient3 = ingredient3Remaining; + } else if (!this.level.isClientSide) { + Containers.dropItemStack( + this.level, + (double) blockPos.getX(), + (double) blockPos.getY(), + (double) blockPos.getZ(), + ingredient3Remaining); + } + } else { + ingredient3.shrink(1); + } + + this.items.set(0, ingredient1); + this.items.set(1, ingredient2); + this.items.set(2, ingredient3); + + // level.levelEvent(1035, blockpos, 0); + level.levelEvent( + 1035, blockPos, this.items.get(4).isEmpty() ? 0 : this.items.get(4).getCount()); + } + + private boolean hasRecipe(ItemStack ingredient) { + return level.getRecipeManager().getAllRecipesFor(type).stream() + .anyMatch(recipe -> recipe.isIngredient(ingredient)); + } + + private ItemStack getOutput( + Level level, ItemStack ingredient1, ItemStack ingredient2, ItemStack ingredient3) { + return level.getRecipeManager().getAllRecipesFor(type).stream() + .map(recipe -> recipe.getResult(ingredient1, ingredient2, ingredient3)) + .filter(itemStack -> !itemStack.isEmpty()) + .findFirst() + .orElse(ItemStack.EMPTY); + } + + public static Map getFuels() { + Map map = new LinkedHashMap<>(AbstractFurnaceBlockEntity.getFuel()); + addFuel(map, ItemInit.INSTANCE.getGRAPHITE().get(), 200); + addFuel(map, BlockInit.INSTANCE.getGRAPHITE_BLOCK().get().asItem(), 2000); + return map; + } + + public static void addFuel(Map pMap, Item fuel, int pBurnTime) { + if (!isNeverAIngotFusionTollEnhanceFuel(fuel)) { + pMap.put(fuel, pBurnTime); + } else { + if (SharedConstants.IS_RUNNING_IN_IDE) { + throw (Util.pauseInIde( + new IllegalStateException( + "A developer tried to explicitly make fire resistant item " + + fuel.getName(null).getString() + + " a IngotFusionTollEnhancer fuel. That will not work!"))); + } + } + } + + public static boolean isNeverAIngotFusionTollEnhanceFuel(Item pItem) { + return pItem.builtInRegistryHolder().is(ItemTags.NON_FLAMMABLE_WOOD); + } + + public static Set getFuelAsItemStacks() { + return getFuels().keySet().stream() + .map(ItemStack::new) + .collect(java.util.stream.Collectors.toSet()); + } + + @Override + public int[] getSlotsForFace(Direction pSide) { + return switch (pSide) { + case DOWN -> new int[] {RESULT_SLOT}; + case UP -> new int[] {FUEL_SLOT}; + default -> new int[] {0, 1, 2, 3, 4}; + }; + } + + @Override + public boolean canPlaceItemThroughFace( + int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) { + return this.canPlaceItem(pIndex, pItemStack); + } + + @Override + public boolean canTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) { + return pIndex != FUEL_SLOT || pStack.getItem() == Items.BUCKET; + } + + @Override + public void setRecipeUsed(@Nullable Recipe pRecipe) { + if (pRecipe != null) { + ResourceLocation resourcelocation = pRecipe.getId(); + this.recipesUsed.addTo(resourcelocation, 1); + } + } + + @Nullable + @Override + public Recipe getRecipeUsed() { + return null; + } + + @Override + public void fillStackedContents(StackedContents pContents) { + for (ItemStack itemstack : this.items) { + pContents.accountStack(itemstack); + } + } + + public void awardUsedRecipes(Player pPlayer, List pItems) {} + + public void awardUsedRecipesAndPopExperience(ServerPlayer pPlayer) { + List> list = + this.getRecipesToAwardAndPopExperience(pPlayer.serverLevel(), pPlayer.position()); + pPlayer.awardRecipes(list); + + for (Recipe recipe : list) { + if (recipe != null) { + pPlayer.triggerRecipeCrafted(recipe, this.items); + } + } + + this.recipesUsed.clear(); + } + + public List> getRecipesToAwardAndPopExperience(ServerLevel pLevel, Vec3 pPopVec) { + List> list = Lists.newArrayList(); + + for (Object2IntMap.Entry entry : this.recipesUsed.object2IntEntrySet()) { + pLevel + .getRecipeManager() + .byKey(entry.getKey()) + .ifPresent( + (p_155023_) -> { + list.add(p_155023_); + createExperience( + pLevel, + pPopVec, + entry.getIntValue(), + ((AbstractCookingRecipe) p_155023_).getExperience()); + }); + } + + return list; + } + + private static void createExperience( + ServerLevel pLevel, Vec3 pPopVec, int pRecipeIndex, float pExperience) { + int i = Mth.floor((float) pRecipeIndex * pExperience); + float f = Mth.frac((float) pRecipeIndex * pExperience); + if (f != 0.0F && Math.random() < (double) f) { + ++i; + } + + ExperienceOrb.award(pLevel, pPopVec, i); + } +} diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/IngotFusionTollEnhancerMenu.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/IngotFusionTollEnhancerMenu.java new file mode 100644 index 00000000..86f54bb2 --- /dev/null +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/IngotFusionTollEnhancerMenu.java @@ -0,0 +1,225 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.blocks.infusion; + +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.slots.InfusionFuelSlot; +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.slots.OutputSlotItemHandler; +import io.github.realyusufismail.armourandtoolsmod.core.init.MenuTypeInit; +import io.github.realyusufismail.armourandtoolsmod.core.init.RecipeBookTypesInit; +import io.github.realyusufismail.armourandtoolsmod.core.init.RecipeTypeInit; +import io.github.realyusufismail.armourandtoolsmod.recipe.infusion.IngotFusionTollEnhancerRecipe; +import lombok.val; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.player.StackedContents; +import net.minecraft.world.inventory.*; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BaseContainerBlockEntity; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.items.SlotItemHandler; +import org.jetbrains.annotations.NotNull; + +/** + * @see net.minecraft.stats.RecipeBookSettings + * @see FurnaceMenu + */ +public class IngotFusionTollEnhancerMenu extends RecipeBookMenu { + private final RecipeType recipeType; + private final RecipeBookType recipeBook; + private final Level level; + private static final int NUMBER_OF_SLOTS = 5; + private final ContainerData data; + private final BaseContainerBlockEntity blockEntity; + + public IngotFusionTollEnhancerMenu( + int pContainerId, + BaseContainerBlockEntity blockEntity, + ContainerData data, + @NotNull Inventory pInventory) { + super(MenuTypeInit.INGOT_FUSION_TOLL_ENHANCER_MENU.get(), pContainerId); + this.recipeType = RecipeTypeInit.INGOT_FUSION_TOLL_ENHANCER.get(); + this.recipeBook = RecipeBookTypesInit.INGOT_FUSION; + this.level = pInventory.player.level(); + this.data = data; + this.blockEntity = blockEntity; + + checkContainerSize(blockEntity, NUMBER_OF_SLOTS); + checkContainerDataCount(data, IngotFusionTollEnhancerBlockEntity.NUMBER_OF_DATA); + + addPlayerInventory(pInventory); + addPlayerHotbar(pInventory); + + blockEntity + .getCapability(ForgeCapabilities.ITEM_HANDLER) + .ifPresent( + it -> { + // slots to place ingredients + addSlot(new SlotItemHandler(it, 0, 16, 40)); + addSlot(new SlotItemHandler(it, 1, 43, 40)); + addSlot(new SlotItemHandler(it, 2, 70, 40)); + + // slot to place fuel + addSlot(new InfusionFuelSlot(it, this)); + + // slot to place result + addSlot(new OutputSlotItemHandler(it, pInventory.player)); + }); + + addDataSlots(data); + } + + public IngotFusionTollEnhancerMenu(int pContainerId, Inventory inventory, FriendlyByteBuf data) { + this( + pContainerId, + getBlockEntity(inventory, data), + new SimpleContainerData(IngotFusionTollEnhancerBlockEntity.NUMBER_OF_DATA), + inventory); + } + + private void addPlayerInventory(Inventory playerInventory) { + for (int row = 0; row < 3; row++) { + for (int col = 0; col < 9; col++) { + addSlot( + new Slot( + playerInventory, col + row * 9 + 9, 8 + col * 18, 166 - (4 - row) * 18 - 10 + 13)); + } + } + } + + private void addPlayerHotbar(Inventory playerInventory) { + for (int col = 0; col < 9; col++) { + addSlot(new Slot(playerInventory, col, 8 + col * 18, 142 + 13)); + } + } + + public static BaseContainerBlockEntity getBlockEntity(Inventory inventory, FriendlyByteBuf data) { + BaseContainerBlockEntity blockEntity = + (BaseContainerBlockEntity) inventory.player.level().getBlockEntity(data.readBlockPos()); + if (blockEntity != null) { + return blockEntity; + } else { + throw new IllegalStateException("Block entity is not correct"); + } + } + + @Override + public boolean stillValid(Player pPlayer) { + return this.blockEntity.stillValid(pPlayer); + } + + public int getCreatingTime() { + return this.data.get(0); + } + + public int getMaxCreatingTime() { + return this.data.get(1); + } + + public int getCreatingProgress() { + val creatingTime = getCreatingTime(); + val maxCreatingTime = getMaxCreatingTime(); + + return maxCreatingTime != 0 && creatingTime != 0 ? creatingTime * 24 / maxCreatingTime : 0; + } + + @Override + public @NotNull ItemStack quickMoveStack(Player pPlayer, int slotId) { + ItemStack itemstack = ItemStack.EMPTY; + Slot slot = this.slots.get(slotId); + if (slot != null && slot.hasItem()) { + ItemStack itemstack1 = slot.getItem(); + itemstack = itemstack1.copy(); + if (slotId < NUMBER_OF_SLOTS + && !moveItemStackTo(itemstack1, NUMBER_OF_SLOTS, this.slots.size(), true)) { + return ItemStack.EMPTY; + } + + if (!moveItemStackTo(itemstack1, 0, NUMBER_OF_SLOTS, false)) { + return ItemStack.EMPTY; + } else if (slotId < NUMBER_OF_SLOTS) { + // TODO: check if this is correct + slot.onQuickCraft(itemstack1, itemstack); + } + + if (itemstack1.isEmpty()) { + slot.set(ItemStack.EMPTY); + } else { + slot.setChanged(); + } + } + + return itemstack; + } + + @Override + public void fillCraftSlotsStackedContents(StackedContents pItemHelper) { + if (this.blockEntity instanceof StackedContentsCompatible) { + ((StackedContentsCompatible) this.blockEntity).fillStackedContents(pItemHelper); + } + } + + @Override + public void clearCraftingContent() { + this.slots.get(NUMBER_OF_SLOTS).set(ItemStack.EMPTY); + } + + @Override + public boolean recipeMatches(Recipe pRecipe) { + return pRecipe.matches(this.blockEntity, this.level); + } + + @Override + public int getResultSlotIndex() { + return 4; + } + + @Override + public int getGridWidth() { + return 1; + } + + @Override + public int getGridHeight() { + return 1; + } + + @Override + public int getSize() { + return NUMBER_OF_SLOTS; + } + + public boolean isFuel(ItemStack pStack) { + return IngotFusionTollEnhancerBlockEntity.getFuels().containsKey(pStack.getItem()); + } + + @Override + public @NotNull RecipeBookType getRecipeBookType() { + return recipeBook; + } + + @Override + public boolean shouldMoveToInventory(int pSlotIndex) { + return pSlotIndex != this.getResultSlotIndex(); + } +} diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/IngotFusionTollEnhancerScreen.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/IngotFusionTollEnhancerScreen.java new file mode 100644 index 00000000..6b174b70 --- /dev/null +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/IngotFusionTollEnhancerScreen.java @@ -0,0 +1,228 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.blocks.infusion; + +import com.mojang.blaze3d.systems.RenderSystem; +import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod; +import io.github.realyusufismail.armourandtoolsmod.blocks.IngotFusionTollEnhancer; +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.book.IngotFusionTollEnhancerRecipeBookComponent; +import java.util.Objects; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.ImageButton; +import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent; +import net.minecraft.client.gui.screens.recipebook.RecipeUpdateListener; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.ClickType; +import net.minecraft.world.inventory.Slot; +import org.jetbrains.annotations.NotNull; + +/** + * @see net.minecraft.client.gui.screens.inventory.FurnaceScreen + */ +public class IngotFusionTollEnhancerScreen + extends AbstractContainerScreen implements RecipeUpdateListener { + public static final ResourceLocation SCREEN_ID = + ArmourAndToolsMod.ArmorAndToolsMod.getModIdAndName( + "textures/gui/container/ingot_fusion_toll_enhancer.png"); + public final IngotFusionTollEnhancerRecipeBookComponent recipeBookComponent = + new IngotFusionTollEnhancerRecipeBookComponent(); + private static final ResourceLocation RECIPE_BUTTON_LOCATION = + new ResourceLocation("textures/gui/recipe_button.png"); + private boolean widthTooNarrow; + + public IngotFusionTollEnhancerScreen( + IngotFusionTollEnhancerMenu pMenu, Inventory pPlayerInventory, Component pTitle) { + super(pMenu, pPlayerInventory, pTitle); + } + + protected void init() { + super.init(); + this.widthTooNarrow = this.width < 379; + this.recipeBookComponent.init( + this.width, + this.height, + Objects.requireNonNull(this.minecraft, "Minecraft is null in table screen"), + this.widthTooNarrow, + this.menu); + this.leftPos = this.recipeBookComponent.updateScreenPosition(this.width, this.imageWidth); + this.addRenderableWidget( + new ImageButton( + this.leftPos + 5, + this.height / 2 - 22, + 20, + 18, + 0, + 0, + 19, + RECIPE_BUTTON_LOCATION, + (p_98484_) -> { + this.recipeBookComponent.toggleVisibility(); + this.leftPos = + this.recipeBookComponent.updateScreenPosition(this.width, this.imageWidth); + p_98484_.setPosition(this.leftPos + 5, this.height / 2 - 22); + })); + this.addWidget(this.recipeBookComponent); + this.setInitialFocus(this.recipeBookComponent); + this.titleLabelX = 29; + } + + public void containerTick() { + super.containerTick(); + this.recipeBookComponent.tick(); + } + + @Override + protected void renderBg( + @NotNull GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) { + try { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + Objects.requireNonNull(minecraft, "Minecraft Instance is null") + .getTextureManager() + .bindForSetup(SCREEN_ID); + + int i = this.leftPos; + int j = this.topPos; + pGuiGraphics.blit(SCREEN_ID, i, j, 0, 0, 176, 179); + pGuiGraphics.blit(SCREEN_ID, i + 97, j + 38, 179, 25, menu.getCreatingProgress() + 1, 17); + } catch (NullPointerException e) { + throw new NullPointerException("Minecraft Instance is null"); + } + } + + @Override + public void render( + @NotNull GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { + try { + this.renderBackground(pGuiGraphics); + + if (this.recipeBookComponent.isVisible() && this.widthTooNarrow) { + this.renderBg(pGuiGraphics, pPartialTick, pMouseX, pMouseY); + this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); + } else { + this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); + super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); + this.recipeBookComponent.renderGhostRecipe( + pGuiGraphics, this.leftPos, this.topPos, true, pPartialTick); + } + + this.renderTooltip(pGuiGraphics, pMouseX, pMouseY); + this.recipeBookComponent.renderTooltip( + pGuiGraphics, this.leftPos, this.topPos, pMouseX, pMouseY); + } catch (NullPointerException e) { + throw new NullPointerException("Render method called before Minecraft Instance is set"); + } + } + + @Override + public void renderLabels(@NotNull GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) { + try { + pGuiGraphics.drawString(this.font, this.playerInventoryTitle, 7, 81, 4210752, false); + pGuiGraphics.drawString( + this.font, IngotFusionTollEnhancer.getContainerTitle(), 5, 10, 4210752, false); + } catch (NullPointerException e) { + throw new NullPointerException("Unable to render labels"); + } + } + + protected boolean isHovering( + int pX, int pY, int pWidth, int pHeight, double pMouseX, double pMouseY) { + return (!this.widthTooNarrow || !this.recipeBookComponent.isVisible()) + && super.isHovering(pX, pY, pWidth, pHeight, pMouseX, pMouseY); + } + + public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) { + if (this.recipeBookComponent.mouseClicked(pMouseX, pMouseY, pButton)) { + this.setFocused(this.recipeBookComponent); + return true; + } else { + return this.widthTooNarrow && this.recipeBookComponent.isVisible() + || super.mouseClicked(pMouseX, pMouseY, pButton); + } + } + + protected boolean hasClickedOutside( + double pMouseX, double pMouseY, int pGuiLeft, int pGuiTop, int pMouseButton) { + boolean flag = + pMouseX < (double) pGuiLeft + || pMouseY < (double) pGuiTop + || pMouseX >= (double) (pGuiLeft + this.imageWidth) + || pMouseY >= (double) (pGuiTop + this.imageHeight); + return this.recipeBookComponent.hasClickedOutside( + pMouseX, + pMouseY, + this.leftPos, + this.topPos, + this.imageWidth, + this.imageHeight, + pMouseButton) + && flag; + } + + /** Called when the mouse is clicked over a slot or outside the gui. */ + protected void slotClicked( + @NotNull Slot pSlot, int pSlotId, int pMouseButton, @NotNull ClickType pType) { + super.slotClicked(pSlot, pSlotId, pMouseButton, pType); + this.recipeBookComponent.slotClicked(pSlot); + } + + /** + * Called when a keyboard key is pressed within the GUI element. + * + *

+ * + * @return {@code true} if the event is consumed, {@code false} otherwise. + * @param pKeyCode the key code of the pressed key. + * @param pScanCode the scan code of the pressed key. + * @param pModifiers the keyboard modifiers. + */ + public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) { + return !this.recipeBookComponent.keyPressed(pKeyCode, pScanCode, pModifiers) + && super.keyPressed(pKeyCode, pScanCode, pModifiers); + } + + /** + * Called when a character is typed within the GUI element. + * + *

+ * + * @return {@code true} if the event is consumed, {@code false} otherwise. + * @param pCodePoint the code point of the typed character. + * @param pModifiers the keyboard modifiers. + */ + public boolean charTyped(char pCodePoint, int pModifiers) { + return this.recipeBookComponent.charTyped(pCodePoint, pModifiers) + || super.charTyped(pCodePoint, pModifiers); + } + + public void recipesUpdated() { + this.recipeBookComponent.recipesUpdated(); + } + + public void removed() { + super.removed(); + } + + @Override + public @NotNull RecipeBookComponent getRecipeBookComponent() { + return recipeBookComponent; + } +} diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/LITBlock.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/LITBlock.java index 54fcbb84..a4b6f1a4 100644 --- a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/LITBlock.java +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/LITBlock.java @@ -1,6 +1,28 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.realyusufismail.armourandtoolsmod.blocks.lit; import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.ToIntFunction; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; @@ -22,11 +44,6 @@ import net.minecraft.world.level.material.MapColor; import net.minecraft.world.phys.BlockHitResult; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.ToIntFunction; - /** * A block that emits light when stepped on. * @@ -34,118 +51,161 @@ */ @SuppressWarnings("deprecation") public class LITBlock extends Block { - public static final BooleanProperty LIT = RedstoneTorchBlock.LIT; - public static Map> particleColours = new HashMap<>(); - - protected LITBlock(List particleColour, int lightLevel, Class blockClass) { - super(Properties.of() - .requiresCorrectToolForDrops() - .randomTicks() - .lightLevel(litBlockEmission(lightLevel)) - .mapColor(MapColor.METAL) - .strength(3.0f, 3.0f)); - - particleColours.put(blockClass, particleColour); - this.registerDefaultState(this.defaultBlockState().setValue(LIT, Boolean.FALSE)); + public static final BooleanProperty LIT = RedstoneTorchBlock.LIT; + public static Map> particleColours = new HashMap<>(); + + protected LITBlock( + List particleColour, int lightLevel, Class blockClass) { + super( + Properties.of() + .requiresCorrectToolForDrops() + .randomTicks() + .lightLevel(litBlockEmission(lightLevel)) + .mapColor(MapColor.METAL) + .strength(3.0f, 3.0f)); + + particleColours.put(blockClass, particleColour); + this.registerDefaultState(this.defaultBlockState().setValue(LIT, Boolean.FALSE)); + } + + private static void interact(BlockState pState, Level pLevel, BlockPos pPos) { + spawnParticles(pLevel, pPos); + if (!pState.getValue(LIT)) { + pLevel.setBlock(pPos, pState.setValue(LIT, Boolean.valueOf(true)), 3); } - - private static void interact(BlockState pState, Level pLevel, BlockPos pPos) { - spawnParticles(pLevel, pPos); - if (!pState.getValue(LIT)) { - pLevel.setBlock(pPos, pState.setValue(LIT, Boolean.valueOf(true)), 3); - } + } + + protected static void spawnParticles(Level pLevel, BlockPos pPos) { + RandomSource randomsource = pLevel.random; + + for (Direction direction : Direction.values()) { + BlockPos blockpos = pPos.relative(direction); + if (!pLevel.getBlockState(blockpos).isSolidRender(pLevel, blockpos)) { + Direction.Axis direction$axis = direction.getAxis(); + double d1 = + direction$axis == Direction.Axis.X + ? 0.5D + 0.5625D * (double) direction.getStepX() + : (double) randomsource.nextFloat(); + double d2 = + direction$axis == Direction.Axis.Y + ? 0.5D + 0.5625D * (double) direction.getStepY() + : (double) randomsource.nextFloat(); + double d3 = + direction$axis == Direction.Axis.Z + ? 0.5D + 0.5625D * (double) direction.getStepZ() + : (double) randomsource.nextFloat(); + + var block = pLevel.getBlockState(pPos).getBlock(); + var particleColours = LITBlock.particleColours.get(block.getClass()); + var colour = particleColours.get(randomsource.nextInt(particleColours.size())); + ArmourAndToolsMod.ArmorAndToolsMod.getLogger() + .debug( + "Colour: " + + colour + + "for block: " + + block.getClass().getName() + + " at pos: " + + pPos + + " with particleColours: " + + particleColours); + pLevel.addParticle( + colour.getParticleOption(), + (double) pPos.getX() + d1, + (double) pPos.getY() + d2, + (double) pPos.getZ() + d3, + 0.0D, + 0.0D, + 0.0D); + } } - - protected static void spawnParticles(Level pLevel, BlockPos pPos) { - RandomSource randomsource = pLevel.random; - - for (Direction direction : Direction.values()) { - BlockPos blockpos = pPos.relative(direction); - if (!pLevel.getBlockState(blockpos).isSolidRender(pLevel, blockpos)) { - Direction.Axis direction$axis = direction.getAxis(); - double d1 = direction$axis == Direction.Axis.X ? 0.5D + 0.5625D * (double) direction.getStepX() : (double) randomsource.nextFloat(); - double d2 = direction$axis == Direction.Axis.Y ? 0.5D + 0.5625D * (double) direction.getStepY() : (double) randomsource.nextFloat(); - double d3 = direction$axis == Direction.Axis.Z ? 0.5D + 0.5625D * (double) direction.getStepZ() : (double) randomsource.nextFloat(); - - var block = pLevel.getBlockState(pPos).getBlock(); - var particleColours = LITBlock.particleColours.get(block.getClass()); - var colour = particleColours.get(randomsource.nextInt(particleColours.size())); - ArmourAndToolsMod.ArmorAndToolsMod.getLogger().debug("Colour: " + colour + "for block: " + block.getClass().getName() + " at pos: " + pPos + " with particleColours: " + particleColours); - pLevel.addParticle(colour.getParticleOption(), (double) pPos.getX() + d1, (double) pPos.getY() + d2, (double) pPos.getZ() + d3, 0.0D, 0.0D, 0.0D); - } - } + } + + private static ToIntFunction litBlockEmission(int pLightValue) { + return (p_50763_) -> { + return p_50763_.getValue(BlockStateProperties.LIT) ? pLightValue : 0; + }; + } + + public void attack(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer) { + interact(pState, pLevel, pPos); + super.attack(pState, pLevel, pPos, pPlayer); + } + + public void stepOn(Level pLevel, BlockPos pPos, BlockState pState, Entity pEntity) { + if (!pEntity.isSteppingCarefully()) { + interact(pState, pLevel, pPos); } - private static ToIntFunction litBlockEmission(int pLightValue) { - return (p_50763_) -> { - return p_50763_.getValue(BlockStateProperties.LIT) ? pLightValue : 0; - }; + super.stepOn(pLevel, pPos, pState, pEntity); + } + + public InteractionResult use( + BlockState pState, + Level pLevel, + BlockPos pPos, + Player pPlayer, + InteractionHand pHand, + BlockHitResult pHit) { + if (pLevel.isClientSide) { + spawnParticles(pLevel, pPos); + } else { + interact(pState, pLevel, pPos); } - public void attack(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer) { - interact(pState, pLevel, pPos); - super.attack(pState, pLevel, pPos, pPlayer); + ItemStack itemstack = pPlayer.getItemInHand(pHand); + return itemstack.getItem() instanceof BlockItem + && (new BlockPlaceContext(pPlayer, pHand, itemstack, pHit)).canPlace() + ? InteractionResult.PASS + : InteractionResult.SUCCESS; + } + + /** + * @return whether this block needs random ticking. + */ + public boolean isRandomlyTicking(BlockState pState) { + return pState.getValue(LIT); + } + + /** Performs a random tick on a block. */ + public void randomTick( + BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) { + if (pState.getValue(LIT)) { + pLevel.setBlock(pPos, pState.setValue(LIT, Boolean.valueOf(false)), 3); } - - public void stepOn(Level pLevel, BlockPos pPos, BlockState pState, Entity pEntity) { - if (!pEntity.isSteppingCarefully()) { - interact(pState, pLevel, pPos); - } - - super.stepOn(pLevel, pPos, pState, pEntity); - } - - public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { - if (pLevel.isClientSide) { - spawnParticles(pLevel, pPos); - } else { - interact(pState, pLevel, pPos); - } - - ItemStack itemstack = pPlayer.getItemInHand(pHand); - return itemstack.getItem() instanceof BlockItem && (new BlockPlaceContext(pPlayer, pHand, itemstack, pHit)).canPlace() ? InteractionResult.PASS : InteractionResult.SUCCESS; - } - - /** - * @return whether this block needs random ticking. - */ - public boolean isRandomlyTicking(BlockState pState) { - return pState.getValue(LIT); - } - - /** - * Performs a random tick on a block. - */ - public void randomTick(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) { - if (pState.getValue(LIT)) { - pLevel.setBlock(pPos, pState.setValue(LIT, Boolean.valueOf(false)), 3); - } - + } + + /** Perform side-effects from block dropping, such as creating silverfish */ + public void spawnAfterBreak( + BlockState pState, + ServerLevel pLevel, + BlockPos pPos, + ItemStack pStack, + boolean pDropExperience) { + super.spawnAfterBreak(pState, pLevel, pPos, pStack, pDropExperience); + } + + @Override + public int getExpDrop( + BlockState state, + net.minecraft.world.level.LevelReader world, + RandomSource randomSource, + BlockPos pos, + int fortune, + int silktouch) { + return silktouch == 0 ? 1 + randomSource.nextInt(5) : 0; + } + + /** + * Called periodically clientside on blocks near the player to show effects (like furnace fire + * particles). + */ + public void animateTick(BlockState pState, Level pLevel, BlockPos pPos, RandomSource pRandom) { + if (pState.getValue(LIT)) { + spawnParticles(pLevel, pPos); } + } - /** - * Perform side-effects from block dropping, such as creating silverfish - */ - public void spawnAfterBreak(BlockState pState, ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) { - super.spawnAfterBreak(pState, pLevel, pPos, pStack, pDropExperience); - } - - @Override - public int getExpDrop(BlockState state, net.minecraft.world.level.LevelReader world, RandomSource randomSource, BlockPos pos, int fortune, int silktouch) { - return silktouch == 0 ? 1 + randomSource.nextInt(5) : 0; - } - - /** - * Called periodically clientside on blocks near the player to show effects (like furnace fire particles). - */ - public void animateTick(BlockState pState, Level pLevel, BlockPos pPos, RandomSource pRandom) { - if (pState.getValue(LIT)) { - spawnParticles(pLevel, pPos); - } - - } - - protected void createBlockStateDefinition(StateDefinition.Builder pBuilder) { - pBuilder.add(LIT); - } + protected void createBlockStateDefinition(StateDefinition.Builder pBuilder) { + pBuilder.add(LIT); + } } diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/LitBlockParticleColour.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/LitBlockParticleColour.java index ab734fb6..1a754e15 100644 --- a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/LitBlockParticleColour.java +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/LitBlockParticleColour.java @@ -1,3 +1,21 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.realyusufismail.armourandtoolsmod.blocks.lit; import net.minecraft.core.particles.DustParticleOptions; @@ -5,20 +23,19 @@ import org.joml.Vector3f; public enum LitBlockParticleColour { - RAINBOW_PARTICLE_COLOR_PURPLE(Vec3.fromRGB24(148000211).toVector3f()), - RAINBOW_PARTICLE_COLOR_RED(Vec3.fromRGB24(16711680).toVector3f()), - RAINBOW_PARTICLE_COLOR_GREEN(Vec3.fromRGB24(65280).toVector3f()), - RAINBOW_PARTICLE_COLOR_BLUE(Vec3.fromRGB24(255).toVector3f()), - RUBY_PARTICLE_COLOR(Vec3.fromRGB24(14684511).toVector3f()); + RAINBOW_PARTICLE_COLOR_PURPLE(Vec3.fromRGB24(148000211).toVector3f()), + RAINBOW_PARTICLE_COLOR_RED(Vec3.fromRGB24(16711680).toVector3f()), + RAINBOW_PARTICLE_COLOR_GREEN(Vec3.fromRGB24(65280).toVector3f()), + RAINBOW_PARTICLE_COLOR_BLUE(Vec3.fromRGB24(255).toVector3f()), + RUBY_PARTICLE_COLOR(Vec3.fromRGB24(14684511).toVector3f()); + private final Vector3f colour; - private final Vector3f colour; + LitBlockParticleColour(Vector3f colour) { + this.colour = colour; + } - LitBlockParticleColour(Vector3f colour) { - this.colour = colour; - } - - public DustParticleOptions getParticleOption() { - return new DustParticleOptions(colour, 1.0f); - } + public DustParticleOptions getParticleOption() { + return new DustParticleOptions(colour, 1.0f); + } } diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/RainbowLitBlock.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/RainbowLitBlock.java index 605dd601..f1dbdefc 100644 --- a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/RainbowLitBlock.java +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/RainbowLitBlock.java @@ -1,9 +1,34 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.realyusufismail.armourandtoolsmod.blocks.lit; import java.util.List; public class RainbowLitBlock extends LITBlock { - public RainbowLitBlock() { - super(List.of(LitBlockParticleColour.RAINBOW_PARTICLE_COLOR_RED, LitBlockParticleColour.RAINBOW_PARTICLE_COLOR_GREEN, LitBlockParticleColour.RAINBOW_PARTICLE_COLOR_BLUE, LitBlockParticleColour.RAINBOW_PARTICLE_COLOR_PURPLE), 11, RainbowLitBlock.class); - } + public RainbowLitBlock() { + super( + List.of( + LitBlockParticleColour.RAINBOW_PARTICLE_COLOR_RED, + LitBlockParticleColour.RAINBOW_PARTICLE_COLOR_GREEN, + LitBlockParticleColour.RAINBOW_PARTICLE_COLOR_BLUE, + LitBlockParticleColour.RAINBOW_PARTICLE_COLOR_PURPLE), + 11, + RainbowLitBlock.class); + } } diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/RubyLitBlock.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/RubyLitBlock.java index 425c9931..f2b3858a 100644 --- a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/RubyLitBlock.java +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/lit/RubyLitBlock.java @@ -1,9 +1,27 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.realyusufismail.armourandtoolsmod.blocks.lit; import java.util.List; public class RubyLitBlock extends LITBlock { - public RubyLitBlock() { - super(List.of(LitBlockParticleColour.RUBY_PARTICLE_COLOR), 11, RubyLitBlock.class); - } + public RubyLitBlock() { + super(List.of(LitBlockParticleColour.RUBY_PARTICLE_COLOR), 11, RubyLitBlock.class); + } } diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/tool/CustomToolCraftingTableScreen.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/tool/CustomToolCraftingTableScreen.java index fc8ac2b8..42f85a06 100644 --- a/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/tool/CustomToolCraftingTableScreen.java +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/blocks/tool/CustomToolCraftingTableScreen.java @@ -1,13 +1,29 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.realyusufismail.armourandtoolsmod.blocks.tool; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; +import java.util.Objects; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.ImageButton; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent; import net.minecraft.client.gui.screens.recipebook.RecipeUpdateListener; -import net.minecraft.client.renderer.GameRenderer; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -15,117 +31,140 @@ import net.minecraft.world.inventory.Slot; import org.jetbrains.annotations.NotNull; -import java.util.Objects; - /** * @see net.minecraft.client.gui.screens.inventory.CraftingScreen */ -public class CustomToolCraftingTableScreen extends AbstractContainerScreen - implements RecipeUpdateListener { - private static final ResourceLocation CRAFTING_TABLE_LOCATION = - new ResourceLocation("textures/gui/container/crafting_table.png"); - private static final ResourceLocation RECIPE_BUTTON_LOCATION = - new ResourceLocation("textures/gui/recipe_button.png"); - private final RecipeBookComponent recipeBookComponent = new RecipeBookComponent(); - private boolean widthTooNarrow; - - public CustomToolCraftingTableScreen(CustomToolCraftingTableMenu pMenu, Inventory pPlayerInventory, - Component pTitle) { - super(pMenu, pPlayerInventory, pTitle); - } - - protected void init() { - super.init(); - this.widthTooNarrow = this.width < 379; - this.recipeBookComponent.init(this.width, this.height, Objects.requireNonNull(this.minecraft, "Minecraft is null in table screen"), this.widthTooNarrow, - this.menu); - this.leftPos = this.recipeBookComponent.updateScreenPosition(this.width, this.imageWidth); - this.addRenderableWidget(new ImageButton(this.leftPos + 5, this.height / 2 - 49, 20, 18, 0, - 0, 19, RECIPE_BUTTON_LOCATION, (p_98484_) -> { - this.recipeBookComponent.toggleVisibility(); - this.leftPos = this.recipeBookComponent.updateScreenPosition(this.width, - this.imageWidth); - p_98484_.setPosition(this.leftPos + 5, this.height / 2 - 49); - })); - this.addWidget(this.recipeBookComponent); - this.setInitialFocus(this.recipeBookComponent); - this.titleLabelX = 29; - } - - public void containerTick() { - super.containerTick(); - this.recipeBookComponent.tick(); - } - - /** - * Renders the graphical user interface (GUI) element. - * @param pGuiGraphics the GuiGraphics object used for rendering. - * @param pMouseX the x-coordinate of the mouse cursor. - * @param pMouseY the y-coordinate of the mouse cursor. - * @param pPartialTick the partial tick time. - */ - public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { - this.renderBackground(pGuiGraphics); - if (this.recipeBookComponent.isVisible() && this.widthTooNarrow) { - this.renderBg(pGuiGraphics, pPartialTick, pMouseX, pMouseY); - this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); - } else { - this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); - super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); - this.recipeBookComponent.renderGhostRecipe(pGuiGraphics, this.leftPos, this.topPos, true, pPartialTick); - } - - this.renderTooltip(pGuiGraphics, pMouseX, pMouseY); - this.recipeBookComponent.renderTooltip(pGuiGraphics, this.leftPos, this.topPos, pMouseX, pMouseY); - } - - protected void renderBg(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) { - int i = this.leftPos; - int j = (this.height - this.imageHeight) / 2; - pGuiGraphics.blit(CRAFTING_TABLE_LOCATION, i, j, 0, 0, this.imageWidth, this.imageHeight); - } - - protected boolean isHovering(int pX, int pY, int pWidth, int pHeight, double pMouseX, - double pMouseY) { - return (!this.widthTooNarrow || !this.recipeBookComponent.isVisible()) - && super.isHovering(pX, pY, pWidth, pHeight, pMouseX, pMouseY); - } - - public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) { - if (this.recipeBookComponent.mouseClicked(pMouseX, pMouseY, pButton)) { - this.setFocused(this.recipeBookComponent); - return true; - } else { - return this.widthTooNarrow && this.recipeBookComponent.isVisible() || super.mouseClicked(pMouseX, pMouseY, pButton); - } - } - - protected boolean hasClickedOutside(double pMouseX, double pMouseY, int pGuiLeft, int pGuiTop, - int pMouseButton) { - boolean flag = pMouseX < (double) pGuiLeft || pMouseY < (double) pGuiTop - || pMouseX >= (double) (pGuiLeft + this.imageWidth) - || pMouseY >= (double) (pGuiTop + this.imageHeight); - return this.recipeBookComponent.hasClickedOutside(pMouseX, pMouseY, this.leftPos, - this.topPos, this.imageWidth, this.imageHeight, pMouseButton) && flag; - } - - /** - * Called when the mouse is clicked over a slot or outside the gui. - */ - protected void slotClicked(@NotNull Slot pSlot, int pSlotId, int pMouseButton, @NotNull ClickType pType) { - super.slotClicked(pSlot, pSlotId, pMouseButton, pType); - this.recipeBookComponent.slotClicked(pSlot); - } - - public void recipesUpdated() { - this.recipeBookComponent.recipesUpdated(); - } - - public void removed() { - super.removed(); +public class CustomToolCraftingTableScreen + extends AbstractContainerScreen implements RecipeUpdateListener { + private static final ResourceLocation CRAFTING_TABLE_LOCATION = + new ResourceLocation("textures/gui/container/crafting_table.png"); + private static final ResourceLocation RECIPE_BUTTON_LOCATION = + new ResourceLocation("textures/gui/recipe_button.png"); + private final RecipeBookComponent recipeBookComponent = new RecipeBookComponent(); + private boolean widthTooNarrow; + + public CustomToolCraftingTableScreen( + CustomToolCraftingTableMenu pMenu, Inventory pPlayerInventory, Component pTitle) { + super(pMenu, pPlayerInventory, pTitle); + } + + protected void init() { + super.init(); + this.widthTooNarrow = this.width < 379; + this.recipeBookComponent.init( + this.width, + this.height, + Objects.requireNonNull(this.minecraft, "Minecraft is null in table screen"), + this.widthTooNarrow, + this.menu); + this.leftPos = this.recipeBookComponent.updateScreenPosition(this.width, this.imageWidth); + this.addRenderableWidget( + new ImageButton( + this.leftPos + 5, + this.height / 2 - 49, + 20, + 18, + 0, + 0, + 19, + RECIPE_BUTTON_LOCATION, + (p_98484_) -> { + this.recipeBookComponent.toggleVisibility(); + this.leftPos = + this.recipeBookComponent.updateScreenPosition(this.width, this.imageWidth); + p_98484_.setPosition(this.leftPos + 5, this.height / 2 - 49); + })); + this.addWidget(this.recipeBookComponent); + this.setInitialFocus(this.recipeBookComponent); + this.titleLabelX = 29; + } + + public void containerTick() { + super.containerTick(); + this.recipeBookComponent.tick(); + } + + /** + * Renders the graphical user interface (GUI) element. + * + * @param pGuiGraphics the GuiGraphics object used for rendering. + * @param pMouseX the x-coordinate of the mouse cursor. + * @param pMouseY the y-coordinate of the mouse cursor. + * @param pPartialTick the partial tick time. + */ + public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { + this.renderBackground(pGuiGraphics); + if (this.recipeBookComponent.isVisible() && this.widthTooNarrow) { + this.renderBg(pGuiGraphics, pPartialTick, pMouseX, pMouseY); + this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); + } else { + this.recipeBookComponent.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); + super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); + this.recipeBookComponent.renderGhostRecipe( + pGuiGraphics, this.leftPos, this.topPos, true, pPartialTick); } - public @NotNull RecipeBookComponent getRecipeBookComponent() { - return this.recipeBookComponent; + this.renderTooltip(pGuiGraphics, pMouseX, pMouseY); + this.recipeBookComponent.renderTooltip( + pGuiGraphics, this.leftPos, this.topPos, pMouseX, pMouseY); + } + + protected void renderBg(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) { + int i = this.leftPos; + int j = (this.height - this.imageHeight) / 2; + pGuiGraphics.blit(CRAFTING_TABLE_LOCATION, i, j, 0, 0, this.imageWidth, this.imageHeight); + } + + protected boolean isHovering( + int pX, int pY, int pWidth, int pHeight, double pMouseX, double pMouseY) { + return (!this.widthTooNarrow || !this.recipeBookComponent.isVisible()) + && super.isHovering(pX, pY, pWidth, pHeight, pMouseX, pMouseY); + } + + public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) { + if (this.recipeBookComponent.mouseClicked(pMouseX, pMouseY, pButton)) { + this.setFocused(this.recipeBookComponent); + return true; + } else { + return this.widthTooNarrow && this.recipeBookComponent.isVisible() + || super.mouseClicked(pMouseX, pMouseY, pButton); } + } + + protected boolean hasClickedOutside( + double pMouseX, double pMouseY, int pGuiLeft, int pGuiTop, int pMouseButton) { + boolean flag = + pMouseX < (double) pGuiLeft + || pMouseY < (double) pGuiTop + || pMouseX >= (double) (pGuiLeft + this.imageWidth) + || pMouseY >= (double) (pGuiTop + this.imageHeight); + return this.recipeBookComponent.hasClickedOutside( + pMouseX, + pMouseY, + this.leftPos, + this.topPos, + this.imageWidth, + this.imageHeight, + pMouseButton) + && flag; + } + + /** Called when the mouse is clicked over a slot or outside the gui. */ + protected void slotClicked( + @NotNull Slot pSlot, int pSlotId, int pMouseButton, @NotNull ClickType pType) { + super.slotClicked(pSlot, pSlotId, pMouseButton, pType); + this.recipeBookComponent.slotClicked(pSlot); + } + + public void recipesUpdated() { + this.recipeBookComponent.recipesUpdated(); + } + + public void removed() { + super.removed(); + } + + public @NotNull RecipeBookComponent getRecipeBookComponent() { + return this.recipeBookComponent; + } } diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/client/ArmourAndToolsModShieldItemRendererProvider.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/client/ArmourAndToolsModShieldItemRendererProvider.java index 3d86adf4..87f0d2a1 100644 --- a/src/main/java/io/github/realyusufismail/armourandtoolsmod/client/ArmourAndToolsModShieldItemRendererProvider.java +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/client/ArmourAndToolsModShieldItemRendererProvider.java @@ -1,3 +1,21 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.realyusufismail.armourandtoolsmod.client; import io.github.realyusufismail.armourandtoolsmod.client.renderer.shield.ArmourAndToolsModShieldItemRenderer; @@ -5,20 +23,20 @@ import net.minecraftforge.client.extensions.common.IClientItemExtensions; public class ArmourAndToolsModShieldItemRendererProvider { - private static ArmourAndToolsModShieldItemRenderer shieldItemRenderer; + private static ArmourAndToolsModShieldItemRenderer shieldItemRenderer; - public static void init(final RegisterClientReloadListenersEvent event) { - shieldItemRenderer = new ArmourAndToolsModShieldItemRenderer(); + public static void init(final RegisterClientReloadListenersEvent event) { + shieldItemRenderer = new ArmourAndToolsModShieldItemRenderer(); - event.registerReloadListener(shieldItemRenderer); - } + event.registerReloadListener(shieldItemRenderer); + } - public static IClientItemExtensions shield() { - return new IClientItemExtensions() { - @Override - public ArmourAndToolsModShieldItemRenderer getCustomRenderer() { - return shieldItemRenderer; - } - }; - } + public static IClientItemExtensions shield() { + return new IClientItemExtensions() { + @Override + public ArmourAndToolsModShieldItemRenderer getCustomRenderer() { + return shieldItemRenderer; + } + }; + } } diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/client/ArmourAndToolsModTridentItemRendererProvider.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/client/ArmourAndToolsModTridentItemRendererProvider.java index cc1e382b..fc3c7efd 100644 --- a/src/main/java/io/github/realyusufismail/armourandtoolsmod/client/ArmourAndToolsModTridentItemRendererProvider.java +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/client/ArmourAndToolsModTridentItemRendererProvider.java @@ -1,3 +1,21 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.realyusufismail.armourandtoolsmod.client; import io.github.realyusufismail.armourandtoolsmod.client.renderer.trident.ister.AqumarineTridentItemRendererISTER; @@ -5,20 +23,20 @@ import net.minecraftforge.client.extensions.common.IClientItemExtensions; public class ArmourAndToolsModTridentItemRendererProvider { - private static AqumarineTridentItemRendererISTER aqumarineTridentItemRendererISTER; + private static AqumarineTridentItemRendererISTER aqumarineTridentItemRendererISTER; - public static void init(final RegisterClientReloadListenersEvent event) { - aqumarineTridentItemRendererISTER = new AqumarineTridentItemRendererISTER(); + public static void init(final RegisterClientReloadListenersEvent event) { + aqumarineTridentItemRendererISTER = new AqumarineTridentItemRendererISTER(); - event.registerReloadListener(aqumarineTridentItemRendererISTER); - } + event.registerReloadListener(aqumarineTridentItemRendererISTER); + } - public static IClientItemExtensions aqumarineTrident() { - return new IClientItemExtensions() { - @Override - public AqumarineTridentItemRendererISTER getCustomRenderer() { - return aqumarineTridentItemRendererISTER; - } - }; - } + public static IClientItemExtensions aqumarineTrident() { + return new IClientItemExtensions() { + @Override + public AqumarineTridentItemRendererISTER getCustomRenderer() { + return aqumarineTridentItemRendererISTER; + } + }; + } } diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/core/init/BlockEntityTypeInit.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/core/init/BlockEntityTypeInit.java new file mode 100644 index 00000000..ed0873c2 --- /dev/null +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/core/init/BlockEntityTypeInit.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.core.init; + +import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod; +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.IngotFusionTollEnhancerBlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class BlockEntityTypeInit { + + public static DeferredRegister> BLOCK_ENTITY_TYPES = + DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, ArmourAndToolsMod.MOD_ID); + + public static RegistryObject> + INGOT_FUSION_TOLL_ENHANCER = + BLOCK_ENTITY_TYPES.register( + "ingot_fusion_toll_enhancer", + () -> + BlockEntityType.Builder.of( + IngotFusionTollEnhancerBlockEntity::new, + BlockInit.INGOT_FUSION_TOLL_ENHANCER.get()) + .build(null)); +} diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/core/init/EntityTypeInit.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/core/init/EntityTypeInit.java index d4a2016c..fa5fef4a 100644 --- a/src/main/java/io/github/realyusufismail/armourandtoolsmod/core/init/EntityTypeInit.java +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/core/init/EntityTypeInit.java @@ -1,3 +1,21 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.realyusufismail.armourandtoolsmod.core.init; import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod; @@ -10,15 +28,23 @@ import net.minecraftforge.registries.RegistryObject; public class EntityTypeInit { - public static DeferredRegister> ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, ArmourAndToolsMod.MOD_ID); - - public static final RegistryObject> AQUMARINE_THROWN_TRIDENT = ENTITY_TYPES.register("aqumarine_thrown_trident", - () -> EntityType.Builder.of(AqumarineTridentEntity::new, MobCategory.MISC) - .sized(0.5F, 0.5F) - .fireImmune() - .clientTrackingRange(4) - .updateInterval(20) - .setCustomClientFactory((spawnEntity, world) -> new AqumarineTridentEntity(EntityTypeInit.AQUMARINE_THROWN_TRIDENT.get(), world)) - .build(ArmourAndToolsMod.MOD_ID + ":aqumarine_thrown_trident")); + public static DeferredRegister> ENTITY_TYPES = + DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, ArmourAndToolsMod.MOD_ID); + public static final RegistryObject> + AQUMARINE_THROWN_TRIDENT = + ENTITY_TYPES.register( + "aqumarine_thrown_trident", + () -> + EntityType.Builder.of( + AqumarineTridentEntity::new, MobCategory.MISC) + .sized(0.5F, 0.5F) + .fireImmune() + .clientTrackingRange(4) + .updateInterval(20) + .setCustomClientFactory( + (spawnEntity, world) -> + new AqumarineTridentEntity( + EntityTypeInit.AQUMARINE_THROWN_TRIDENT.get(), world)) + .build(ArmourAndToolsMod.MOD_ID + ":aqumarine_thrown_trident")); } diff --git a/src/main/java/io/github/realyusufismail/armourandtoolsmod/recipe/infusion/IngotFusionTollEnhancerRecipe.java b/src/main/java/io/github/realyusufismail/armourandtoolsmod/recipe/infusion/IngotFusionTollEnhancerRecipe.java new file mode 100644 index 00000000..668c59e2 --- /dev/null +++ b/src/main/java/io/github/realyusufismail/armourandtoolsmod/recipe/infusion/IngotFusionTollEnhancerRecipe.java @@ -0,0 +1,176 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.recipe.infusion; + +import com.google.gson.JsonObject; +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.book.IngotFusionTollEnhancerRecipeBookCategory; +import io.github.realyusufismail.armourandtoolsmod.core.init.RecipeSerializerInit; +import io.github.realyusufismail.armourandtoolsmod.core.init.RecipeTypeInit; +import java.util.Arrays; +import lombok.Getter; +import lombok.val; +import net.minecraft.core.RegistryAccess; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class IngotFusionTollEnhancerRecipe implements Recipe { + + protected final RecipeType type; + protected final ResourceLocation id; + @Getter public final Ingredient ingredient1; + @Getter public final Ingredient ingredient2; + @Getter public final Ingredient ingredient3; + @Getter @NotNull public final ItemStack result; + @Getter @NotNull public final IngotFusionTollEnhancerRecipeBookCategory category; + + public IngotFusionTollEnhancerRecipe( + RecipeType type, + ResourceLocation id, + Ingredient ingredient1, + Ingredient ingredient2, + Ingredient ingredient3, + ItemStack result, + IngotFusionTollEnhancerRecipeBookCategory category) { + this.type = type; + this.id = id; + this.ingredient1 = ingredient1; + this.ingredient2 = ingredient2; + this.ingredient3 = ingredient3; + this.result = result; + this.category = category; + } + + @Override + public boolean matches(Container pContainer, Level pLevel) { + return this.ingredient1.test(pContainer.getItem(0)) + && this.ingredient2.test(pContainer.getItem(1)) + && this.ingredient3.test(pContainer.getItem(2)); + } + + @Override + public @NotNull ItemStack assemble(Container pContainer, RegistryAccess pRegistryAccess) { + return this.result.copy(); + } + + @Override + public boolean canCraftInDimensions(int pWidth, int pHeight) { + return true; + } + + @Override + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { + return this.result; + } + + @Override + public ResourceLocation getId() { + return this.id; + } + + @Override + public RecipeSerializer getSerializer() { + return RecipeSerializerInit.INGOT_FUSION_TOLL_ENHANCER_RECIPE.get(); + } + + @Override + public RecipeType getType() { + return this.type; + } + + public boolean isIngredient(ItemStack ingredient) { + return Arrays.stream(this.ingredient1.getItems()) + .anyMatch( + itemStack -> { + return ItemStack.isSameItem(ingredient, itemStack); + }) + || Arrays.stream(this.ingredient2.getItems()) + .anyMatch( + itemStack -> { + return ItemStack.isSameItem(ingredient, itemStack); + }) + || Arrays.stream(this.ingredient3.getItems()) + .anyMatch( + itemStack -> { + return ItemStack.isSameItem(ingredient, itemStack); + }); + } + + public ItemStack getResult(ItemStack ingredient1, ItemStack ingredient2, ItemStack ingredient3) { + return isIngredient(ingredient1) && isIngredient(ingredient2) && isIngredient(ingredient3) + ? this.result + : ItemStack.EMPTY; + } + + public static class Serializer implements RecipeSerializer { + + @Override + public IngotFusionTollEnhancerRecipe fromJson(ResourceLocation pRecipeId, JsonObject json) { + val category = + IngotFusionTollEnhancerRecipeBookCategory.CODEC.byName( + GsonHelper.getAsString(json, "category", null), + IngotFusionTollEnhancerRecipeBookCategory.MISC); + val ingredient1 = Ingredient.fromJson(GsonHelper.getAsJsonObject(json, "ingredient1")); + val ingredient2 = Ingredient.fromJson(GsonHelper.getAsJsonObject(json, "ingredient2")); + val ingredient3 = Ingredient.fromJson(GsonHelper.getAsJsonObject(json, "ingredient3")); + val result = ShapedRecipe.itemStackFromJson(GsonHelper.getAsJsonObject(json, "result")); + return new IngotFusionTollEnhancerRecipe( + RecipeTypeInit.INGOT_FUSION_TOLL_ENHANCER.get(), + pRecipeId, + ingredient1, + ingredient2, + ingredient3, + result, + category); + } + + @Override + public @Nullable IngotFusionTollEnhancerRecipe fromNetwork( + ResourceLocation pRecipeId, FriendlyByteBuf pBuffer) { + val category = pBuffer.readEnum(IngotFusionTollEnhancerRecipeBookCategory.class); + val ingredient1 = Ingredient.fromNetwork(pBuffer); + val ingredient2 = Ingredient.fromNetwork(pBuffer); + val ingredient3 = Ingredient.fromNetwork(pBuffer); + val result = pBuffer.readItem(); + return new IngotFusionTollEnhancerRecipe( + RecipeTypeInit.INGOT_FUSION_TOLL_ENHANCER.get(), + pRecipeId, + ingredient1, + ingredient2, + ingredient3, + result, + category); + } + + @Override + public void toNetwork(FriendlyByteBuf pBuffer, IngotFusionTollEnhancerRecipe pRecipe) { + pBuffer.writeEnum(pRecipe.category); + pRecipe.ingredient1.toNetwork(pBuffer); + pRecipe.ingredient2.toNetwork(pBuffer); + pRecipe.ingredient3.toNetwork(pBuffer); + pBuffer.writeItem(pRecipe.result); + } + } +} diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/ArmourAndToolsMod.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/ArmourAndToolsMod.kt index a80f0afd..c62c3741 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/ArmourAndToolsMod.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/ArmourAndToolsMod.kt @@ -42,6 +42,7 @@ class ArmourAndToolsMod { RecipeSerializerInit.SERIALIZERS.register(bus) RecipeTypeInit.RECIPE_TYPES.register(bus) EntityTypeInit.ENTITY_TYPES.register(bus) + BlockEntityTypeInit.BLOCK_ENTITY_TYPES.register(bus) CreativeModeTabInit.CREATIVE_MODE_TAB.register(bus) // Register ourselves for server and other game events we are interested in diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/book/IngotFusionTollEnhancerRecipeBookCategory.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/book/IngotFusionTollEnhancerRecipeBookCategory.kt new file mode 100644 index 00000000..b1470c68 --- /dev/null +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/book/IngotFusionTollEnhancerRecipeBookCategory.kt @@ -0,0 +1,38 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.blocks.infusion.book + +import net.minecraft.util.StringRepresentable + +enum class IngotFusionTollEnhancerRecipeBookCategory(private var bookName: String) : + StringRepresentable { + TOOL("tool"), + ARMOUR("armour"), + MISC("misc"); + + companion object { + @JvmField + val CODEC: StringRepresentable.EnumCodec = + StringRepresentable.fromEnum { entries.toTypedArray() } + } + + override fun getSerializedName(): String { + return bookName + } +} diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/book/IngotFusionTollEnhancerRecipeBookComponent.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/book/IngotFusionTollEnhancerRecipeBookComponent.kt new file mode 100644 index 00000000..e2955a99 --- /dev/null +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/book/IngotFusionTollEnhancerRecipeBookComponent.kt @@ -0,0 +1,75 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.blocks.infusion.book + +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.IngotFusionTollEnhancerBlockEntity +import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent +import net.minecraft.world.inventory.Slot +import net.minecraft.world.item.Item +import net.minecraft.world.item.ItemStack +import net.minecraft.world.item.crafting.Ingredient +import net.minecraft.world.item.crafting.Recipe + +class IngotFusionTollEnhancerRecipeBookComponent : RecipeBookComponent() { + private var fuels: Ingredient? = null + private val fuelItems = IngotFusionTollEnhancerBlockEntity.getFuels().keys + + override fun initFilterButtonTextures() { + filterButton.initTextureValues(152, 182, 28, 18, RECIPE_BOOK_LOCATION) + } + + override fun slotClicked(pSlot: Slot?) { + super.slotClicked(pSlot) + if (pSlot != null && pSlot.index < menu.size) { + ghostRecipe.clear() + } + } + + override fun setupGhostRecipe(pRecipe: Recipe<*>, pSlots: List) { + val itemstack = pRecipe.getResultItem(minecraft.level!!.registryAccess()) + ghostRecipe.recipe = pRecipe + ghostRecipe.addIngredient(Ingredient.of(itemstack), pSlots[2].x, pSlots[2].y) + val nonnulllist = pRecipe.ingredients + val slot = pSlots[1] + if (slot.item.isEmpty) { + if (fuels == null) { + fuels = + Ingredient.of( + this.fuelItems + .stream() + .filter { it: Item -> + it.isEnabled(minecraft.level!!.enabledFeatures()) + } + .map { pItem: Item -> ItemStack(pItem) }) + } + ghostRecipe.addIngredient(fuels!!, slot.x, slot.y) + } + val iterator: Iterator = nonnulllist.iterator() + for (i in 0..1) { + if (!iterator.hasNext()) { + return + } + val ingredient = iterator.next() + if (!ingredient.isEmpty) { + val slot1 = pSlots[i] + ghostRecipe.addIngredient(ingredient, slot1.x, slot1.y) + } + } + } +} diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/slots/InfusionFuelSlot.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/slots/InfusionFuelSlot.kt new file mode 100644 index 00000000..f9bfe56d --- /dev/null +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/slots/InfusionFuelSlot.kt @@ -0,0 +1,42 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.blocks.infusion.slots + +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.IngotFusionTollEnhancerBlockEntity +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.IngotFusionTollEnhancerMenu +import net.minecraft.world.item.ItemStack +import net.minecraft.world.item.Items +import net.minecraftforge.items.IItemHandler +import net.minecraftforge.items.SlotItemHandler + +class InfusionFuelSlot(itemHandler: IItemHandler, private val menu: IngotFusionTollEnhancerMenu) : + SlotItemHandler(itemHandler, IngotFusionTollEnhancerBlockEntity.FUEL_SLOT, 102, 65) { + + override fun mayPlace(stack: ItemStack): Boolean { + return menu.isFuel(stack) || isBucket(stack) + } + + override fun getMaxStackSize(pStack: ItemStack): Int { + return if (isBucket(pStack)) 1 else super.getMaxStackSize(pStack) + } + + private fun isBucket(pStack: ItemStack): Boolean { + return pStack.`is`(Items.BUCKET) + } +} diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/slots/OutputSlotItemHandler.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/slots/OutputSlotItemHandler.kt new file mode 100644 index 00000000..29489963 --- /dev/null +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/blocks/infusion/slots/OutputSlotItemHandler.kt @@ -0,0 +1,62 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.blocks.infusion.slots + +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.IngotFusionTollEnhancerBlockEntity +import kotlin.math.min +import net.minecraft.server.level.ServerPlayer +import net.minecraft.world.entity.player.Player +import net.minecraft.world.item.ItemStack +import net.minecraftforge.event.ForgeEventFactory +import net.minecraftforge.items.IItemHandler +import net.minecraftforge.items.SlotItemHandler + +class OutputSlotItemHandler(itemHandler: IItemHandler, val player: Player) : + SlotItemHandler(itemHandler, IngotFusionTollEnhancerBlockEntity.RESULT_SLOT, 138, 40) { + private var removeCount: Int? = null + + override fun mayPlace(stack: ItemStack): Boolean { + return false + } + + override fun remove(pAmount: Int): ItemStack { + if (hasItem()) { + this.removeCount = min(pAmount, this.item.count) + } + return super.remove(pAmount) + } + + override fun onTake(pPlayer: Player, pStack: ItemStack) { + checkTakeAchievements(pStack) + super.onTake(pPlayer, pStack) + } + + /** @param pStack the output - ie, iron ingots, and pickaxes, not ore and wood. */ + override fun checkTakeAchievements(pStack: ItemStack) { + pStack.onCraftedBy(player.level(), player, removeCount!!) + val player = player + if (player is ServerPlayer) { + val container = container + (container as? IngotFusionTollEnhancerBlockEntity)?.awardUsedRecipesAndPopExperience( + player) + } + removeCount = 0 + ForgeEventFactory.firePlayerSmeltedEvent(this.player, pStack) + } +} diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/client/ClientSetup.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/client/ClientSetup.kt index 4c7535e2..a610d8ed 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/client/ClientSetup.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/client/ClientSetup.kt @@ -19,11 +19,10 @@ package io.github.realyusufismail.armourandtoolsmod.client import io.github.realyusufismail.armourandtoolsmod.blocks.armour.CustomArmourCraftingTableScreen +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.IngotFusionTollEnhancerScreen import io.github.realyusufismail.armourandtoolsmod.blocks.tool.CustomToolCraftingTableScreen import io.github.realyusufismail.armourandtoolsmod.client.renderer.trident.AqumarineTridentItemRenderer -import io.github.realyusufismail.armourandtoolsmod.core.init.EntityTypeInit -import io.github.realyusufismail.armourandtoolsmod.core.init.ItemInit -import io.github.realyusufismail.armourandtoolsmod.core.init.MenuTypeInit +import io.github.realyusufismail.armourandtoolsmod.core.init.* import net.minecraft.client.gui.screens.MenuScreens import net.minecraft.client.multiplayer.ClientLevel import net.minecraft.client.renderer.item.ItemProperties @@ -99,6 +98,9 @@ object ClientSetup { MenuScreens.register( MenuTypeInit.CUSTOM_TOOL_CRAFTING_TABLE_MENU.get(), ::CustomToolCraftingTableScreen) + + MenuScreens.register( + MenuTypeInit.INGOT_FUSION_TOLL_ENHANCER_MENU.get(), ::IngotFusionTollEnhancerScreen) } fun registerEntityRenders(event: EntityRenderersEvent.RegisterRenderers) { diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/client/renderer/trident/ArmourToolsModTridentItemRenderer.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/client/renderer/trident/ArmourToolsModTridentItemRenderer.kt index 2954a1dc..a590e692 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/client/renderer/trident/ArmourToolsModTridentItemRenderer.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/client/renderer/trident/ArmourToolsModTridentItemRenderer.kt @@ -20,7 +20,6 @@ package io.github.realyusufismail.armourandtoolsmod.client.renderer.trident import com.mojang.blaze3d.vertex.PoseStack import com.mojang.math.Axis -import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod import io.github.realyusufismail.armourandtoolsmod.common.entity.ArmourToolsModTridentEntity import net.minecraft.client.model.TridentModel import net.minecraft.client.model.geom.ModelLayers @@ -47,8 +46,6 @@ abstract class ArmourToolsModTridentItemRenderer(context: EntityRendererProvider bufferIn: MultiBufferSource, packedLightIn: Int ) { - ArmourAndToolsMod.logger.info( - "Rendering Trident Entity at $entityYaw, $partialTicks, $packedLightIn") matrixStackIn.pushPose() matrixStackIn.mulPose( Axis.YP.rotationDegrees(Mth.lerp(partialTicks, pEntity.yRotO, pEntity.yRot) - 90.0f)) diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/BlockInit.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/BlockInit.kt index cb05ed3a..e9a29ae6 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/BlockInit.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/BlockInit.kt @@ -21,6 +21,7 @@ package io.github.realyusufismail.armourandtoolsmod.core.init import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod.ArmorAndToolsMod.MOD_ID import io.github.realyusufismail.armourandtoolsmod.blocks.CustomArmourCraftingTable import io.github.realyusufismail.armourandtoolsmod.blocks.CustomToolCraftingTable +import io.github.realyusufismail.armourandtoolsmod.blocks.IngotFusionTollEnhancer import io.github.realyusufismail.armourandtoolsmod.blocks.lit.RainbowLitBlock import io.github.realyusufismail.armourandtoolsmod.blocks.lit.RubyLitBlock import net.minecraft.world.item.BlockItem @@ -89,6 +90,13 @@ object BlockInit { BlockBehaviour.Properties.copy(Blocks.DIAMOND_ORE).requiresCorrectToolForDrops(), MinableBlockType.DIAMOND_PICKAXE) + val IMPERIUM_ORE = + registerSmeltAbleBlock( + "imperium_ore", + ItemInit.IMPERIUM, + BlockBehaviour.Properties.copy(Blocks.IRON_ORE).requiresCorrectToolForDrops(), + MinableBlockType.IRON_PICKAXE) + // deepslate ores val DEEPSLATE_RUBY_ORE = registerSpecialSmeltAbleBlock( @@ -124,6 +132,13 @@ object BlockInit { .requiresCorrectToolForDrops(), MinableBlockType.DIAMOND_PICKAXE) + val DEEPSLATE_IMPERIUM_ORE = + registerSmeltAbleBlock( + "deepslate_imperium_ore", + ItemInit.IMPERIUM, + BlockBehaviour.Properties.copy(Blocks.DEEPSLATE_IRON_ORE).requiresCorrectToolForDrops(), + MinableBlockType.IRON_PICKAXE) + // blocks val RUBY_BLOCK = registerOreBlock( @@ -165,13 +180,17 @@ object BlockInit { BlockBehaviour.Properties.copy(Blocks.DIAMOND_BLOCK).requiresCorrectToolForDrops(), MinableBlockType.DIAMOND_PICKAXE) - // custom crafting table + // custom recipe tables val CUSTOM_ARMOUR_CRAFTING_TABLE = registerSpecial("custom_armour_crafting_table", ::CustomArmourCraftingTable) val CUSTOM_TOOL_CRAFTING_TABLE = registerSpecial("custom_tool_crafting_table", ::CustomToolCraftingTable) + @JvmField + val INGOT_FUSION_TOLL_ENHANCER = + registerSpecial("ingot_fusion_toll_enhancer", ::IngotFusionTollEnhancer) + private fun registerSpecial( name: String, supplier: () -> T, diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/ItemInit.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/ItemInit.kt index 891f88d9..6720f35b 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/ItemInit.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/ItemInit.kt @@ -50,6 +50,8 @@ object ItemInit { ITEMS.registerObject("rainbow") { Item(Item.Properties()) } val ENDERITE: ObjectHolderDelegate = ITEMS.registerObject("enderite") { Item(Item.Properties()) } + val IMPERIUM: ObjectHolderDelegate = + ITEMS.registerObject("imperium") { Item(Item.Properties()) } // raw ores val RAW_RUBY: ObjectHolderDelegate = @@ -64,6 +66,8 @@ object ItemInit { ITEMS.registerSmeltableObject("raw_rainbow", RAINBOW) { Item(Item.Properties()) } val RAW_ENDERITE: ObjectHolderDelegate = ITEMS.registerSmeltableObject("raw_enderite", ENDERITE) { Item(Item.Properties()) } + val RAW_IMPERIUM: ObjectHolderDelegate = + ITEMS.registerSmeltableObject("raw_imperium", IMPERIUM) { Item(Item.Properties()) } // armour val AMETHYST_HELMET: ObjectHolderDelegate = @@ -249,6 +253,15 @@ object ItemInit { Item.Properties().stacksTo(1).durability(800)) } + val IMPERIUM_SWORD: ObjectHolderDelegate = + ITEMS.registerSmeltableObject("imperium_sword", IMPERIUM) { + CustomSwordItem( + CustomToolMaterial.IMPERIUM_SWORD, + 10, + -2.7f, + Item.Properties().stacksTo(1).durability(800)) + } + // Pickaxes val RUBY_PICKAXE: ObjectHolderDelegate = ITEMS.registerSmeltableObject("ruby_pickaxe", RUBY) { @@ -286,6 +299,24 @@ object ItemInit { Item.Properties().stacksTo(1).durability(800)) } + val IMPERIUM_PICKAXE: ObjectHolderDelegate = + ITEMS.registerSmeltableObject("imperium_pickaxe", IMPERIUM) { + PickaxeItem( + CustomToolMaterial.IMPERIUM_PICKAXE, + 7, + -2.9f, + Item.Properties().stacksTo(1).durability(800)) + } + + val MAGMA_STRIKE_PICKAXE: ObjectHolderDelegate = + ITEMS.registerObject("magma_strike_pickaxe") { + PickaxeItem( + CustomToolMaterial.MAGMA_STRIKE_PICKAXE, + 9, + -3.0f, + Item.Properties().stacksTo(1).durability(1000)) + } + // Axes val RUBY_AXE: ObjectHolderDelegate = ITEMS.registerSmeltableObject("ruby_axe", RUBY) { diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/JEIRecipeTypes.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/JEIRecipeTypes.kt index 2386baa8..6722ddec 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/JEIRecipeTypes.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/JEIRecipeTypes.kt @@ -20,19 +20,26 @@ package io.github.realyusufismail.armourandtoolsmod.core.init import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod import io.github.realyusufismail.armourandtoolsmod.recipe.armour.CustomArmourCraftingTableRecipe +import io.github.realyusufismail.armourandtoolsmod.recipe.infusion.IngotFusionTollEnhancerRecipe import io.github.realyusufismail.armourandtoolsmod.recipe.tool.CustomToolCraftingTableRecipe import mezz.jei.api.recipe.RecipeType object JEIRecipeTypes { - val toolCrafting = + val toolCrafting: RecipeType = RecipeType.create( ArmourAndToolsMod.MOD_ID, "custom_tool_crafting_table", CustomToolCraftingTableRecipe::class.java) - val armourCrafting = + val armourCrafting: RecipeType = RecipeType.create( ArmourAndToolsMod.MOD_ID, "custom_armour_crafting_table", CustomArmourCraftingTableRecipe::class.java) + + val ingotFusionTollEnhancer: RecipeType = + RecipeType.create( + ArmourAndToolsMod.MOD_ID, + "ingot_fusion_toll_enhancer", + IngotFusionTollEnhancerRecipe::class.java) } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/MenuTypeInit.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/MenuTypeInit.kt index a0cf073c..6a920dbb 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/MenuTypeInit.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/MenuTypeInit.kt @@ -20,12 +20,14 @@ package io.github.realyusufismail.armourandtoolsmod.core.init import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod.ArmorAndToolsMod.MOD_ID import io.github.realyusufismail.armourandtoolsmod.blocks.armour.CustomArmourCraftingTableMenu +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.IngotFusionTollEnhancerMenu import io.github.realyusufismail.armourandtoolsmod.blocks.tool.CustomToolCraftingTableMenu import net.minecraft.world.flag.FeatureFlagSet import net.minecraft.world.flag.FeatureFlags import net.minecraft.world.inventory.AbstractContainerMenu import net.minecraft.world.inventory.MenuType import net.minecraft.world.inventory.MenuType.MenuSupplier +import net.minecraftforge.common.extensions.IForgeMenuType import net.minecraftforge.registries.DeferredRegister import net.minecraftforge.registries.ForgeRegistries import thedarkcolour.kotlinforforge.forge.ObjectHolderDelegate @@ -43,6 +45,17 @@ object MenuTypeInit { ObjectHolderDelegate> = register("custom_tool_crafting_table", ::CustomToolCraftingTableMenu) + @JvmField + val INGOT_FUSION_TOLL_ENHANCER_MENU: + ObjectHolderDelegate> = + MENU.registerObject("ingot_fusion_toll_enhancer") { + // TODO : Get null here. + IForgeMenuType.create { pContainerId, pInventory, pData -> + IngotFusionTollEnhancerMenu(pContainerId, pInventory, pData) + } + } + .setGuiTitle("container.ingot_fusion_toll_enhancer") + private fun register( name: String, pFactory: MenuSupplier, diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeBookTypesInit.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeBookTypesInit.kt index c40e516a..85d26596 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeBookTypesInit.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeBookTypesInit.kt @@ -23,4 +23,5 @@ import net.minecraft.world.inventory.RecipeBookType object RecipeBookTypesInit { val ARMOUR_CRAFTING: RecipeBookType = RecipeBookType.create("armour_crafting") val TOOL_CRAFTING: RecipeBookType = RecipeBookType.create("tool_crafting") + @JvmField val INGOT_FUSION: RecipeBookType = RecipeBookType.create("ingot_fusion") } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeCategoriesInit.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeCategoriesInit.kt index 6276d29d..5bbcad80 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeCategoriesInit.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeCategoriesInit.kt @@ -22,8 +22,10 @@ import com.google.common.base.Supplier import com.google.common.base.Suppliers import com.google.common.collect.ImmutableList import io.github.realyusufismail.armourandtoolsmod.blocks.armour.book.CustomArmourCraftingBookCategory +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.book.IngotFusionTollEnhancerRecipeBookCategory import io.github.realyusufismail.armourandtoolsmod.blocks.tool.book.CustomToolsCraftingBookCategory import io.github.realyusufismail.armourandtoolsmod.recipe.armour.CustomArmourCraftingTableRecipe +import io.github.realyusufismail.armourandtoolsmod.recipe.infusion.IngotFusionTollEnhancerRecipe import io.github.realyusufismail.armourandtoolsmod.recipe.tool.CustomToolCraftingTableRecipe import net.minecraft.client.RecipeBookCategories import net.minecraft.world.item.ItemStack @@ -113,6 +115,30 @@ object RecipeCategoriesInit { RecipeBookCategories.create("TOOL_CRAFTING_MISC", ItemStack(Items.DIAMOND_SHOVEL)) } + private val INGOT_FUSION_TOLL_ENHANCER_SEARCH: Supplier = + Suppliers.memoize { + RecipeBookCategories.create( + "INGOT_FUSION_TOLL_ENHANCER_SEARCH", ItemStack(Items.COMPASS)) + } + + private val INGOT_FUSION_TOLL_ENHANCER_TOOL: Supplier = + Suppliers.memoize { + RecipeBookCategories.create( + "INGOT_FUSION_TOLL_ENHANCER_TOOL", ItemStack(ItemInit.MAGMA_STRIKE_PICKAXE.get())) + } + + private val INGOT_FUSION_TOLL_ENHANCER_ARMOUR: Supplier = + Suppliers.memoize { + RecipeBookCategories.create( + "INGOT_FUSION_TOLL_ENHANCER_ARMOUR", ItemStack(ItemInit.RAINBOW_CHESTPLATE.get())) + } + + private val INGOT_FUSION_TOLL_ENHANCER_MISC: Supplier = + Suppliers.memoize { + RecipeBookCategories.create( + "INGOT_FUSION_TOLL_ENHANCER_MISC", ItemStack(Items.DIAMOND_SHOVEL)) + } + fun registerRecipeBookCategories(event: RegisterRecipeBookCategoriesEvent) { event.registerBookCategories( RecipeBookTypesInit.ARMOUR_CRAFTING, @@ -224,5 +250,45 @@ object RecipeCategoriesInit { TOOL_CRAFTING_MISC.get() } } + + event.registerBookCategories( + RecipeBookTypesInit.INGOT_FUSION, + ImmutableList.of( + INGOT_FUSION_TOLL_ENHANCER_SEARCH.get(), + INGOT_FUSION_TOLL_ENHANCER_TOOL.get(), + INGOT_FUSION_TOLL_ENHANCER_ARMOUR.get(), + INGOT_FUSION_TOLL_ENHANCER_MISC.get())) + + event.registerAggregateCategory( + INGOT_FUSION_TOLL_ENHANCER_SEARCH.get(), + ImmutableList.of( + INGOT_FUSION_TOLL_ENHANCER_TOOL.get(), + INGOT_FUSION_TOLL_ENHANCER_ARMOUR.get(), + INGOT_FUSION_TOLL_ENHANCER_MISC.get())) + + event.registerAggregateCategory( + INGOT_FUSION_TOLL_ENHANCER_TOOL.get(), listOf(INGOT_FUSION_TOLL_ENHANCER_TOOL.get())) + + event.registerAggregateCategory( + INGOT_FUSION_TOLL_ENHANCER_ARMOUR.get(), + listOf(INGOT_FUSION_TOLL_ENHANCER_ARMOUR.get())) + + event.registerAggregateCategory( + INGOT_FUSION_TOLL_ENHANCER_MISC.get(), listOf(INGOT_FUSION_TOLL_ENHANCER_MISC.get())) + + event.registerRecipeCategoryFinder(RecipeTypeInit.INGOT_FUSION_TOLL_ENHANCER.get()) { + if (it is IngotFusionTollEnhancerRecipe) { + when (it.category) { + IngotFusionTollEnhancerRecipeBookCategory.TOOL -> + INGOT_FUSION_TOLL_ENHANCER_TOOL.get() + IngotFusionTollEnhancerRecipeBookCategory.ARMOUR -> + INGOT_FUSION_TOLL_ENHANCER_ARMOUR.get() + IngotFusionTollEnhancerRecipeBookCategory.MISC -> + INGOT_FUSION_TOLL_ENHANCER_MISC.get() + } + } else { + INGOT_FUSION_TOLL_ENHANCER_MISC.get() + } + } } } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeSerializerInit.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeSerializerInit.kt index 381a3b78..d4a5279b 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeSerializerInit.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeSerializerInit.kt @@ -20,6 +20,7 @@ package io.github.realyusufismail.armourandtoolsmod.core.init import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod.ArmorAndToolsMod.MOD_ID import io.github.realyusufismail.armourandtoolsmod.recipe.armour.CustomArmourCraftingTableShapedRecipe +import io.github.realyusufismail.armourandtoolsmod.recipe.infusion.IngotFusionTollEnhancerRecipe import io.github.realyusufismail.armourandtoolsmod.recipe.tool.CustomToolCraftingTableShapedRecipe import net.minecraft.world.item.crafting.Recipe import net.minecraft.world.item.crafting.RecipeSerializer @@ -40,6 +41,11 @@ object RecipeSerializerInit { ObjectHolderDelegate> = register("custom_tool_crafter", CustomToolCraftingTableShapedRecipe.Serializer()) + @JvmField + val INGOT_FUSION_TOLL_ENHANCER_RECIPE: + ObjectHolderDelegate> = + register("ingot_fusion_toll_enhancer", IngotFusionTollEnhancerRecipe.Serializer()) + private fun , T : Recipe<*>> register( pKey: String, pRecipeSerializer: S, diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeTypeInit.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeTypeInit.kt index 72c8bc14..99e270e7 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeTypeInit.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/RecipeTypeInit.kt @@ -20,6 +20,7 @@ package io.github.realyusufismail.armourandtoolsmod.core.init import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod.ArmorAndToolsMod.MOD_ID import io.github.realyusufismail.armourandtoolsmod.recipe.armour.CustomArmourCraftingTableRecipe +import io.github.realyusufismail.armourandtoolsmod.recipe.infusion.IngotFusionTollEnhancerRecipe import io.github.realyusufismail.armourandtoolsmod.recipe.tool.CustomToolCraftingTableRecipe import net.minecraft.resources.ResourceLocation import net.minecraft.world.item.crafting.RecipeType @@ -42,4 +43,11 @@ object RecipeTypeInit { RECIPE_TYPES.registerObject("tool_crafting") { RecipeType.simple(ResourceLocation(MOD_ID, "tool_crafting")) } + + @JvmField + val INGOT_FUSION_TOLL_ENHANCER: + ObjectHolderDelegate> = + RECIPE_TYPES.registerObject("ingot_fusion_toll_enhancer") { + RecipeType.simple(ResourceLocation(MOD_ID, "ingot_fusion_toll_enhancer")) + } } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/TagsInit.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/TagsInit.kt index f2e6ed62..840e5ad9 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/TagsInit.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/TagsInit.kt @@ -53,6 +53,11 @@ object TagsInit { ResourceLocation.tryParse("forge:ores/enderite_ores")?.let { BlockTags.create(it) } ?: throw Exception("Failed to create tag") + val ORES_IMPERIUM: TagKey = + ResourceLocation.tryParse("forge:ores/imperium_ores")?.let { BlockTags.create(it) } + ?: throw Exception("Failed to create tag") + + // deepslate ores val DEEPSLATE_ORES_RUBY: TagKey = ResourceLocation.tryParse("forge:deepslate_ores/ruby_ores")?.let { BlockTags.create(it) @@ -83,6 +88,13 @@ object TagsInit { } ?: throw Exception("Failed to create tag") + val DEEPSLATE_ORES_IMPERIUM: TagKey = + ResourceLocation.tryParse("forge:deepslate_ores/imperium_ores")?.let { + BlockTags.create(it) + } + ?: throw Exception("Failed to create tag") + + // storage blocks val STORAGE_RUBY = ResourceLocation.tryParse("forge:storage_blocks/ruby")?.let { BlockTags.create(it) } ?: throw Exception("Failed to create tag") @@ -141,6 +153,12 @@ object TagsInit { ResourceLocation.tryParse("forge:ores/enderite_ores") ?: throw Exception("Failed to create tag")) + val ORES_IMPERIUM: TagKey = + ItemTags.create( + ResourceLocation.tryParse("forge:ores/imperium_ores") + ?: throw Exception("Failed to create tag")) + + // deepslate ores val DEEPSLATE_ORES_RUBY: TagKey = ItemTags.create( ResourceLocation.tryParse("forge:deepslate_ores/ruby_ores") @@ -166,6 +184,12 @@ object TagsInit { ResourceLocation.tryParse("forge:deepslate_ores/aqumarine_ores") ?: throw Exception("Failed to create tag")) + val DEEPSLATE_ORES_IMPERIUM: TagKey = + ItemTags.create( + ResourceLocation.tryParse("forge:deepslate_ores/imperium_ores") + ?: throw Exception("Failed to create tag")) + + // storage blocks val STORAGE_RUBY: TagKey = ItemTags.create( ResourceLocation.tryParse("forge:storage_blocks/ruby") @@ -227,6 +251,11 @@ object TagsInit { ResourceLocation.tryParse("forge:ingots/enderite") ?: throw Exception("Failed to create tag")) + val INGOTS_IMPERIUM: TagKey = + ItemTags.create( + ResourceLocation.tryParse("forge:ingots/imperium") + ?: throw Exception("Failed to create tag")) + // raw ore scraps val RAW_RUBY: TagKey = ItemTags.create( @@ -257,5 +286,10 @@ object TagsInit { ItemTags.create( ResourceLocation.tryParse("forge:scraps/enderite") ?: throw Exception("Failed to create tag")) + + val RAW_IMPERIUM: TagKey = + ItemTags.create( + ResourceLocation.tryParse("forge:scraps/imperium") + ?: throw Exception("Failed to create tag")) } } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/material/CustomToolMaterial.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/material/CustomToolMaterial.kt index 492014df..75bfc07c 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/material/CustomToolMaterial.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/material/CustomToolMaterial.kt @@ -48,7 +48,10 @@ enum class CustomToolMaterial( SAPPHIRE_PICKAXE(5, 3000, 12, Supplier { Ingredient.of(ItemInit.SAPPHIRE.get()) }), SAPPHIRE_AXE(5, 3000, 12, Supplier { Ingredient.of(ItemInit.SAPPHIRE.get()) }), SAPPHIRE_SHOVEL(5, 3000, 12, Supplier { Ingredient.of(ItemInit.SAPPHIRE.get()) }), - SAPPHIRE_HOE(5, 3000, 12, Supplier { Ingredient.of(ItemInit.SAPPHIRE.get()) }); + SAPPHIRE_HOE(5, 3000, 12, Supplier { Ingredient.of(ItemInit.SAPPHIRE.get()) }), + IMPERIUM_SWORD(6, 4000, 20, Supplier { Ingredient.of(ItemInit.IMPERIUM.get()) }), + IMPERIUM_PICKAXE(6, 4000, 20, Supplier { Ingredient.of(ItemInit.IMPERIUM.get()) }), + MAGMA_STRIKE_PICKAXE(6, 8000, 20, Supplier { Ingredient.of(ItemInit.IMPERIUM.get()) }); private val harvestLevel = 0 private val maxUses = 0 diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/advancment/Advancements.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/advancment/Advancements.kt index 923351fe..604e0128 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/advancment/Advancements.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/advancment/Advancements.kt @@ -561,5 +561,54 @@ class Advancements : ForgeAdvancementProvider.AdvancementGenerator { .addCriterion("enderite_hoe", getItem(ItemInit.ENDERITE_HOE.get())) .requirements(RequirementsStrategy.OR) .save(consumer, id("enderite_tools")) + + // Imperium + + val imperiumOre = + Advancement.Builder.advancement() + .parent(root) + .display( + BlockInit.IMPERIUM_ORE.get(), + title("imperium_ore"), + description("imperium_ore"), + null, + FrameType.GOAL, + true, + true, + false) + .addCriterion("get_ore", getItem(TagsInit.ItemTagsInit.ORES_IMPERIUM)) + .save(consumer, id("imperium_ore")) + + val imperiumIngot = + Advancement.Builder.advancement() + .parent(imperiumOre) + .display( + ItemInit.IMPERIUM.get(), + title("imperium_ingot"), + description("imperium_ingot"), + null, + FrameType.GOAL, + true, + true, + false) + .addCriterion("get_scrap", getItem(TagsInit.ItemTagsInit.INGOTS_IMPERIUM)) + .save(consumer, id("imperium_ingot")) + + Advancement.Builder.advancement() + .parent(imperiumIngot) + .display( + ItemInit.IMPERIUM_SWORD.get(), + title("imperium_tools"), + description("imperium_tools"), + null, + FrameType.GOAL, + true, + true, + false) + .addCriterion("imperium_sword", getItem(ItemInit.IMPERIUM_SWORD.get())) + .addCriterion("imperium_pickaxe", getItem(ItemInit.IMPERIUM_PICKAXE.get())) + // .addCriterion("imperium_axe", getItem(ItemInit.IMPERIUM_AXE.get())) + .requirements(RequirementsStrategy.OR) + .save(consumer, id("imperium_tools")) } } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/lang/ModEnLangProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/lang/ModEnLangProvider.kt index c1a4eecc..9b171dce 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/lang/ModEnLangProvider.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/lang/ModEnLangProvider.kt @@ -40,6 +40,7 @@ class ModEnLangProvider(gen: DataGenerator) : ModEnLangProviderSupport(gen, MOD_ addBlock(BlockInit.RAINBOW_ORE, "Rainbow Ore") addBlock(BlockInit.AQUMARINE_ORE, "Aqumarine Ore") addBlock(BlockInit.ENDERITE_ORE, "Enderite Ore") + addBlock(BlockInit.IMPERIUM_ORE, "Imperium Ore") // blocks addBlock(BlockInit.RUBY_BLOCK, "Ruby Block") @@ -55,10 +56,12 @@ class ModEnLangProvider(gen: DataGenerator) : ModEnLangProviderSupport(gen, MOD_ addBlock(BlockInit.DEEPSLATE_GRAPHITE_ORE, "Deepslate Graphite Ore") addBlock(BlockInit.DEEPSLATE_RAINBOW_ORE, "Deepslate Rainbow Ore") addBlock(BlockInit.DEEPSLATE_AQUMARINE_ORE, "Deepslate Aqumarine Ore") + addBlock(BlockInit.DEEPSLATE_IMPERIUM_ORE, "Deepslate Imperium Ore") // custom crafting tables addBlock(BlockInit.CUSTOM_ARMOUR_CRAFTING_TABLE, "Custom Armour Crafting Table") addBlock(BlockInit.CUSTOM_TOOL_CRAFTING_TABLE, "Custom Tool Crafting Table") + addBlock(BlockInit.INGOT_FUSION_TOLL_ENHANCER, "Ingot Fusion Toll Enhancer") // ore ingot addItem(ItemInit.RUBY, "Ruby") @@ -67,6 +70,7 @@ class ModEnLangProvider(gen: DataGenerator) : ModEnLangProviderSupport(gen, MOD_ addItem(ItemInit.RAINBOW, "Rainbow Ingot") addItem(ItemInit.AQUMARINE, "Aqumarine") addItem(ItemInit.ENDERITE, "Enderite") + addItem(ItemInit.IMPERIUM, "Imperium") // raw ores addItem(ItemInit.RAW_RUBY, "Raw Ruby") @@ -75,6 +79,7 @@ class ModEnLangProvider(gen: DataGenerator) : ModEnLangProviderSupport(gen, MOD_ addItem(ItemInit.RAW_RAINBOW, "Raw Rainbow") addItem(ItemInit.RAW_AQUMARINE, "Raw Aqumarine") addItem(ItemInit.RAW_ENDERITE, "Raw Enderite") + addItem(ItemInit.RAW_IMPERIUM, "Raw Imperium") // armor addItem(ItemInit.RUBY_HELMET, "Ruby Helmet") @@ -126,6 +131,9 @@ class ModEnLangProvider(gen: DataGenerator) : ModEnLangProviderSupport(gen, MOD_ addItem(ItemInit.SAPPHIRE_AXE, "Sapphire Axe") addItem(ItemInit.SAPPHIRE_SHOVEL, "Sapphire Shovel") addItem(ItemInit.SAPPHIRE_HOE, "Sapphire Hoe") + addItem(ItemInit.IMPERIUM_SWORD, "Imperium Sword") + addItem(ItemInit.IMPERIUM_PICKAXE, "Imperium Pickaxe") + addItem(ItemInit.MAGMA_STRIKE_PICKAXE, "Magma Strike Pickaxe") // Shields addItem(ItemInit.RUBY_SHIELD, "Ruby Shield") @@ -143,6 +151,8 @@ class ModEnLangProvider(gen: DataGenerator) : ModEnLangProviderSupport(gen, MOD_ add("container.custom_armour_crafting_table.description", "Craft your own custom armour!") add("container.custom_tool_crafting_table", "Tool Crafting Table") add("container.custom_tool_crafting_table.description", "Craft your own custom tools!") + add("container.ingot_fusion_toll_enhancer", "Ingot Fusion Toll Enhancer") + add("container.ingot_fusion_toll_enhancer.description", "Enhance your tools and armour!") // advancements addAdvancement( diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/loot/ModBlockLootTables.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/loot/ModBlockLootTables.kt index d886cc6d..332449bd 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/loot/ModBlockLootTables.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/loot/ModBlockLootTables.kt @@ -50,6 +50,9 @@ class ModBlockLootTables : BlockLootSubProvider(setOf(), FeatureFlags.REGISTRY.a add( BlockInit.ENDERITE_ORE.get(), createOreDrop(BlockInit.ENDERITE_ORE.get(), ItemInit.RAW_ENDERITE.get())) + add( + BlockInit.IMPERIUM_ORE.get(), + createOreDrop(BlockInit.IMPERIUM_ORE.get(), ItemInit.RAW_IMPERIUM.get())) // deepslate ores add( @@ -67,6 +70,9 @@ class ModBlockLootTables : BlockLootSubProvider(setOf(), FeatureFlags.REGISTRY.a add( BlockInit.DEEPSLATE_AQUMARINE_ORE.get(), createOreDrop(BlockInit.DEEPSLATE_AQUMARINE_ORE.get(), ItemInit.RAW_AQUMARINE.get())) + add( + BlockInit.DEEPSLATE_IMPERIUM_ORE.get(), + createOreDrop(BlockInit.DEEPSLATE_IMPERIUM_ORE.get(), ItemInit.RAW_IMPERIUM.get())) // blocks dropSelf(BlockInit.RUBY_BLOCK.get()) @@ -77,6 +83,7 @@ class ModBlockLootTables : BlockLootSubProvider(setOf(), FeatureFlags.REGISTRY.a dropSelf(BlockInit.ENDERITE_BLOCK.get()) dropSelf(BlockInit.CUSTOM_ARMOUR_CRAFTING_TABLE.get()) dropSelf(BlockInit.CUSTOM_TOOL_CRAFTING_TABLE.get()) + dropSelf(BlockInit.INGOT_FUSION_TOLL_ENHANCER.get()) } override fun getKnownBlocks(): Iterable { diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/MainModRecipeProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/MainModRecipeProvider.kt index a81d170a..fb01fe4e 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/MainModRecipeProvider.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/MainModRecipeProvider.kt @@ -38,6 +38,7 @@ open class MainModRecipeProvider(private val generatorIn: DataGenerator) : NormalCraftingTableRecipeProvider(this, pWriter).build() ToolCraftingTableRecipeProvider(this, pWriter).build() NewSmithingTableRecipeProvider(this, pWriter).build() + IngotFusionTollEnhancerRecipeProvider(this, pWriter).build() } open fun modId(path: String): ResourceLocation { diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/CustomArmourCraftingTableRecipeBuilder.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/CustomArmourCraftingTableRecipeBuilder.kt index 6cc3ba09..7637afb0 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/CustomArmourCraftingTableRecipeBuilder.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/CustomArmourCraftingTableRecipeBuilder.kt @@ -40,6 +40,7 @@ import net.minecraft.tags.TagKey import net.minecraft.world.item.Item import net.minecraft.world.item.crafting.Ingredient import net.minecraft.world.item.crafting.RecipeSerializer +import net.minecraft.world.item.enchantment.Enchantment import net.minecraft.world.level.ItemLike import net.minecraftforge.registries.ForgeRegistries @@ -54,6 +55,9 @@ object CustomArmourCraftingTableRecipeBuilder { private var recipeCategory: RecipeCategory? = null private var count: Int? = null private var result: Item? = null + private var showNotification: Boolean = false + private var enchantmentsAndLevels: EnchantmentsAndLevels = EnchantmentsAndLevels() + private var hideFlags: Boolean = false fun shaped( bookCategory: CustomArmourCraftingBookCategory, @@ -122,6 +126,24 @@ object CustomArmourCraftingTableRecipeBuilder { return this } + fun addEnchantment( + enchantment: Enchantment, + level: Int + ): CustomArmourCraftingTableRecipeBuilder { + enchantmentsAndLevels.add(enchantment, level) + return this + } + + fun setHideFlags(hideFlags: Boolean): CustomArmourCraftingTableRecipeBuilder { + this.hideFlags = hideFlags + return this + } + + fun showNotification(p_273326_: Boolean): CustomArmourCraftingTableRecipeBuilder { + this.showNotification = p_273326_ + return this + } + fun getResult(): Item { return result ?: throw IllegalStateException("Result is not set") } @@ -146,7 +168,10 @@ object CustomArmourCraftingTableRecipeBuilder { rows, key, advancement ?: throw IllegalStateException("Advancement is not set"), - resourceLocation.withPrefix("recipes/" + recipeCategory!!.folderName + "/"))) + resourceLocation.withPrefix("recipes/" + recipeCategory!!.folderName + "/"), + showNotification, + enchantmentsAndLevels, + hideFlags)) clear() } @@ -207,6 +232,9 @@ object CustomArmourCraftingTableRecipeBuilder { key: Map, advancement: Advancement.Builder, advancementId: ResourceLocation, + showNotification: Boolean, + val enchantmentsAndLevels: EnchantmentsAndLevels, + val hideFlags: Boolean, ) : FinishedRecipe { override fun serializeRecipeData(jsonObject: JsonObject) { if (group.isNotEmpty()) { @@ -230,6 +258,26 @@ object CustomArmourCraftingTableRecipeBuilder { if (count > 1) { jsonObject2.addProperty("count", count) } + + // enchantment + if (enchantmentsAndLevels.isNotEmpty()) { + val jsonArray1 = JsonArray() + val jsonObject3 = JsonObject() + val jsonObject4 = JsonObject() + for (entry: Map.Entry in enchantmentsAndLevels.entries) { + jsonObject4.addProperty( + "id", + Objects.requireNonNull(ForgeRegistries.ENCHANTMENTS.getKey(entry.key)) + .toString()) + jsonObject4.addProperty("lvl", entry.value) + jsonArray1.add(jsonObject4) + } + jsonObject3.add("Enchantments", jsonArray1) + jsonObject3.addProperty("HideFlags", hideFlags) + jsonObject2.add("nbt", jsonObject3) + } + + jsonObject.addProperty("show_notification", showNotification) jsonObject.add("result", jsonObject2) } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/CustomToolCraftingTableRecipeBuilder.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/CustomToolCraftingTableRecipeBuilder.kt index 956f2101..fc98b8d0 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/CustomToolCraftingTableRecipeBuilder.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/CustomToolCraftingTableRecipeBuilder.kt @@ -41,6 +41,7 @@ import net.minecraft.tags.TagKey import net.minecraft.world.item.Item import net.minecraft.world.item.crafting.Ingredient import net.minecraft.world.item.crafting.RecipeSerializer +import net.minecraft.world.item.enchantment.Enchantment import net.minecraft.world.level.ItemLike import net.minecraftforge.registries.ForgeRegistries @@ -55,6 +56,10 @@ object CustomToolCraftingTableRecipeBuilder : RecipeBuilder { private var recipeCategory: RecipeCategory? = null private var count: Int? = null private var result: Item? = null + private var showNotification: Boolean = false + + private var enchantmentsAndLevels: EnchantmentsAndLevels = EnchantmentsAndLevels() + private var hideFlags: Int = 0 fun shaped( bookCategory: CustomToolsCraftingBookCategory, @@ -123,6 +128,28 @@ object CustomToolCraftingTableRecipeBuilder : RecipeBuilder { return this } + fun addEnchantment(enchantment: Enchantment, level: Int): CustomToolCraftingTableRecipeBuilder { + enchantmentsAndLevels.add(enchantment, level) + return this + } + + fun addEnchantments( + enchantmentsAndLevels: EnchantmentsAndLevels + ): CustomToolCraftingTableRecipeBuilder { + this.enchantmentsAndLevels.addAll(enchantmentsAndLevels) + return this + } + + fun hideFlags(hideFlags: Int): CustomToolCraftingTableRecipeBuilder { + this.hideFlags = hideFlags + return this + } + + fun showNotification(p_273326_: Boolean): CustomToolCraftingTableRecipeBuilder { + this.showNotification = p_273326_ + return this + } + override fun getResult(): Item { return result ?: throw IllegalStateException("Result is not set") } @@ -147,7 +174,10 @@ object CustomToolCraftingTableRecipeBuilder : RecipeBuilder { rows, key, advancement ?: throw IllegalStateException("Advancement is not set"), - resourceLocation.withPrefix("recipes/" + recipeCategory!!.folderName + "/"))) + resourceLocation.withPrefix("recipes/" + recipeCategory!!.folderName + "/"), + showNotification, + enchantmentsAndLevels, + hideFlags)) clear() } @@ -208,6 +238,9 @@ object CustomToolCraftingTableRecipeBuilder : RecipeBuilder { key: Map, advancement: Advancement.Builder, advancementId: ResourceLocation, + showNotification: Boolean, + enchantmentsAndLevels: EnchantmentsAndLevels, + hideFlags: Int = 0, ) : FinishedRecipe { override fun serializeRecipeData(jsonObject: JsonObject) { if (group.isNotEmpty()) { @@ -231,6 +264,27 @@ object CustomToolCraftingTableRecipeBuilder : RecipeBuilder { if (count > 1) { jsonObject2.addProperty("count", count) } + + // enchantment + + if (enchantmentsAndLevels.isNotEmpty()) { + val jsonArray1 = JsonArray() + val jsonObject3 = JsonObject() + val jsonObject4 = JsonObject() + for (entry: Map.Entry in enchantmentsAndLevels.entries) { + jsonObject4.addProperty( + "id", + Objects.requireNonNull(ForgeRegistries.ENCHANTMENTS.getKey(entry.key)) + .toString()) + jsonObject4.addProperty("lvl", entry.value) + jsonArray1.add(jsonObject4) + } + jsonObject3.add("Enchantments", jsonArray1) + jsonObject3.addProperty("HideFlags", hideFlags) + jsonObject2.add("nbt", jsonObject3) + } + + jsonObject.addProperty("showNotification", showNotification) jsonObject.add("result", jsonObject2) } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/EntityRenderersInit.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/EnchantmentsAndLevels.kt similarity index 57% rename from src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/EntityRenderersInit.kt rename to src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/EnchantmentsAndLevels.kt index 962d2ce6..518be3bb 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/core/init/EntityRenderersInit.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/EnchantmentsAndLevels.kt @@ -16,6 +16,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.github.realyusufismail.armourandtoolsmod.core.init +package io.github.realyusufismail.armourandtoolsmod.datagen.recipe.builder -object EntityRenderersInit +import net.minecraft.world.item.enchantment.Enchantment + +class EnchantmentsAndLevels : MutableMap by mutableMapOf() { + + fun add(enchantment: net.minecraft.world.item.enchantment.Enchantment, level: Int) { + put(enchantment, level) + } + + fun addAll(enchantmentsAndLevels: EnchantmentsAndLevels) { + putAll(enchantmentsAndLevels) + } +} diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/IngotFusionTollEnhancerRecipeBuilder.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/IngotFusionTollEnhancerRecipeBuilder.kt new file mode 100644 index 00000000..e2fd9c47 --- /dev/null +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/builder/IngotFusionTollEnhancerRecipeBuilder.kt @@ -0,0 +1,157 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.datagen.recipe.builder + +import com.google.gson.JsonObject +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.book.IngotFusionTollEnhancerRecipeBookCategory +import io.github.realyusufismail.armourandtoolsmod.core.init.RecipeSerializerInit +import java.util.* +import java.util.function.Consumer +import net.minecraft.advancements.Advancement +import net.minecraft.advancements.AdvancementRewards +import net.minecraft.advancements.RequirementsStrategy +import net.minecraft.advancements.critereon.InventoryChangeTrigger +import net.minecraft.advancements.critereon.RecipeUnlockedTrigger +import net.minecraft.data.recipes.FinishedRecipe +import net.minecraft.resources.ResourceLocation +import net.minecraft.world.item.Item +import net.minecraft.world.item.ItemStack +import net.minecraft.world.item.crafting.Ingredient +import net.minecraft.world.item.crafting.RecipeSerializer +import net.minecraftforge.registries.ForgeRegistries + +class IngotFusionTollEnhancerRecipeBuilder( + private val recipeCategory: IngotFusionTollEnhancerRecipeBookCategory, + private val ingredient1: Ingredient, + private val ingredient2: Ingredient, + private val ingredient3: Ingredient, + private val result: ItemStack, +) { + private val advancementBuilder = Advancement.Builder.advancement() + + fun unlockedBy( + criterionId: String, + criterion: InventoryChangeTrigger.TriggerInstance + ): IngotFusionTollEnhancerRecipeBuilder { + advancementBuilder.addCriterion(criterionId, criterion) + return this + } + + fun save(consumer: Consumer, rl: ResourceLocation) { + try { + ensureValid(rl) + if (advancementBuilder.criteria.isNotEmpty()) + advancementBuilder + .parent(ResourceLocation("recipes/root")) + .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(rl)) + .rewards(AdvancementRewards.Builder.recipe(rl)) + .requirements(RequirementsStrategy.OR) + consumer.accept( + Result( + recipeCategory, + ingredient1, + ingredient2, + ingredient3, + result, + advancementBuilder, + rl.withPrefix("recipes/" + recipeCategory.serializedName + "/"), + rl)) + } catch (e: IllegalStateException) { + throw IllegalStateException("Could not create recipe: $rl", e) + } + } + + private fun ensureValid(rl: ResourceLocation) { + check(advancementBuilder.criteria.isNotEmpty()) { "Can not obtain recipe: $rl" } + } + + /** + * Protip: The error has a string, seaching for that string will give more context + * + * @param input1 The first input item + * @param input2 The second input item + * @param input3 The third input item + * @param output The output item + * @param category The recipe category + * @param advancementId The advancement id + * @param id The recipe id + */ + @JvmRecord + private data class Result( + val recipeCategory: IngotFusionTollEnhancerRecipeBookCategory, + val ingredient1: Ingredient, + val ingredient2: Ingredient, + val ingredient3: Ingredient, + val result: ItemStack, + val advancementBuilder: Advancement.Builder, + val advancementId: ResourceLocation, + val id: ResourceLocation + ) : FinishedRecipe { + override fun serializeRecipeData(json: JsonObject) { + json.addProperty("category", recipeCategory.serializedName) + json.add("result", serializeResult(result)) + json.add("ingredient1", ingredient1.toJson()) + json.add("ingredient2", ingredient2.toJson()) + json.add("ingredient3", ingredient3.toJson()) + } + + private fun serializeResult(stack: ItemStack): JsonObject { + val json = JsonObject() + json.addProperty("item", ForgeRegistries.ITEMS.getKey(stack.item).toString()) + json.addProperty("count", stack.count) + if (stack.hasTag()) { + json.addProperty("nbt", stack.tag.toString()) + } + return json + } + + override fun getId(): ResourceLocation { + return id + } + + override fun getType(): RecipeSerializer<*> { + return RecipeSerializerInit.INGOT_FUSION_TOLL_ENHANCER_RECIPE.get() + } + + override fun serializeAdvancement(): JsonObject { + return advancementBuilder.serializeToJson() + } + + override fun getAdvancementId(): ResourceLocation { + return advancementId + } + } + + companion object { + fun builder( + recipeCategory: IngotFusionTollEnhancerRecipeBookCategory, + input1: Item, + input2: Item, + input3: Item, + result: ItemStack, + ): IngotFusionTollEnhancerRecipeBuilder { + return IngotFusionTollEnhancerRecipeBuilder( + recipeCategory, ingredient(input1), ingredient(input2), ingredient(input3), result) + } + + private fun ingredient(entry: Item): Ingredient { + return Ingredient.of(entry) + } + } +} diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/ArmourCraftingTableRecipeProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/ArmourCraftingTableRecipeProvider.kt index 088a7cc1..def3541f 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/ArmourCraftingTableRecipeProvider.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/ArmourCraftingTableRecipeProvider.kt @@ -35,7 +35,6 @@ class ArmourCraftingTableRecipeProvider( private val hasItem = "has_item" fun build() { - CustomArmourCraftingTableRecipeBuilder.shaped( CustomArmourCraftingBookCategory.ARMOUR_HEAD, RecipeCategory.COMBAT, diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/IngotFusionTollEnhancerRecipeProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/IngotFusionTollEnhancerRecipeProvider.kt new file mode 100644 index 00000000..496cf7ee --- /dev/null +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/IngotFusionTollEnhancerRecipeProvider.kt @@ -0,0 +1,44 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.datagen.recipe.provider + +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.book.IngotFusionTollEnhancerRecipeBookCategory +import io.github.realyusufismail.armourandtoolsmod.core.init.ItemInit +import io.github.realyusufismail.armourandtoolsmod.datagen.recipe.MainModRecipeProvider +import io.github.realyusufismail.armourandtoolsmod.datagen.recipe.builder.IngotFusionTollEnhancerRecipeBuilder +import java.util.function.Consumer +import net.minecraft.data.recipes.FinishedRecipe +import net.minecraft.world.item.ItemStack + +class IngotFusionTollEnhancerRecipeProvider( + private val mainModRecipeProvider: MainModRecipeProvider, + private val pWriter: Consumer +) : MainModRecipeProvider(mainModRecipeProvider) { + + fun build() { + IngotFusionTollEnhancerRecipeBuilder.builder( + IngotFusionTollEnhancerRecipeBookCategory.TOOL, + ItemInit.IMPERIUM.get(), + ItemInit.IMPERIUM_PICKAXE.get(), + ItemInit.IMPERIUM.get(), + ItemStack(ItemInit.MAGMA_STRIKE_PICKAXE.get())) + .unlockedBy("has_imperium_ingot", has(ItemInit.IMPERIUM.get())) + .save(pWriter, modId("magma_strike_pickaxe")) + } +} diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/NormalCraftingTableRecipeProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/NormalCraftingTableRecipeProvider.kt index 459f499f..ba225ee0 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/NormalCraftingTableRecipeProvider.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/NormalCraftingTableRecipeProvider.kt @@ -26,6 +26,9 @@ import io.github.realyusufismail.realyusufismailcore.recipe.YusufShapelessRecipe import java.util.function.Consumer import net.minecraft.data.recipes.FinishedRecipe import net.minecraft.data.recipes.RecipeCategory +import net.minecraft.tags.BlockTags +import net.minecraft.tags.BlockTags.BASE_STONE_OVERWORLD +import net.minecraft.tags.ItemTags import net.minecraft.world.item.Items import net.minecraft.world.level.block.Blocks @@ -55,6 +58,17 @@ class NormalCraftingTableRecipeProvider( .unlockedBy("has_item", has(Items.IRON_PICKAXE)) .save(pWriter, modId("custom_tool_crafting_table_recipe")) + YusufShapedRecipeBuilder.shaped( + RecipeCategory.BUILDING_BLOCKS, BlockInit.INGOT_FUSION_TOLL_ENHANCER.get()) + .define('A', Blocks.IRON_BLOCK) + .define('B', Items.IRON_INGOT) + .define('C', ItemTags.create(BlockTags.BASE_STONE_OVERWORLD.location)) + .pattern("ABA") + .pattern("CBC") + .pattern("CBC") + .unlockedBy("has_item", has(Items.IRON_INGOT)) + .save(pWriter, modId("ingot_fusion_toll_enhancer_recipe")) + addOreBlockRecipes() } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/ToolCraftingTableRecipeProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/ToolCraftingTableRecipeProvider.kt index a5a170d8..be0a3ac2 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/ToolCraftingTableRecipeProvider.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/recipe/provider/ToolCraftingTableRecipeProvider.kt @@ -27,6 +27,7 @@ import java.util.function.Consumer import net.minecraft.data.recipes.FinishedRecipe import net.minecraft.data.recipes.RecipeCategory import net.minecraft.world.item.Items +import net.minecraft.world.item.enchantment.Enchantments class ToolCraftingTableRecipeProvider( private val mainModRecipeProvider: MainModRecipeProvider, @@ -93,6 +94,68 @@ class ToolCraftingTableRecipeProvider( .unlockedBy(hasItem, has(TagsInit.ItemTagsInit.INGOTS_RUBY)) .save(consumer, modId("ruby_hoe")) + // SAPPHIRE TOOLS + + CustomToolCraftingTableRecipeBuilder.shaped( + CustomToolsCraftingBookCategory.SWORD, + RecipeCategory.TOOLS, + ItemInit.SAPPHIRE_SWORD.get()) + .define('A', TagsInit.ItemTagsInit.INGOTS_SAPPHIRE) + .define('S', Items.STICK) + .pattern(" A ") + .pattern(" A ") + .pattern(" S ") + .unlockedBy(hasItem, has(TagsInit.ItemTagsInit.INGOTS_SAPPHIRE)) + .save(consumer, modId("sapphire_sword")) + + CustomToolCraftingTableRecipeBuilder.shaped( + CustomToolsCraftingBookCategory.PICKAXE, + RecipeCategory.TOOLS, + ItemInit.SAPPHIRE_PICKAXE.get()) + .define('A', TagsInit.ItemTagsInit.INGOTS_SAPPHIRE) + .define('S', Items.STICK) + .pattern("AAA") + .pattern(" S ") + .pattern(" S ") + .unlockedBy(hasItem, has(TagsInit.ItemTagsInit.INGOTS_SAPPHIRE)) + .save(consumer, modId("sapphire_pickaxe")) + + CustomToolCraftingTableRecipeBuilder.shaped( + CustomToolsCraftingBookCategory.AXE, + RecipeCategory.TOOLS, + ItemInit.SAPPHIRE_AXE.get()) + .define('A', TagsInit.ItemTagsInit.INGOTS_SAPPHIRE) + .define('S', Items.STICK) + .pattern(" AA") + .pattern(" SA") + .pattern(" S ") + .unlockedBy(hasItem, has(TagsInit.ItemTagsInit.INGOTS_SAPPHIRE)) + .save(consumer, modId("sapphire_axe")) + + CustomToolCraftingTableRecipeBuilder.shaped( + CustomToolsCraftingBookCategory.SHOVEL, + RecipeCategory.TOOLS, + ItemInit.SAPPHIRE_SHOVEL.get()) + .define('A', TagsInit.ItemTagsInit.INGOTS_SAPPHIRE) + .define('S', Items.STICK) + .pattern(" A ") + .pattern(" S ") + .pattern(" S ") + .unlockedBy(hasItem, has(TagsInit.ItemTagsInit.INGOTS_SAPPHIRE)) + .save(consumer, modId("sapphire_shovel")) + + CustomToolCraftingTableRecipeBuilder.shaped( + CustomToolsCraftingBookCategory.HOE, + RecipeCategory.TOOLS, + ItemInit.SAPPHIRE_HOE.get()) + .define('A', TagsInit.ItemTagsInit.INGOTS_SAPPHIRE) + .define('S', Items.STICK) + .pattern("AA ") + .pattern(" S ") + .pattern(" S ") + .unlockedBy(hasItem, has(TagsInit.ItemTagsInit.INGOTS_SAPPHIRE)) + .save(consumer, modId("sapphire_hoe")) + // ENDERITE TOOLS CustomToolCraftingTableRecipeBuilder.shaped( CustomToolsCraftingBookCategory.SWORD, @@ -202,6 +265,35 @@ class ToolCraftingTableRecipeProvider( .unlockedBy(hasItem, has(Items.AMETHYST_SHARD)) .save(consumer, modId("amethyst_shovel")) + // Imperium Tools + + // TODO: Add support for enchantments + CustomToolCraftingTableRecipeBuilder.shaped( + CustomToolsCraftingBookCategory.SWORD, + RecipeCategory.TOOLS, + ItemInit.IMPERIUM_SWORD.get()) + .define('A', TagsInit.ItemTagsInit.INGOTS_IMPERIUM) + .define('S', Items.STICK) + .pattern(" A ") + .pattern(" A ") + .pattern(" S ") + .addEnchantment(Enchantments.FIRE_ASPECT, 2) + .hideFlags(0) + .unlockedBy(hasItem, has(TagsInit.ItemTagsInit.INGOTS_IMPERIUM)) + .save(consumer, modId("imperium_sword")) + + CustomToolCraftingTableRecipeBuilder.shaped( + CustomToolsCraftingBookCategory.PICKAXE, + RecipeCategory.TOOLS, + ItemInit.IMPERIUM_PICKAXE.get()) + .define('A', TagsInit.ItemTagsInit.INGOTS_IMPERIUM) + .define('S', Items.STICK) + .pattern("AAA") + .pattern(" S ") + .pattern(" S ") + .unlockedBy(hasItem, has(TagsInit.ItemTagsInit.INGOTS_IMPERIUM)) + .save(consumer, modId("imperium_pickaxe")) + // TRIEDENTs // TODO : For the trident later make it a drop from a custom mob rather than crafting diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/tags/ModBlockTagsProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/tags/ModBlockTagsProvider.kt index 4d908cdd..3158da9c 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/tags/ModBlockTagsProvider.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/tags/ModBlockTagsProvider.kt @@ -49,6 +49,8 @@ class ModBlockTagsProvider( tag(TagsInit.BlockTagsInit.ORES_GRAPHITE).add(BlockInit.GRAPHITE_ORE.get()) tag(TagsInit.BlockTagsInit.ORES_AQUMARINE).add(BlockInit.AQUMARINE_ORE.get()) tag(TagsInit.BlockTagsInit.ORES_ENDERITE).add(BlockInit.ENDERITE_ORE.get()) + tag(TagsInit.BlockTagsInit.ORES_IMPERIUM).add(BlockInit.IMPERIUM_ORE.get()) + // deepslate ores tag(TagsInit.BlockTagsInit.DEEPSLATE_ORES_RUBY).add(BlockInit.DEEPSLATE_RUBY_ORE.get()) tag(TagsInit.BlockTagsInit.DEEPSLATE_ORES_RAINBOW) @@ -59,6 +61,9 @@ class ModBlockTagsProvider( .add(BlockInit.DEEPSLATE_GRAPHITE_ORE.get()) tag(TagsInit.BlockTagsInit.DEEPSLATE_ORES_AQUMARINE) .add(BlockInit.DEEPSLATE_AQUMARINE_ORE.get()) + tag(TagsInit.BlockTagsInit.DEEPSLATE_ORES_IMPERIUM) + .add(BlockInit.DEEPSLATE_IMPERIUM_ORE.get()) + // storage blocks tag(TagsInit.BlockTagsInit.STORAGE_RUBY).add(BlockInit.RUBY_BLOCK.get()) tag(TagsInit.BlockTagsInit.STORAGE_RAINBOW).add(BlockInit.RAINBOW_BLOCK.get()) diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/tags/ModItemTagsProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/tags/ModItemTagsProvider.kt index 465cb6d5..93efac25 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/tags/ModItemTagsProvider.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/tags/ModItemTagsProvider.kt @@ -49,6 +49,8 @@ class ModItemTagsProvider( copy(TagsInit.BlockTagsInit.ORES_GRAPHITE, TagsInit.ItemTagsInit.ORES_GRAPHITE) copy(TagsInit.BlockTagsInit.ORES_AQUMARINE, TagsInit.ItemTagsInit.ORES_AQUMARINE) copy(TagsInit.BlockTagsInit.ORES_ENDERITE, TagsInit.ItemTagsInit.ORES_ENDERITE) + copy(TagsInit.BlockTagsInit.ORES_IMPERIUM, TagsInit.ItemTagsInit.ORES_IMPERIUM) + // deepslate ores copy(TagsInit.BlockTagsInit.DEEPSLATE_ORES_RUBY, TagsInit.ItemTagsInit.DEEPSLATE_ORES_RUBY) copy( @@ -63,6 +65,10 @@ class ModItemTagsProvider( copy( TagsInit.BlockTagsInit.DEEPSLATE_ORES_AQUMARINE, TagsInit.ItemTagsInit.DEEPSLATE_ORES_AQUMARINE) + copy( + TagsInit.BlockTagsInit.DEEPSLATE_ORES_IMPERIUM, + TagsInit.ItemTagsInit.DEEPSLATE_ORES_IMPERIUM) + // storage blocks copy(TagsInit.BlockTagsInit.STORAGE_RUBY, TagsInit.ItemTagsInit.STORAGE_RUBY) copy(TagsInit.BlockTagsInit.STORAGE_RAINBOW, TagsInit.ItemTagsInit.STORAGE_RAINBOW) @@ -77,6 +83,7 @@ class ModItemTagsProvider( tag(TagsInit.ItemTagsInit.INGOTS_GRAPHITE).add(ItemInit.GRAPHITE.get()) tag(TagsInit.ItemTagsInit.INGOTS_AQUMARINE).add(ItemInit.AQUMARINE.get()) tag(TagsInit.ItemTagsInit.INGOTS_ENDERITE).add(ItemInit.ENDERITE.get()) + tag(TagsInit.ItemTagsInit.INGOTS_IMPERIUM).add(ItemInit.IMPERIUM.get()) // raw ores tag(TagsInit.ItemTagsInit.RAW_RUBY).add(ItemInit.RAW_RUBY.get()) tag(TagsInit.ItemTagsInit.RAW_RAINBOW).add(ItemInit.RAW_RAINBOW.get()) diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/texture/ModBlockStateProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/texture/ModBlockStateProvider.kt index 37456ec8..b4c7e1f0 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/texture/ModBlockStateProvider.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/texture/ModBlockStateProvider.kt @@ -42,11 +42,17 @@ class ModBlockStateProvider(output: PackOutput, exFileHelper: ExistingFileHelper normalBlock(BlockInit.GRAPHITE_ORE.get()) normalBlock(BlockInit.AQUMARINE_ORE.get()) normalBlock(BlockInit.ENDERITE_ORE.get()) + normalBlock(BlockInit.IMPERIUM_ORE.get()) + + // deepslate ores normalBlock(BlockInit.DEEPSLATE_RUBY_ORE.get()) normalBlock(BlockInit.DEEPSLATE_RAINBOW_ORE.get()) normalBlock(BlockInit.DEEPSLATE_SAPPHIRE_ORE.get()) normalBlock(BlockInit.DEEPSLATE_GRAPHITE_ORE.get()) normalBlock(BlockInit.DEEPSLATE_AQUMARINE_ORE.get()) + normalBlock(BlockInit.DEEPSLATE_IMPERIUM_ORE.get()) + + // blocks normalBlock(BlockInit.RUBY_BLOCK.get()) normalBlock(BlockInit.RAINBOW_BLOCK.get()) normalBlock(BlockInit.SAPPHIRE_BLOCK.get()) @@ -54,8 +60,11 @@ class ModBlockStateProvider(output: PackOutput, exFileHelper: ExistingFileHelper normalBlock(BlockInit.AQUMARINE_BLOCK.get()) normalBlock(BlockInit.ENDERITE_BLOCK.get()) + // other customCraftingTable(BlockInit.CUSTOM_ARMOUR_CRAFTING_TABLE.get()) customCraftingTable(BlockInit.CUSTOM_TOOL_CRAFTING_TABLE.get()) + orientableBlock(BlockInit.INGOT_FUSION_TOLL_ENHANCER.get()) + orientableBlockOn(BlockInit.INGOT_FUSION_TOLL_ENHANCER.get()) } private fun customCraftingTable(block: Block) { @@ -82,4 +91,23 @@ class ModBlockStateProvider(output: PackOutput, exFileHelper: ExistingFileHelper simpleBlock(block, models().cubeAll(name.path, modLoc("block/${name.path}"))) simpleBlockItem(block, models().cubeAll(name.path, modLoc("block/${name.path}"))) } + + private fun orientableBlock(block: Block) { + val name = ForgeRegistries.BLOCKS.getKey(block) ?: return + val builder = models().withExistingParent(name.path, "block/orientable") + builder.texture("top", modLoc("block/${name.path}_top")) + builder.texture("side", modLoc("block/${name.path}_side")) + builder.texture("front", modLoc("block/${name.path}_front")) + this.simpleBlock(block, builder) + this.simpleBlockItem(block, builder) + } + + private fun orientableBlockOn(block: Block) { + val nameWithOn = (ForgeRegistries.BLOCKS.getKey(block) ?: return).path + "_on" + val name = ForgeRegistries.BLOCKS.getKey(block) ?: return + val builder = models().withExistingParent(nameWithOn, "block/orientable") + builder.texture("top", modLoc("block/${name.path}_top")) + builder.texture("side", modLoc("block/${name.path}_side")) + builder.texture("front", modLoc("block/${name.path}_front")) + } } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/texture/ModItemStateProvider.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/texture/ModItemStateProvider.kt index 8268e8fa..39ad817b 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/texture/ModItemStateProvider.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/datagen/texture/ModItemStateProvider.kt @@ -43,6 +43,7 @@ class ModItemStateProvider(output: PackOutput, exFileHelper: ExistingFileHelper) item(ItemInit.AQUMARINE.get()) item(ItemInit.RAINBOW.get()) item(ItemInit.ENDERITE.get()) + item(ItemInit.IMPERIUM.get()) // raw ores item(ItemInit.RAW_RUBY.get()) @@ -51,6 +52,7 @@ class ModItemStateProvider(output: PackOutput, exFileHelper: ExistingFileHelper) item(ItemInit.RAW_AQUMARINE.get()) item(ItemInit.RAW_RAINBOW.get()) item(ItemInit.RAW_ENDERITE.get()) + item(ItemInit.RAW_IMPERIUM.get()) // armour item(ItemInit.AMETHYST_HELMET.get()) @@ -113,6 +115,10 @@ class ModItemStateProvider(output: PackOutput, exFileHelper: ExistingFileHelper) tool(ItemInit.SAPPHIRE_SHOVEL.get()) tool(ItemInit.SAPPHIRE_HOE.get()) + tool(ItemInit.IMPERIUM_SWORD.get()) + tool(ItemInit.IMPERIUM_PICKAXE.get()) + tool(ItemInit.MAGMA_STRIKE_PICKAXE.get()) + // Trident trident(ItemInit.AQUMARINE_TRIDENT.get()) diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/ArmourAndToolsModJEIPlugin.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/ArmourAndToolsModJEIPlugin.kt index 11d2126d..5c2540a3 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/ArmourAndToolsModJEIPlugin.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/ArmourAndToolsModJEIPlugin.kt @@ -23,8 +23,10 @@ import io.github.realyusufismail.armourandtoolsmod.core.init.BlockInit import io.github.realyusufismail.armourandtoolsmod.core.init.JEIRecipeTypes import io.github.realyusufismail.armourandtoolsmod.core.init.RecipeTypeInit import io.github.realyusufismail.armourandtoolsmod.integration.armour.CustomArmourCraftingTableJEIRecipeCategory +import io.github.realyusufismail.armourandtoolsmod.integration.fusion.IngotFusionTollEnhancerJEIRecipeCategory import io.github.realyusufismail.armourandtoolsmod.integration.tool.CustomToolCraftingTableJEIRecipeCategory import io.github.realyusufismail.armourandtoolsmod.recipe.armour.CustomArmourCraftingTableRecipe +import io.github.realyusufismail.armourandtoolsmod.recipe.infusion.IngotFusionTollEnhancerRecipe import io.github.realyusufismail.armourandtoolsmod.recipe.tool.CustomToolCraftingTableRecipe import mezz.jei.api.IModPlugin import mezz.jei.api.JeiPlugin @@ -42,15 +44,19 @@ class ArmourAndToolsModJEIPlugin : IModPlugin { override fun registerCategories(registration: IRecipeCategoryRegistration) { registration.addRecipeCategories( CustomToolCraftingTableJEIRecipeCategory(registration.jeiHelpers.guiHelper), - CustomArmourCraftingTableJEIRecipeCategory(registration.jeiHelpers.guiHelper)) + CustomArmourCraftingTableJEIRecipeCategory(registration.jeiHelpers.guiHelper), + IngotFusionTollEnhancerJEIRecipeCategory(registration.jeiHelpers.guiHelper)) } override fun registerRecipes(registration: IRecipeRegistration) { val recipeManager = Minecraft.getInstance().level!!.recipeManager val recipesTool = recipeManager.getAllRecipesFor(RecipeTypeInit.TOOL_CRAFTING.get()) val recipesArmour = recipeManager.getAllRecipesFor(RecipeTypeInit.ARMOUR_CRAFTING.get()) + val recipesIngotFusionTollEnhancer = + recipeManager.getAllRecipesFor(RecipeTypeInit.INGOT_FUSION_TOLL_ENHANCER.get()) registration.addRecipes(toolCraftingTableRecipeType, recipesTool) registration.addRecipes(armourCraftingTableRecipeType, recipesArmour) + registration.addRecipes(ingotFusionTollEnhancerRecipeType, recipesIngotFusionTollEnhancer) } override fun registerRecipeCatalysts(registration: IRecipeCatalystRegistration) { @@ -58,6 +64,9 @@ class ArmourAndToolsModJEIPlugin : IModPlugin { ItemStack(BlockInit.CUSTOM_TOOL_CRAFTING_TABLE.get()), JEIRecipeTypes.toolCrafting) registration.addRecipeCatalyst( ItemStack(BlockInit.CUSTOM_ARMOUR_CRAFTING_TABLE.get()), JEIRecipeTypes.armourCrafting) + registration.addRecipeCatalyst( + ItemStack(BlockInit.INGOT_FUSION_TOLL_ENHANCER.get()), + JEIRecipeTypes.ingotFusionTollEnhancer) } override fun getPluginUid(): ResourceLocation { @@ -73,5 +82,9 @@ class ArmourAndToolsModJEIPlugin : IModPlugin { RecipeType( CustomToolCraftingTableJEIRecipeCategory.UID, CustomToolCraftingTableRecipe::class.java) + val ingotFusionTollEnhancerRecipeType: RecipeType = + RecipeType( + IngotFusionTollEnhancerJEIRecipeCategory.UID, + IngotFusionTollEnhancerRecipe::class.java) } } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/armour/CustomArmourCraftingTableJEIRecipeCategory.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/armour/CustomArmourCraftingTableJEIRecipeCategory.kt index 8e276ca5..315c7a67 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/armour/CustomArmourCraftingTableJEIRecipeCategory.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/armour/CustomArmourCraftingTableJEIRecipeCategory.kt @@ -53,25 +53,33 @@ class CustomArmourCraftingTableJEIRecipeCategory(guiHelper: IGuiHelper) : return this.ic } - /** - * Y is up and down X is left and right - * - * Increase Y to down and decrease Y to up Increase X to right and decrease X to left - */ override fun setRecipe( builder: IRecipeLayoutBuilder, recipe: CustomArmourCraftingTableRecipe, focuses: IFocusGroup ) { - builder.addSlot(RecipeIngredientRole.INPUT, 30, 16).addIngredients(recipe.ingredients[0]) - builder.addSlot(RecipeIngredientRole.INPUT, 45, 16).addIngredients(recipe.ingredients[1]) - builder.addSlot(RecipeIngredientRole.INPUT, 65, 16).addIngredients(recipe.ingredients[2]) - builder.addSlot(RecipeIngredientRole.INPUT, 30, 34).addIngredients(recipe.ingredients[3]) - builder.addSlot(RecipeIngredientRole.INPUT, 48, 34).addIngredients(recipe.ingredients[4]) - builder.addSlot(RecipeIngredientRole.INPUT, 66, 34).addIngredients(recipe.ingredients[5]) - builder.addSlot(RecipeIngredientRole.INPUT, 30, 52).addIngredients(recipe.ingredients[6]) - builder.addSlot(RecipeIngredientRole.INPUT, 48, 52).addIngredients(recipe.ingredients[7]) - builder.addSlot(RecipeIngredientRole.INPUT, 66, 52).addIngredients(recipe.ingredients[8]) + val ingredients = recipe.ingredients + + // Define variables for each slot and add ingredients if they are not empty + val slots = + arrayOf( + Pair(30, 16), + Pair(48, 16), + Pair(66, 16), + Pair(30, 34), + Pair(48, 34), + Pair(66, 34), + Pair(30, 52), + Pair(48, 52), + Pair(66, 52)) + + for (i in 0 until minOf(ingredients.size, slots.size)) { + val (x, y) = slots[i] + if (!ingredients[i].isEmpty) { + val slot = builder.addSlot(RecipeIngredientRole.INPUT, x, y) + slot.addIngredients(ingredients[i]) + } + } builder.addSlot(RecipeIngredientRole.OUTPUT, 124, 34).addItemStack(recipe.result) } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/fusion/IngotFusionTollEnhancerJEIRecipeCategory.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/fusion/IngotFusionTollEnhancerJEIRecipeCategory.kt new file mode 100644 index 00000000..110bd6d6 --- /dev/null +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/fusion/IngotFusionTollEnhancerJEIRecipeCategory.kt @@ -0,0 +1,125 @@ +/* + * Copyright 2023 RealYusufIsmail. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.realyusufismail.armourandtoolsmod.integration.fusion + +import io.github.realyusufismail.armourandtoolsmod.ArmourAndToolsMod +import io.github.realyusufismail.armourandtoolsmod.blocks.IngotFusionTollEnhancer +import io.github.realyusufismail.armourandtoolsmod.blocks.infusion.IngotFusionTollEnhancerBlockEntity +import io.github.realyusufismail.armourandtoolsmod.core.init.BlockInit +import io.github.realyusufismail.armourandtoolsmod.integration.ArmourAndToolsModJEIPlugin +import io.github.realyusufismail.armourandtoolsmod.recipe.infusion.IngotFusionTollEnhancerRecipe +import mezz.jei.api.constants.VanillaTypes +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder +import mezz.jei.api.gui.drawable.IDrawable +import mezz.jei.api.helpers.IGuiHelper +import mezz.jei.api.recipe.IFocusGroup +import mezz.jei.api.recipe.RecipeIngredientRole +import mezz.jei.api.recipe.RecipeType +import mezz.jei.api.recipe.category.IRecipeCategory +import net.minecraft.network.chat.Component +import net.minecraft.world.item.ItemStack + +class IngotFusionTollEnhancerJEIRecipeCategory(guiHelper: IGuiHelper) : + IRecipeCategory { + private val fusionJEIGuiLocation = + ArmourAndToolsMod.getModIdAndName( + "textures/gui/container/ingot_fusion_toll_enhancer_jei.png") + private val bg: IDrawable + private val ic: IDrawable + private val w = 175 + private val h = 87 + + init { + // X cordinate is the distance from the left side of the screen to the right side of the gui + // width + // Y cordinate is the distance from the top of the screen to the top of the gui height + bg = guiHelper.createDrawable(fusionJEIGuiLocation, 0, 0, w, h) + ic = + guiHelper.createDrawableIngredient( + VanillaTypes.ITEM_STACK, ItemStack(BlockInit.INGOT_FUSION_TOLL_ENHANCER.get())) + } + + /** + * @return the type of recipe that this category handles. + * @since 9.5.0 + */ + override fun getRecipeType(): RecipeType { + return ArmourAndToolsModJEIPlugin.ingotFusionTollEnhancerRecipeType + } + + /** + * Returns a text component representing the name of this recipe type. Drawn at the top of the + * recipe GUI pages for this category. + * + * @since 7.6.4 + */ + override fun getTitle(): Component { + return IngotFusionTollEnhancer.getContainerTitle() + } + + /** Returns the drawable background for a single recipe in this category. */ + override fun getBackground(): IDrawable { + return bg + } + + /** + * Icon for the category tab. You can use [IGuiHelper.createDrawableIngredient] to create a + * drawable from an ingredient. + * + * @return icon to draw on the category tab, max size is 16x16 pixels. + */ + override fun getIcon(): IDrawable { + return ic + } + + override fun getWidth(): Int { + return w + } + + override fun getHeight(): Int { + return h + } + + /** + * Sets all the recipe's ingredients by filling out an instance of [IRecipeLayoutBuilder]. This + * is used by JEI for lookups, to figure out what ingredients are inputs and outputs for a + * recipe. + * + * @since 9.4.0 + */ + override fun setRecipe( + builder: IRecipeLayoutBuilder, + recipe: IngotFusionTollEnhancerRecipe, + focuses: IFocusGroup + ) { + builder.addSlot(RecipeIngredientRole.INPUT, 16, 40).addIngredients(recipe.ingredient1) + builder.addSlot(RecipeIngredientRole.INPUT, 43, 40).addIngredients(recipe.ingredient2) + builder.addSlot(RecipeIngredientRole.INPUT, 70, 40).addIngredients(recipe.ingredient3) + + builder + .addSlot(RecipeIngredientRole.INPUT, 102, 65) + .addItemStacks(IngotFusionTollEnhancerBlockEntity.getFuelAsItemStacks().toList()) + + builder.addSlot(RecipeIngredientRole.OUTPUT, 138, 40).addItemStack(recipe.result) + } + + companion object { + val UID = ArmourAndToolsMod.getModIdAndName("ingot_fusion_toll_enhancer_jei") + } +} diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/tool/CustomToolCraftingTableJEIRecipeCategory.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/tool/CustomToolCraftingTableJEIRecipeCategory.kt index 7dd53f16..e1b6aca2 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/tool/CustomToolCraftingTableJEIRecipeCategory.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/integration/tool/CustomToolCraftingTableJEIRecipeCategory.kt @@ -26,19 +26,12 @@ import io.github.realyusufismail.armourandtoolsmod.integration.generic.GenericCr import io.github.realyusufismail.armourandtoolsmod.recipe.tool.CustomToolCraftingTableRecipe import mezz.jei.api.gui.builder.IRecipeLayoutBuilder import mezz.jei.api.gui.drawable.IDrawable -import mezz.jei.api.gui.ingredient.ICraftingGridHelper import mezz.jei.api.helpers.IGuiHelper import mezz.jei.api.recipe.IFocusGroup import mezz.jei.api.recipe.RecipeIngredientRole import mezz.jei.api.recipe.RecipeType -import mezz.jei.api.recipe.category.extensions.vanilla.crafting.ICraftingCategoryExtension import net.minecraft.network.chat.Component -/** - * @see ICraftingCategoryExtension - * @see CraftingGridHelper - * @see ICraftingGridHelper - */ class CustomToolCraftingTableJEIRecipeCategory(private val guiHelper: IGuiHelper) : GenericCraftingTableJEIRecipeCategory( guiHelper, BlockInit.CUSTOM_TOOL_CRAFTING_TABLE.get()) { @@ -69,15 +62,28 @@ class CustomToolCraftingTableJEIRecipeCategory(private val guiHelper: IGuiHelper recipe: CustomToolCraftingTableRecipe, focuses: IFocusGroup ) { - builder.addSlot(RecipeIngredientRole.INPUT, 30, 16).addIngredients(recipe.ingredients[0]) - builder.addSlot(RecipeIngredientRole.INPUT, 45, 16).addIngredients(recipe.ingredients[1]) - builder.addSlot(RecipeIngredientRole.INPUT, 65, 16).addIngredients(recipe.ingredients[2]) - builder.addSlot(RecipeIngredientRole.INPUT, 30, 34).addIngredients(recipe.ingredients[3]) - builder.addSlot(RecipeIngredientRole.INPUT, 48, 34).addIngredients(recipe.ingredients[4]) - builder.addSlot(RecipeIngredientRole.INPUT, 66, 34).addIngredients(recipe.ingredients[5]) - builder.addSlot(RecipeIngredientRole.INPUT, 30, 52).addIngredients(recipe.ingredients[6]) - builder.addSlot(RecipeIngredientRole.INPUT, 48, 52).addIngredients(recipe.ingredients[7]) - builder.addSlot(RecipeIngredientRole.INPUT, 66, 52).addIngredients(recipe.ingredients[8]) + val ingredients = recipe.ingredients + + // Define variables for each slot and add ingredients if they are not empty + val slots = + arrayOf( + Pair(30, 16), + Pair(48, 16), + Pair(66, 16), + Pair(30, 34), + Pair(48, 34), + Pair(66, 34), + Pair(30, 52), + Pair(48, 52), + Pair(66, 52)) + + for (i in 0 until minOf(ingredients.size, slots.size)) { + val (x, y) = slots[i] + if (!ingredients[i].isEmpty) { + val slot = builder.addSlot(RecipeIngredientRole.INPUT, x, y) + slot.addIngredients(ingredients[i]) + } + } builder.addSlot(RecipeIngredientRole.OUTPUT, 124, 34).addItemStack(recipe.result) } diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/recipe/armour/CustomArmourCraftingTableShapedRecipe.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/recipe/armour/CustomArmourCraftingTableShapedRecipe.kt index 3e04cd8e..8316b7d4 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/recipe/armour/CustomArmourCraftingTableShapedRecipe.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/recipe/armour/CustomArmourCraftingTableShapedRecipe.kt @@ -42,7 +42,6 @@ import net.minecraftforge.common.ForgeHooks import net.minecraftforge.common.crafting.CraftingHelper import net.minecraftforge.common.crafting.IShapedRecipe -/** @see io.github.realyusufismail.realyusufismailcore.recipe.YusufShapedRecipeBuilder */ class CustomArmourCraftingTableShapedRecipe( private val id: ResourceLocation, private val group: String, diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/recipe/tool/CustomToolCraftingTableShapedRecipe.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/recipe/tool/CustomToolCraftingTableShapedRecipe.kt index adafe288..9ffa8cb7 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/recipe/tool/CustomToolCraftingTableShapedRecipe.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/recipe/tool/CustomToolCraftingTableShapedRecipe.kt @@ -42,7 +42,6 @@ import net.minecraftforge.common.ForgeHooks import net.minecraftforge.common.crafting.CraftingHelper import net.minecraftforge.common.crafting.IShapedRecipe -/** @see io.github.realyusufismail.realyusufismailcore.recipe.YusufShapedRecipeBuilder */ class CustomToolCraftingTableShapedRecipe( private val id: ResourceLocation, private val group: String, diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/worldgen/ModConfiguredFeatures.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/worldgen/ModConfiguredFeatures.kt index cf9a3934..bdf4be1a 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/worldgen/ModConfiguredFeatures.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/worldgen/ModConfiguredFeatures.kt @@ -36,11 +36,15 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.TagMatchTest object ModConfiguredFeatures { + // overworld val OVERWORLD_RUBY_ORE = registerKey("ruby_ore") val OVERWORLD_SAPPHIRE_ORE = registerKey("sapphire_ore") val OVERWORLD_GRAPHITE_ORE = registerKey("graphite_ore") val OVERWORLD_AQUMARINE_ORE = registerKey("aqumarine_ore") val OVERWORLD_RAINBOW_ORE = registerKey("rainbow_ore") + val OVERWORLD_IMPERIUM_ORE = registerKey("imperium_ore") + + // end val END_ENDERITE_ORE = registerKey("enderite_ore") fun bootstrap(context: BootstapContext>) { @@ -93,12 +97,18 @@ object ModConfiguredFeatures { OreConfiguration.target( endstoneReplaceables, BlockInit.ENDERITE_ORE.get().defaultBlockState())) + val imperium = + listOf( + OreConfiguration.target( + netherrackReplaceables, BlockInit.IMPERIUM_ORE.get().defaultBlockState())) + register(context, OVERWORLD_RUBY_ORE, Feature.ORE, OreConfiguration(ruby, 4)) register(context, OVERWORLD_SAPPHIRE_ORE, Feature.ORE, OreConfiguration(sapphire, 3)) register(context, OVERWORLD_GRAPHITE_ORE, Feature.ORE, OreConfiguration(graphite, 4)) register(context, OVERWORLD_AQUMARINE_ORE, Feature.ORE, OreConfiguration(aqumarine, 4)) register(context, OVERWORLD_RAINBOW_ORE, Feature.ORE, OreConfiguration(rainbow, 3)) register(context, END_ENDERITE_ORE, Feature.ORE, OreConfiguration(enderite, 4)) + register(context, OVERWORLD_IMPERIUM_ORE, Feature.ORE, OreConfiguration(imperium, 4)) } private fun registerKey(name: String): ResourceKey> { diff --git a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/worldgen/ModPlacedFeatures.kt b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/worldgen/ModPlacedFeatures.kt index 1c16cb69..6f29e58d 100644 --- a/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/worldgen/ModPlacedFeatures.kt +++ b/src/main/kotlin/io/github/realyusufismail/armourandtoolsmod/worldgen/ModPlacedFeatures.kt @@ -38,6 +38,7 @@ object ModPlacedFeatures { val AQUMARINE_ORE: ResourceKey = createKey("aqumarine_ore") val RAINBOW_ORE: ResourceKey = createKey("rainbow_ore") val ENDERITE_ORE: ResourceKey = createKey("enderite_ore") + val IMPERIUM_ORE: ResourceKey = createKey("imperium_ore") fun bootstrap(context: BootstapContext) { val configuredFeatures = context.lookup(Registries.CONFIGURED_FEATURE) @@ -54,6 +55,8 @@ object ModPlacedFeatures { configuredFeatures.getOrThrow(ModConfiguredFeatures.OVERWORLD_RAINBOW_ORE) val holder6: Holder> = configuredFeatures.getOrThrow(ModConfiguredFeatures.END_ENDERITE_ORE) + val holder7: Holder> = + configuredFeatures.getOrThrow(ModConfiguredFeatures.OVERWORLD_IMPERIUM_ORE) register( context, @@ -108,6 +111,15 @@ object ModPlacedFeatures { 4, HeightRangePlacement.uniform( VerticalAnchor.absolute(-64), VerticalAnchor.absolute(40)))) + + register( + context, + IMPERIUM_ORE, + holder7, + ModOrePlacement.commonOrePlacement( + 4, + HeightRangePlacement.uniform( + VerticalAnchor.absolute(-64), VerticalAnchor.absolute(50)))) } private fun createKey(name: String): ResourceKey { diff --git a/src/main/resources/assets/armourandtoolsmod/textures/block/deepslate_imperium_ore.png b/src/main/resources/assets/armourandtoolsmod/textures/block/deepslate_imperium_ore.png new file mode 100644 index 00000000..783987d2 Binary files /dev/null and b/src/main/resources/assets/armourandtoolsmod/textures/block/deepslate_imperium_ore.png differ diff --git a/src/main/resources/assets/armourandtoolsmod/textures/block/imperium_ore.png b/src/main/resources/assets/armourandtoolsmod/textures/block/imperium_ore.png new file mode 100644 index 00000000..aa4f8cdd Binary files /dev/null and b/src/main/resources/assets/armourandtoolsmod/textures/block/imperium_ore.png differ diff --git a/src/main/resources/assets/armourandtoolsmod/textures/block/ingot_fusion_toll_enhancer_front.png b/src/main/resources/assets/armourandtoolsmod/textures/block/ingot_fusion_toll_enhancer_front.png new file mode 100644 index 00000000..6f32bcb4 Binary files /dev/null and b/src/main/resources/assets/armourandtoolsmod/textures/block/ingot_fusion_toll_enhancer_front.png differ diff --git a/src/main/resources/assets/armourandtoolsmod/textures/block/ingot_fusion_toll_enhancer_side.png b/src/main/resources/assets/armourandtoolsmod/textures/block/ingot_fusion_toll_enhancer_side.png new file mode 100644 index 00000000..9a157c2b Binary files /dev/null and b/src/main/resources/assets/armourandtoolsmod/textures/block/ingot_fusion_toll_enhancer_side.png differ diff --git a/src/main/resources/assets/armourandtoolsmod/textures/block/ingot_fusion_toll_enhancer_top.png b/src/main/resources/assets/armourandtoolsmod/textures/block/ingot_fusion_toll_enhancer_top.png new file mode 100644 index 00000000..25373017 Binary files /dev/null and b/src/main/resources/assets/armourandtoolsmod/textures/block/ingot_fusion_toll_enhancer_top.png differ diff --git a/src/main/resources/assets/armourandtoolsmod/textures/gui/container/ingot_fusion_toll_enhancer.png b/src/main/resources/assets/armourandtoolsmod/textures/gui/container/ingot_fusion_toll_enhancer.png new file mode 100644 index 00000000..9edaa13c Binary files /dev/null and b/src/main/resources/assets/armourandtoolsmod/textures/gui/container/ingot_fusion_toll_enhancer.png differ diff --git a/src/main/resources/assets/armourandtoolsmod/textures/gui/container/ingot_fusion_toll_enhancer_jei.png b/src/main/resources/assets/armourandtoolsmod/textures/gui/container/ingot_fusion_toll_enhancer_jei.png new file mode 100644 index 00000000..19d6d0fe Binary files /dev/null and b/src/main/resources/assets/armourandtoolsmod/textures/gui/container/ingot_fusion_toll_enhancer_jei.png differ diff --git a/src/main/resources/assets/armourandtoolsmod/textures/item/imperium_axe.png b/src/main/resources/assets/armourandtoolsmod/textures/item/imperium_axe.png new file mode 100644 index 00000000..bcc51249 Binary files /dev/null and b/src/main/resources/assets/armourandtoolsmod/textures/item/imperium_axe.png differ diff --git a/src/main/resources/assets/armourandtoolsmod/textures/item/imperium_pickaxe_upgraded.png b/src/main/resources/assets/armourandtoolsmod/textures/item/magma_strike_pickaxe.png similarity index 100% rename from src/main/resources/assets/armourandtoolsmod/textures/item/imperium_pickaxe_upgraded.png rename to src/main/resources/assets/armourandtoolsmod/textures/item/magma_strike_pickaxe.png diff --git a/src/main/resources/assets/armourandtoolsmod/textures/item/raw_imperium.png b/src/main/resources/assets/armourandtoolsmod/textures/item/raw_imperium.png new file mode 100644 index 00000000..987ab060 Binary files /dev/null and b/src/main/resources/assets/armourandtoolsmod/textures/item/raw_imperium.png differ