diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
index 1fc0a0a..cb23e04 100644
--- a/.github/workflows/ci-build.yml
+++ b/.github/workflows/ci-build.yml
@@ -29,9 +29,9 @@ jobs:
with:
fetch-depth: 0
- name: Set up JDK 17
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v4
with:
- java-version: '17'
+ java-version-file: .java-version
distribution: 'temurin'
- id: get_last_version
name: Get last version
@@ -51,12 +51,15 @@ jobs:
name: Reset bump level
run: |
echo "patch" > .release-info/${{ github.ref_name }}/BUMP_LEVEL
- - name: Build with Gradle
- uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
- with:
- arguments: build test --console=verbose
+ - name: Wrapper validation
+ uses: gradle/actions/wrapper-validation@v4
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v4
+ - name: Build and test
env:
MOD_VERSION: "${{ steps.bump_version.outputs.new_version }}"
+ run: |
+ ./gradlew build test --console=verbose
- name: Commit version file
run: |
git config --global user.email "ci@sweetrpg.com"
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 56c1fa8..1348c27 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -13,10 +13,10 @@ name: "CodeQL"
on:
push:
- branches: [ 1.18, 1.19, 1.20 ]
+ branches: [ 1.16, 1.18, 1.19, 1.20, 1.21 ]
pull_request:
# The branches below must be a subset of the branches above
- branches: [ 1.18, 1.19, 1.20 ]
+ branches: [ 1.16, 1.18, 1.19, 1.20, 1.21 ]
schedule:
- cron: '17 11 * * 3'
diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml
index a887fb1..4e39711 100644
--- a/.github/workflows/debug.yml
+++ b/.github/workflows/debug.yml
@@ -1,9 +1,6 @@
name: Debug
on:
- create:
- tags:
- - '*'
release:
types:
- published
@@ -11,6 +8,8 @@ on:
push:
branches:
- '*'
+ tags:
+ - '*'
jobs:
debug:
diff --git a/.github/workflows/pr-build-release.yml b/.github/workflows/pr-build-release.yml
index ad72b8d..930373c 100644
--- a/.github/workflows/pr-build-release.yml
+++ b/.github/workflows/pr-build-release.yml
@@ -9,7 +9,7 @@ name: PR (Release)
on:
pull_request:
- branches: [ "1.18-release", "1.19-release", "1.20-release" ]
+ branches: [ "1.16-release", "1.18-release", "1.19-release", "1.20-release", "1.21-release" ]
paths:
- 'src/**'
- 'test/**'
@@ -27,11 +27,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v4
with:
- java-version: '17'
+ java-version-file: .java-version
distribution: 'temurin'
- - name: Build with Gradle
- uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
- with:
- arguments: build test --console=verbose
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v4
+ - name: Build and test
+ run: |
+ ./gradlew build test --console=verbose
diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml
index 0278364..406f7f5 100644
--- a/.github/workflows/pr-build.yml
+++ b/.github/workflows/pr-build.yml
@@ -5,7 +5,7 @@ name: PR
on:
pull_request:
- branches: [ "1.18", "1.19", "1.20" ]
+ branches: [ "1.16", "1.18", "1.19", "1.20", "1.21" ]
paths:
- 'src/**'
- 'test/**'
@@ -22,12 +22,13 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- - name: Set up JDK 17
- uses: actions/setup-java@v2
+ - name: Set up JDK
+ uses: actions/setup-java@v4
with:
- java-version: '17'
+ java-version-file: .java-version
distribution: 'temurin'
- - name: Build with Gradle
- uses: gradle/gradle-build-action@v3.5.0
- with:
- arguments: build test --console=verbose
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v4
+ - name: Build and test
+ run: |
+ gradle build test --console=verbose
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5f56544..e1bab7e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,7 +9,7 @@ name: Release
on:
push:
- branches: [ "1.18-release", "1.19-release", "1.20-release" ]
+ branches: [ "1.16-releae", "1.18-release", "1.19-release", "1.20-release", "1.21-release" ]
paths:
- 'src/**'
- 'test/**'
@@ -33,35 +33,36 @@ jobs:
with:
java-version-file: '.java-version'
distribution: 'temurin'
- - name: Build with Gradle
- uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v4
+ - name: Build and test
env:
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
MODRINTH_API_KEY: ${{ secrets.MODRINTH_API_KEY }}
- with:
- arguments: curseforge modrinth --console=verbose
+ run: |
+ ./gradlew curseforge modrinth --console=verbose
- name: Commit hash file and reset changelog
run: |
git config --global user.email "ci@sweetrpg.com"
git config --global user.name "SweetRPG CI"
-
+
branch_version=$(echo ${{ github.ref_name }} | cut -f1 -d-)
-
+
echo "${{ github.sha }}" > .release-info/${branch_version}/RELEASE_HASH
git add .release-info/${branch_version}/RELEASE_HASH
git commit -m "Update ${branch_version} RELEASE_HASH"
version=$(cat .release-info/${branch_version}/VERSION)
git tag "release-${version}"
-
+
echo "# $version" > CHANGELOG/${branch_version}/${version}.md
echo "" >> CHANGELOG/${branch_version}/${version}.md
cat CHANGELOG/${branch_version}/current.md >> CHANGELOG/${branch_version}/${version}.md
cat /dev/null > CHANGELOG/${branch_version}/current.md
git add CHANGELOG/${branch_version}
git commit -m "Reset ${branch_version} changelog"
-
+
git push origin --tags
-
+
git checkout ${branch_version}
git merge ${{ github.ref_name }}
git push origin
diff --git a/.gitignore b/.gitignore
index dce3d3e..3650f34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@ logs
forge*changelog.txt
/src/generated/resources/.cache/
.DS_Store
+*.java-ish
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 26d3352..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index f9163b4..f2c1963 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,9 +1,11 @@
+
diff --git a/.idea/runConfigurations/client.xml b/.idea/runConfigurations/client.xml
index 797bc88..e8a1cb8 100644
--- a/.idea/runConfigurations/client.xml
+++ b/.idea/runConfigurations/client.xml
@@ -2,10 +2,10 @@
-
+
-
+
diff --git a/.idea/runConfigurations/data.xml b/.idea/runConfigurations/data.xml
index 45a4357..2372e4f 100644
--- a/.idea/runConfigurations/data.xml
+++ b/.idea/runConfigurations/data.xml
@@ -2,10 +2,10 @@
-
-
+
+
-
+
diff --git a/.idea/runConfigurations/server.xml b/.idea/runConfigurations/server.xml
index a42b9b3..8a3dfe2 100644
--- a/.idea/runConfigurations/server.xml
+++ b/.idea/runConfigurations/server.xml
@@ -2,10 +2,10 @@
-
+
-
+
diff --git a/.release-info/1.18/RELEASE_HASH b/.release-info/1.18/RELEASE_HASH
index b5354c8..79f8141 100644
--- a/.release-info/1.18/RELEASE_HASH
+++ b/.release-info/1.18/RELEASE_HASH
@@ -1 +1 @@
-d85cfe1a6d309176610966102401196bc5916857
+c0a4cac1f859120b4ec8acd52036adc79ada09ef
diff --git a/.release-info/1.18/VERSION b/.release-info/1.18/VERSION
index 3a4036f..b003284 100644
--- a/.release-info/1.18/VERSION
+++ b/.release-info/1.18/VERSION
@@ -1 +1 @@
-0.2.5
+0.2.7
diff --git a/CHANGELOG/1.18/0.2.5.md b/CHANGELOG/1.18/0.2.5.md
new file mode 100644
index 0000000..33e0c8c
--- /dev/null
+++ b/CHANGELOG/1.18/0.2.5.md
@@ -0,0 +1,4 @@
+# 0.2.5
+
+- `[CHG]` Remove shift key from key binding default
+- `[FIX]` Fixed the translated text on one of the advancements
diff --git a/CHANGELOG/1.18/current.md b/CHANGELOG/1.18/current.md
index 920d2e3..58aada2 100644
--- a/CHANGELOG/1.18/current.md
+++ b/CHANGELOG/1.18/current.md
@@ -1,2 +1,5 @@
-- `[CHG]` Remove shift key from key binding default
-- `[FIX]` Fixed the translated text on one of the advancements
+- `[NEW]` Recipe calculation depth is now configurable
+- `[NEW]` Costs and multipliers are now configurable
+- `[FIX]` Cost values fixed for some tags
+- `[FIX]` Some tag values fixed
+- `[DEV]` Removed some unneeded code
diff --git a/README.md b/README.md
index a4c812a..97d5811 100644
--- a/README.md
+++ b/README.md
@@ -17,12 +17,15 @@
* Add items to a queue to keep track of what you need
* Setup a shopping list so you know what to gather
-* Share the shopping list with other players so they can help
## Required Mods
-* [JEI](https://www.curseforge.com/minecraft/mc-mods/jei) — version 9.7.2.281 or higher
+* [JEI](https://www.curseforge.com/minecraft/mc-mods/jei)
## Where To Get It
Download it from [CurseForge](https://www.curseforge.com/minecraft/mc-mods/craft-tracker) or [Modrinth](https://modrinth.com/mod/craft-tracker).
+
+## Translations
+
+If you would like to help translate Craft Tracker into your language, please open [an issue](https://github.com/actions/setup-java/issues).
diff --git a/build.gradle b/build.gradle
index 9edfa2f..a77fe67 100644
--- a/build.gradle
+++ b/build.gradle
@@ -201,11 +201,6 @@ curseforge {
changelogType = 'markdown'
releaseType = findProperty("curseforge_release_type") ?: 'beta'
addGameVersion project.target_mc_version
-// for (String v : project.additional_mc_versions.split(',')) {
-// if (v) {
-// addGameVersion v
-// }
-// }
relations {
optionalDependency 'configured'
requiredDependency 'jei'
diff --git a/scripts/generate-tag-cost-code.sh b/scripts/generate-tag-cost-code.sh
new file mode 100755
index 0000000..8d7f96e
--- /dev/null
+++ b/scripts/generate-tag-cost-code.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+cat tags.txt | awk -F= '{ print "entry(\"" $1 "\", " $2 ")," }' > tags.java-ish
diff --git a/scripts/tags.txt b/scripts/tags.txt
new file mode 100644
index 0000000..5847bee
--- /dev/null
+++ b/scripts/tags.txt
@@ -0,0 +1,1069 @@
+c:animal_foods=10
+c:armors=10
+c:barrels/wooden=10
+c:barrels=10
+c:bookshelves=10
+c:bricks/nether=10
+c:bricks/normal=10
+c:bricks=10
+c:buckets/empty=10
+c:buckets/entity_water=10
+c:buckets/lava=10
+c:buckets/milk=10
+c:buckets/powder_snow=10
+c:buckets/water=10
+c:buckets=10
+c:budding_blocks=10
+c:buds=10
+c:chains=10
+c:chests/wooden=10
+c:chests=10
+c:clusters=10
+c:cobblestones=10
+c:concrete_powders=10
+c:concretes=10
+c:crops/beetroot=10
+c:crops/cactus=10
+c:crops/carrot=10
+c:crops/cocoa_bean=10
+c:crops/melon=10
+c:crops/nether_wart=10
+c:crops/potato=10
+c:crops/pumpkin=10
+c:crops/sugar_cane=10
+c:crops/wheat=10
+c:crops=10
+c:dusts/glowstone=10
+c:dusts/redstone=10
+c:dusts=10
+c:dyed/black=10
+c:dyed/blue=10
+c:dyed/brown=10
+c:dyed/cyan=10
+c:dyed/gray=10
+c:dyed/green=10
+c:dyed/light_blue=10
+c:dyed/light_gray=10
+c:dyed/lime=10
+c:dyed/magenta=10
+c:dyed/orange=10
+c:dyed/pink=10
+c:dyed/purple=10
+c:dyed/red=10
+c:dyed/white=10
+c:dyed/yellow=10
+c:dyed=10
+c:dyes/black=10
+c:dyes/blue=10
+c:dyes/brown=10
+c:dyes/cyan=10
+c:dyes/gray=10
+c:dyes/green=10
+c:dyes/light_blue=10
+c:dyes/light_gray=10
+c:dyes/lime=10
+c:dyes/magenta=10
+c:dyes/orange=10
+c:dyes/pink=10
+c:dyes/purple=10
+c:dyes/red=10
+c:dyes/white=10
+c:dyes/yellow=10
+c:dyes=10
+c:enchantables=10
+c:ender_pearls=10
+c:fertilizers=10
+c:foods/berry=10
+c:foods/bread=10
+c:foods/candy=10
+c:foods/cooked_fish=10
+c:foods/cooked_meat=10
+c:foods/cookie=10
+c:foods/edible_when_placed=10
+c:foods/food_poisoning=10
+c:foods/fruit=10
+c:foods/golden=10
+c:foods/raw_fish=10
+c:foods/raw_meat=10
+c:foods/soup=10
+c:foods/vegetable=10
+c:foods=10
+c:gems/amethyst=10
+c:gems/diamond=10
+c:gems/emerald=10
+c:gems/lapis=10
+c:gems/prismarine=10
+c:gems/quartz=10
+c:gems=10
+c:glass_blocks/cheap=10
+c:glass_blocks/colorless=10
+c:glass_blocks/tinted=10
+c:glass_blocks=10
+c:glass_panes/colorless=10
+c:glass_panes=10
+c:glazed_terracottas=10
+c:hidden_from_recipe_viewers=10
+c:ingots/copper=10
+c:ingots/gold=10
+c:ingots/iron=10
+c:ingots/netherite=10
+c:ingots=10
+c:leathers=10
+c:music_discs=10
+c:nuggets/gold=10
+c:nuggets/iron=10
+c:nuggets=10
+c:obsidians/crying=10
+c:obsidians/normal=10
+c:obsidians=10
+c:ores/netherite_scrap=10
+c:ores/quartz=10
+c:ores=10
+c:player_workstations/crafting_tables=10
+c:player_workstations/furnaces=10
+c:raw_materials/copper=10
+c:raw_materials/gold=10
+c:raw_materials/iron=10
+c:raw_materials=10
+c:relocation_not_supported=10
+c:rods/blaze=10
+c:rods/breeze=10
+c:rods/wooden=10
+c:rods=10
+c:ropes=10
+c:sandstone/blocks=10
+c:sandstone/red_blocks=10
+c:sandstone/red_slabs=10
+c:sandstone/red_stairs=10
+c:sandstone/slabs=10
+c:sandstone/stairs=10
+c:sandstone/uncolored_blocks=10
+c:sandstone/uncolored_slabs=10
+c:sandstone/uncolored_stairs=10
+c:shulker_boxes=10
+c:skulls=10
+c:slime_balls=10
+c:stones=10
+c:storage_blocks/bone_meal=10
+c:storage_blocks/coal=10
+c:storage_blocks/copper=10
+c:storage_blocks/diamond=10
+c:storage_blocks/dried_kelp=10
+c:storage_blocks/emerald=10
+c:storage_blocks/gold=10
+c:storage_blocks/iron=10
+c:storage_blocks/lapis=10
+c:storage_blocks/netherite=10
+c:storage_blocks/raw_copper=10
+c:storage_blocks/raw_gold=10
+c:storage_blocks/raw_iron=10
+c:storage_blocks/redstone=10
+c:storage_blocks/slime=10
+c:storage_blocks/wheat=10
+c:storage_blocks=10
+c:strings=10
+c:tools/bow=10
+c:tools/brush=10
+c:tools/crossbow=10
+c:tools/fishing_rod=10
+c:tools/igniter=10
+c:tools/mace=10
+c:tools/melee_weapon=10
+c:tools/mining_tool=10
+c:tools/ranged_weapon=10
+c:tools/shear=10
+c:tools/shield=10
+c:tools/spear=10
+c:tools=10
+c:villager_job_sites=10
+forge:anvil=10
+forge:arrows=10
+forge:banners=10
+forge:barrels_wooden=10
+forge:barrels=10
+forge:beds=10
+forge:boats=20
+forge:bones=5
+forge:bookshelves=50
+forge:buttons=10
+forge:candles=10
+forge:carpets=10
+forge:chests/ender=475
+forge:chests/trapped=10
+forge:chests/wooden=10
+forge:chests=10
+forge:coal_ores=20
+forge:coals=20
+forge:cobblestone/deepslate=7
+forge:cobblestone/infested=10
+forge:cobblestone/mossy=10
+forge:cobblestone/normal=5
+forge:cobblestone=5
+forge:copper_ores=50
+forge:crimson_stems=10
+forge:crops=10
+forge:diamond_ores=500
+forge:dirt=1
+forge:doors=10
+forge:dusts/glowstone=137
+forge:dusts/prismarine=250
+forge:dusts/redstone=137
+forge:dusts=120
+forge:dyes/black=15
+forge:dyes/blue=10
+forge:dyes/brown=10
+forge:dyes/cyan=10
+forge:dyes/gray=10
+forge:dyes/green=15
+forge:dyes/light_blue=10
+forge:dyes/light_gray=10
+forge:dyes/lime=10
+forge:dyes/magenta=10
+forge:dyes/orange=10
+forge:dyes/pink=10
+forge:dyes/purple=10
+forge:dyes/red=10
+forge:dyes/white=10
+forge:dyes/yellow=10
+forge:dyes=10
+forge:eggs=10
+forge:emerald_ores=400
+forge:enchanting_fuels=100
+forge:end_stones=150
+forge:ender_pearls=150
+forge:enderman_place_on_blacklist=10
+forge:feathers=10
+forge:fence_gates/wooden=10
+forge:fence_gates=10
+forge:fences/nether_brick=10
+forge:fences/wooden=10
+forge:fences=10
+forge:fishes=10
+forge:flowers=5
+forge:foods/pie=10
+forge:gems/amethyst=150
+forge:gems/diamond=500
+forge:gems/emerald=400
+forge:gems/lapis=250
+forge:gems/prismarine=250
+forge:gems/quartz=300
+forge:gems=150
+forge:glass_panes=20
+forge:glass_silica=20
+forge:glass_tinted=20
+forge:glass=10
+forge:gold_ores=250
+forge:gravel=2
+forge:gunpowder=50
+forge:heads=100
+forge:ingots/brick=16
+forge:ingots/copper=55
+forge:ingots/gold=310
+forge:ingots/iron=110
+forge:ingots/nether_brick=20
+forge:ingots/netherite=750
+forge:ingots=15
+forge:iron_ores=110
+forge:lapis_ores=250
+forge:leather=50
+forge:leaves=2
+forge:lectern_books=100
+forge:logs_that_burn=10
+forge:logs=10
+forge:mushrooms=2
+forge:music_discs=10
+forge:nether_stars=900
+forge:netherrack=5
+forge:non_flammable_wood=10
+forge:nuggets/gold=33
+forge:nuggets/iron=11
+forge:nuggets=2
+forge:obsidian=400
+forge:ore_bearing_ground/deepslate=10
+forge:ore_bearing_ground/netherrack=10
+forge:ore_bearing_ground/stone=10
+forge:ore_rates/dense=10
+forge:ore_rates/singular=10
+forge:ore_rates/sparse=10
+forge:ores_in_ground/deepslate=10
+forge:ores_in_ground/netherrack=10
+forge:ores_in_ground/stone=10
+forge:ores/coal=25
+forge:ores/copper=50
+forge:ores/diamond=500
+forge:ores/emerald=400
+forge:ores/gold=300
+forge:ores/iron=100
+forge:ores/lapis=250
+forge:ores/netherite_scrap=750
+forge:ores/quartz=300
+forge:ores/redstone=200
+forge:ores=10
+forge:planks=10
+forge:rails=10
+forge:raw_materials/copper=50
+forge:raw_materials/gold=300
+forge:raw_materials/iron=100
+forge:raw_materials=10
+forge:redstone_ores=200
+forge:rods/blaze=450
+forge:rods/wooden=10
+forge:rods=50
+forge:sand/colorless=10
+forge:sand/red=10
+forge:sand=10
+forge:sandstone=15
+forge:saplings=2
+forge:seeds/beetroot=10
+forge:seeds/melon=10
+forge:seeds/pumpkin=10
+forge:seeds/wheat=10
+forge:seeds=2
+forge:shears=10
+forge:signs=10
+forge:slimeballs=40
+forge:small_flowers=10
+forge:soul_fire_base_blocks=100
+forge:stained_glass_panes=10
+forge:stained_glass=10
+forge:stone_bricks=5
+forge:stone=5
+forge:string=15
+forge:tall_flowers=5
+forge:terracotta=100
+forge:warped_stems=250
+forge:wooden_buttons=10
+forge:wooden_doors=60
+forge:wooden_fences=10
+forge:wooden_pressure_plates=20
+forge:wooden_slabs=30
+forge:wooden_stairs=60
+forge:wooden_trapdoors=60
+forge:wool=10
+minecraft:acacia_fence_gate=10
+minecraft:acacia_fence=10
+minecraft:allium=10
+minecraft:amethyst_cluster=10
+minecraft:amethyst_shard=10
+minecraft:ancient_debris=10
+minecraft:andesite=10
+minecraft:anvil=10
+minecraft:apple=10
+minecraft:arrows=10
+minecraft:axolotl_bucket=10
+minecraft:azure_bluet=10
+minecraft:baked_potato=10
+minecraft:bamboo_fence_gate=10
+minecraft:bamboo_fence=10
+minecraft:bamboo=10
+minecraft:banners=10
+minecraft:barrel=10
+minecraft:barrels_wooden=10
+minecraft:barrels=10
+minecraft:beds=10
+minecraft:beef=10
+minecraft:beetroot_seeds=10
+minecraft:beetroot_soup=10
+minecraft:beetroot=10
+minecraft:birch_fence_gate=10
+minecraft:birch_fence=10
+minecraft:black_banner=10
+minecraft:black_bed=10
+minecraft:black_candle=10
+minecraft:black_carpet=10
+minecraft:black_concrete_powder=10
+minecraft:black_concrete=10
+minecraft:black_dye=10
+minecraft:black_glazed_terracotta=10
+minecraft:black_shulker_box=10
+minecraft:black_stained_glass_pane=10
+minecraft:black_stained_glass=10
+minecraft:black_terracotta=10
+minecraft:black_wall_banner=10
+minecraft:black_wool=10
+minecraft:blackstone=6
+minecraft:blast_furnace=10
+minecraft:blaze_rod=10
+minecraft:blue_banner=10
+minecraft:blue_bed=10
+minecraft:blue_candle=10
+minecraft:blue_carpet=10
+minecraft:blue_concrete_powder=10
+minecraft:blue_concrete=10
+minecraft:blue_dye=10
+minecraft:blue_glazed_terracotta=10
+minecraft:blue_orchid=10
+minecraft:blue_shulker_box=10
+minecraft:blue_stained_glass_pane=10
+minecraft:blue_stained_glass=10
+minecraft:blue_terracotta=10
+minecraft:blue_wall_banner=10
+minecraft:blue_wool=10
+minecraft:boats=20
+minecraft:bone_block=10
+minecraft:bone_meal=10
+minecraft:bone=10
+minecraft:bones=5
+minecraft:bookshelf=10
+minecraft:bookshelves=50
+minecraft:bow=10
+minecraft:bread=10
+minecraft:breeze_rod=10
+minecraft:brewing_stand=10
+minecraft:brick=10
+minecraft:brown_banner=10
+minecraft:brown_bed=10
+minecraft:brown_candle=10
+minecraft:brown_carpet=10
+minecraft:brown_concrete_powder=10
+minecraft:brown_concrete=10
+minecraft:brown_dye=10
+minecraft:brown_glazed_terracotta=10
+minecraft:brown_mushroom=10
+minecraft:brown_shulker_box=10
+minecraft:brown_stained_glass_pane=10
+minecraft:brown_stained_glass=10
+minecraft:brown_terracotta=10
+minecraft:brown_wall_banner=10
+minecraft:brown_wool=10
+minecraft:brush=10
+minecraft:bucket=10
+minecraft:budding_amethyst=10
+minecraft:buttons=10
+minecraft:cactus=10
+minecraft:cake=10
+minecraft:candles=10
+minecraft:carpets=10
+minecraft:carrot_on_a_stick=10
+minecraft:carrot=10
+minecraft:cartography_table=10
+minecraft:carved_pumpkin=10
+minecraft:cauldron=10
+minecraft:chain=10
+minecraft:chainmail_boots=10
+minecraft:chainmail_chestplate=10
+minecraft:chainmail_helmet=10
+minecraft:chainmail_leggings=10
+minecraft:cherry_fence_gate=10
+minecraft:cherry_fence=10
+minecraft:cherry_leaves=10
+minecraft:chest=10
+minecraft:chests_ender=475
+minecraft:chests_trapped=10
+minecraft:chests_wooden=10
+minecraft:chests=10
+minecraft:chicken=10
+minecraft:chiseled_red_sandstone=10
+minecraft:chiseled_sandstone=10
+minecraft:chorus_flower=10
+minecraft:chorus_fruit=10
+minecraft:coal_block=10
+minecraft:coal_ore=20
+minecraft:coal_ores=20
+minecraft:coals=20
+minecraft:cobbled_deepslate=10
+minecraft:cobblestone_deepslate=7
+minecraft:cobblestone_mossy=10
+minecraft:cobblestone_normal=5
+minecraft:cobblestone=5
+minecraft:cocoa_beans=10
+minecraft:cod_bucket=10
+minecraft:cod=10
+minecraft:compass=10
+minecraft:composter=10
+minecraft:cooked_beef=10
+minecraft:cooked_chicken=10
+minecraft:cooked_cod=10
+minecraft:cooked_mutton=10
+minecraft:cooked_porkchop=10
+minecraft:cooked_rabbit=10
+minecraft:cooked_salmon=10
+minecraft:cookie=10
+minecraft:copper_block=10
+minecraft:copper_ingot=10
+minecraft:copper_ore=10
+minecraft:copper_ores=50
+minecraft:cornflower=10
+minecraft:crafting_table=10
+minecraft:creeper_head=10
+minecraft:creeper_wall_head=10
+minecraft:crimson_fence_gate=10
+minecraft:crimson_fence=10
+minecraft:crimson_fungus=10
+minecraft:crimson_stems=10
+minecraft:crops=10
+minecraft:crossbow=10
+minecraft:crying_obsidian=10
+minecraft:cut_red_sandstone_slab=10
+minecraft:cut_red_sandstone=10
+minecraft:cut_sandstone_slab=10
+minecraft:cut_sandstone=10
+minecraft:cyan_banner=10
+minecraft:cyan_bed=10
+minecraft:cyan_candle=10
+minecraft:cyan_carpet=10
+minecraft:cyan_concrete_powder=10
+minecraft:cyan_concrete=10
+minecraft:cyan_dye=10
+minecraft:cyan_glazed_terracotta=10
+minecraft:cyan_shulker_box=10
+minecraft:cyan_stained_glass_pane=10
+minecraft:cyan_stained_glass=10
+minecraft:cyan_terracotta=10
+minecraft:cyan_wall_banner=10
+minecraft:cyan_wool=10
+minecraft:dandelion=10
+minecraft:dark_oak_fence_gate=10
+minecraft:dark_oak_fence=10
+minecraft:deepslate_coal_ore=10
+minecraft:deepslate_copper_ore=10
+minecraft:deepslate_diamond_ore=10
+minecraft:deepslate_emerald_ore=10
+minecraft:deepslate_gold_ore=10
+minecraft:deepslate_iron_ore=10
+minecraft:deepslate_lapis_ore=10
+minecraft:deepslate_redstone_ore=10
+minecraft:deepslate=10
+minecraft:diamond_axe=10
+minecraft:diamond_block=10
+minecraft:diamond_boots=10
+minecraft:diamond_chestplate=10
+minecraft:diamond_helmet=10
+minecraft:diamond_hoe=10
+minecraft:diamond_leggings=10
+minecraft:diamond_ore=10
+minecraft:diamond_ores=500
+minecraft:diamond_pickaxe=10
+minecraft:diamond_shovel=10
+minecraft:diamond_sword=10
+minecraft:diamond=10
+minecraft:diorite=10
+minecraft:dirt=1
+minecraft:doors=10
+minecraft:dragon_head=10
+minecraft:dragon_wall_head=10
+minecraft:dried_kelp_block=10
+minecraft:dried_kelp=10
+minecraft:dusts_glowstone=137
+minecraft:dusts_prismarine=250
+minecraft:dusts_redstone=137
+minecraft:dusts=120
+minecraft:dyes_black=15
+minecraft:dyes_blue=10
+minecraft:dyes_brown=10
+minecraft:dyes_cyan=10
+minecraft:dyes_gray=10
+minecraft:dyes_green=15
+minecraft:dyes_light_blue=10
+minecraft:dyes_light_gray=10
+minecraft:dyes_lime=10
+minecraft:dyes_magenta=10
+minecraft:dyes_orange=10
+minecraft:dyes_pink=10
+minecraft:dyes_purple=10
+minecraft:dyes_red=10
+minecraft:dyes_white=10
+minecraft:dyes_yellow=10
+minecraft:dyes=10
+minecraft:egg=10
+minecraft:eggs=10
+minecraft:elytra=10
+minecraft:emerald_block=10
+minecraft:emerald_ore=10
+minecraft:emerald_ores=400
+minecraft:emerald=10
+minecraft:enchanted_golden_apple=10
+minecraft:enchanting_fuels=100
+minecraft:end_stone=10
+minecraft:end_stones=150
+minecraft:ender_chest=10
+minecraft:ender_pearl=10
+minecraft:ender_pearls=150
+minecraft:feather=10
+minecraft:feathers=10
+minecraft:fence_gates_wooden=10
+minecraft:fence_gates=10
+minecraft:fences_nether_brick=10
+minecraft:fences_wooden=10
+minecraft:fences=10
+minecraft:fishes=10
+minecraft:fishing_rod=10
+minecraft:fletching_table=10
+minecraft:flint_and_steel=10
+minecraft:flowering_azalea_leaves=10
+minecraft:flowering_azalea=10
+minecraft:flowers=5
+minecraft:furnace=10
+minecraft:gems_amethyst=150
+minecraft:gems_diamond=500
+minecraft:gems_emerald=400
+minecraft:gems_lapis=250
+minecraft:gems_prismarine=250
+minecraft:gems_quartz=300
+minecraft:gems=150
+minecraft:glass_pane=20
+minecraft:glass_panes=20
+minecraft:glass_silica=20
+minecraft:glass_tinted=20
+minecraft:glass=10
+minecraft:glow_berries=10
+minecraft:glowstone_dust=10
+minecraft:gold_block=10
+minecraft:gold_ingot=10
+minecraft:gold_nugget=10
+minecraft:gold_ore=250
+minecraft:gold_ores=250
+minecraft:golden_apple=275
+minecraft:golden_axe=275
+minecraft:golden_boots=300
+minecraft:golden_carrot=250
+minecraft:golden_chestplate=300
+minecraft:golden_helmet=300
+minecraft:golden_hoe=300
+minecraft:golden_leggings=300
+minecraft:golden_pickaxe=275
+minecraft:golden_shovel=275
+minecraft:golden_sword=300
+minecraft:granite=10
+minecraft:gravel=2
+minecraft:gray_banner=10
+minecraft:gray_bed=10
+minecraft:gray_candle=10
+minecraft:gray_carpet=10
+minecraft:gray_concrete_powder=10
+minecraft:gray_concrete=10
+minecraft:gray_dye=10
+minecraft:gray_glazed_terracotta=10
+minecraft:gray_shulker_box=10
+minecraft:gray_stained_glass_pane=10
+minecraft:gray_stained_glass=10
+minecraft:gray_terracotta=10
+minecraft:gray_wall_banner=10
+minecraft:gray_wool=10
+minecraft:green_banner=10
+minecraft:green_bed=10
+minecraft:green_candle=10
+minecraft:green_carpet=10
+minecraft:green_concrete_powder=10
+minecraft:green_concrete=10
+minecraft:green_dye=10
+minecraft:green_glazed_terracotta=10
+minecraft:green_shulker_box=10
+minecraft:green_stained_glass_pane=10
+minecraft:green_stained_glass=10
+minecraft:green_terracotta=10
+minecraft:green_wall_banner=10
+minecraft:green_wool=10
+minecraft:grindstone=10
+minecraft:gunpowder=50
+minecraft:hay_block=10
+minecraft:heads=100
+minecraft:honey_bottle=10
+minecraft:infested_cobblestone=10
+minecraft:ingots_brick=16
+minecraft:ingots_copper=55
+minecraft:ingots_gold=310
+minecraft:ingots_iron=110
+minecraft:ingots_nether_brick=20
+minecraft:ingots_netherite=750
+minecraft:ingots=15
+minecraft:iron_axe=150
+minecraft:iron_block=150
+minecraft:iron_boots=150
+minecraft:iron_chestplate=150
+minecraft:iron_helmet=150
+minecraft:iron_hoe=150
+minecraft:iron_ingot=150
+minecraft:iron_leggings=150
+minecraft:iron_nugget=150
+minecraft:iron_ore=110
+minecraft:iron_ores=110
+minecraft:iron_pickaxe=150
+minecraft:iron_shovel=150
+minecraft:iron_sword=150
+minecraft:jungle_fence_gate=10
+minecraft:jungle_fence=10
+minecraft:lapis_block=400
+minecraft:lapis_lazuli=125
+minecraft:lapis_ore=250
+minecraft:lapis_ores=250
+minecraft:large_amethyst_bud=10
+minecraft:lava_bucket=10
+minecraft:lava_cauldron=10
+minecraft:leather_boots=10
+minecraft:leather_chestplate=10
+minecraft:leather_helmet=60
+minecraft:leather_leggings=60
+minecraft:leather=50
+minecraft:leaves=2
+minecraft:lectern_books=100
+minecraft:lectern=10
+minecraft:light_blue_banner=10
+minecraft:light_blue_bed=10
+minecraft:light_blue_candle=10
+minecraft:light_blue_carpet=10
+minecraft:light_blue_concrete_powder=10
+minecraft:light_blue_concrete=10
+minecraft:light_blue_dye=10
+minecraft:light_blue_glazed_terracotta=10
+minecraft:light_blue_shulker_box=10
+minecraft:light_blue_stained_glass_pane=10
+minecraft:light_blue_stained_glass=10
+minecraft:light_blue_terracotta=10
+minecraft:light_blue_wall_banner=10
+minecraft:light_blue_wool=10
+minecraft:light_gray_banner=10
+minecraft:light_gray_bed=10
+minecraft:light_gray_candle=10
+minecraft:light_gray_carpet=10
+minecraft:light_gray_concrete_powder=10
+minecraft:light_gray_concrete=10
+minecraft:light_gray_dye=10
+minecraft:light_gray_glazed_terracotta=10
+minecraft:light_gray_shulker_box=10
+minecraft:light_gray_stained_glass_pane=10
+minecraft:light_gray_stained_glass=10
+minecraft:light_gray_terracotta=10
+minecraft:light_gray_wall_banner=10
+minecraft:light_gray_wool=10
+minecraft:lilac=10
+minecraft:lily_of_the_valley=10
+minecraft:lime_banner=10
+minecraft:lime_bed=10
+minecraft:lime_candle=10
+minecraft:lime_carpet=10
+minecraft:lime_concrete_powder=10
+minecraft:lime_concrete=10
+minecraft:lime_dye=10
+minecraft:lime_glazed_terracotta=10
+minecraft:lime_shulker_box=10
+minecraft:lime_stained_glass_pane=10
+minecraft:lime_stained_glass=10
+minecraft:lime_terracotta=10
+minecraft:lime_wall_banner=10
+minecraft:lime_wool=10
+minecraft:logs_that_burn=10
+minecraft:logs=10
+minecraft:loom=10
+minecraft:mace=10
+minecraft:magenta_banner=10
+minecraft:magenta_bed=10
+minecraft:magenta_candle=10
+minecraft:magenta_carpet=10
+minecraft:magenta_concrete_powder=10
+minecraft:magenta_concrete=10
+minecraft:magenta_dye=10
+minecraft:magenta_glazed_terracotta=10
+minecraft:magenta_shulker_box=10
+minecraft:magenta_stained_glass_pane=10
+minecraft:magenta_stained_glass=10
+minecraft:magenta_terracotta=10
+minecraft:magenta_wall_banner=10
+minecraft:magenta_wool=10
+minecraft:mangrove_fence_gate=10
+minecraft:mangrove_fence=10
+minecraft:mangrove_propagule=10
+minecraft:medium_amethyst_bud=10
+minecraft:melon_seeds=10
+minecraft:melon_slice=10
+minecraft:melon=10
+minecraft:milk_bucket=10
+minecraft:mossy_cobblestone=10
+minecraft:mushroom_stew=10
+minecraft:mushrooms=2
+minecraft:music_disc_11=10
+minecraft:music_disc_13=10
+minecraft:music_disc_5=10
+minecraft:music_disc_blocks=10
+minecraft:music_disc_cat=10
+minecraft:music_disc_chirp=10
+minecraft:music_disc_creator_music_box=10
+minecraft:music_disc_creator=10
+minecraft:music_disc_far=10
+minecraft:music_disc_mall=10
+minecraft:music_disc_mellohi=10
+minecraft:music_disc_otherside=10
+minecraft:music_disc_pigstep=10
+minecraft:music_disc_precipice=10
+minecraft:music_disc_relic=10
+minecraft:music_disc_stal=10
+minecraft:music_disc_strad=10
+minecraft:music_disc_wait=10
+minecraft:music_disc_ward=10
+minecraft:music_discs=10
+minecraft:mutton=10
+minecraft:nether_brick_fence=10
+minecraft:nether_brick=10
+minecraft:nether_gold_ore=10
+minecraft:nether_quartz_ore=10
+minecraft:nether_star=900
+minecraft:nether_stars=900
+minecraft:nether_wart=10
+minecraft:netherite_axe=1000
+minecraft:netherite_block=1000
+minecraft:netherite_boots=1000
+minecraft:netherite_chestplate=1000
+minecraft:netherite_helmet=1000
+minecraft:netherite_hoe=1000
+minecraft:netherite_ingot=1000
+minecraft:netherite_leggings=1000
+minecraft:netherite_pickaxe=1000
+minecraft:netherite_shovel=1000
+minecraft:netherite_sword=1000
+minecraft:netherrack=5
+minecraft:non_flammable_wood=10
+minecraft:nuggets_gold=33
+minecraft:nuggets_iron=11
+minecraft:nuggets=2
+minecraft:oak_fence_gate=10
+minecraft:oak_fence=10
+minecraft:obsidian=400
+minecraft:ominous_bottle=10
+minecraft:orange_banner=10
+minecraft:orange_bed=10
+minecraft:orange_candle=10
+minecraft:orange_carpet=10
+minecraft:orange_concrete_powder=10
+minecraft:orange_concrete=10
+minecraft:orange_dye=10
+minecraft:orange_glazed_terracotta=10
+minecraft:orange_shulker_box=10
+minecraft:orange_stained_glass_pane=10
+minecraft:orange_stained_glass=10
+minecraft:orange_terracotta=10
+minecraft:orange_tulip=10
+minecraft:orange_wall_banner=10
+minecraft:orange_wool=10
+minecraft:ore_bearing_ground_deepslate=10
+minecraft:ore_bearing_ground_netherrack=10
+minecraft:ore_bearing_ground_stone=10
+minecraft:ores_coal=25
+minecraft:ores_copper=50
+minecraft:ores_diamond=500
+minecraft:ores_emerald=400
+minecraft:ores_gold=300
+minecraft:ores_in_ground_deepslate=10
+minecraft:ores_in_ground_netherrack=10
+minecraft:ores_in_ground_stone=10
+minecraft:ores_iron=100
+minecraft:ores_lapis=250
+minecraft:ores_netherite_scrap=750
+minecraft:ores_quartz=300
+minecraft:ores_redstone=200
+minecraft:ores=10
+minecraft:oxeye_daisy=10
+minecraft:peony=10
+minecraft:piglin_head=10
+minecraft:piglin_wall_head=10
+minecraft:pink_banner=10
+minecraft:pink_bed=10
+minecraft:pink_candle=10
+minecraft:pink_carpet=10
+minecraft:pink_concrete_powder=10
+minecraft:pink_concrete=10
+minecraft:pink_dye=10
+minecraft:pink_glazed_terracotta=10
+minecraft:pink_petals=10
+minecraft:pink_shulker_box=10
+minecraft:pink_stained_glass_pane=10
+minecraft:pink_stained_glass=10
+minecraft:pink_terracotta=10
+minecraft:pink_tulip=10
+minecraft:pink_wall_banner=10
+minecraft:pink_wool=10
+minecraft:pitcher_plant=10
+minecraft:pitcher_pod=10
+minecraft:planks=10
+minecraft:player_head=10
+minecraft:player_wall_head=10
+minecraft:poisonous_potato=10
+minecraft:poppy=10
+minecraft:porkchop=10
+minecraft:potato=10
+minecraft:powder_snow_bucket=10
+minecraft:powder_snow_cauldron=10
+minecraft:prismarine_crystals=10
+minecraft:pufferfish_bucket=10
+minecraft:pufferfish=10
+minecraft:pumpkin_pie=10
+minecraft:pumpkin_seeds=10
+minecraft:pumpkin=10
+minecraft:purple_banner=10
+minecraft:purple_bed=10
+minecraft:purple_candle=10
+minecraft:purple_carpet=10
+minecraft:purple_concrete_powder=10
+minecraft:purple_concrete=10
+minecraft:purple_dye=10
+minecraft:purple_glazed_terracotta=10
+minecraft:purple_shulker_box=10
+minecraft:purple_stained_glass_pane=10
+minecraft:purple_stained_glass=10
+minecraft:purple_terracotta=10
+minecraft:purple_wall_banner=10
+minecraft:purple_wool=10
+minecraft:quartz=10
+minecraft:rabbit_stew=10
+minecraft:rabbit=10
+minecraft:rails=10
+minecraft:raw_copper_block=10
+minecraft:raw_copper=10
+minecraft:raw_gold_block=300
+minecraft:raw_gold=300
+minecraft:raw_iron_block=100
+minecraft:raw_iron=100
+minecraft:raw_materials_copper=50
+minecraft:raw_materials_gold=300
+minecraft:raw_materials_iron=100
+minecraft:raw_materials=10
+minecraft:red_banner=10
+minecraft:red_bed=10
+minecraft:red_candle=10
+minecraft:red_carpet=10
+minecraft:red_concrete_powder=10
+minecraft:red_concrete=10
+minecraft:red_dye=10
+minecraft:red_glazed_terracotta=10
+minecraft:red_mushroom=10
+minecraft:red_sand=10
+minecraft:red_sandstone_slab=10
+minecraft:red_sandstone_stairs=10
+minecraft:red_sandstone=10
+minecraft:red_shulker_box=10
+minecraft:red_stained_glass_pane=10
+minecraft:red_stained_glass=10
+minecraft:red_terracotta=10
+minecraft:red_tulip=10
+minecraft:red_wall_banner=10
+minecraft:red_wool=10
+minecraft:redstone_block=600
+minecraft:redstone_ore=200
+minecraft:redstone_ores=200
+minecraft:redstone=200
+minecraft:rods_blaze=450
+minecraft:rods_wooden=50
+minecraft:rods=50
+minecraft:rose_bush=10
+minecraft:rotten_flesh=10
+minecraft:salmon_bucket=10
+minecraft:salmon=10
+minecraft:sand_colorless=10
+minecraft:sand_red=10
+minecraft:sand=10
+minecraft:sandstone_slab=10
+minecraft:sandstone_stairs=10
+minecraft:sandstone=15
+minecraft:saplings=2
+minecraft:seagrass=10
+minecraft:seeds=2
+minecraft:shears=10
+minecraft:shield=10
+minecraft:shulker_box=10
+minecraft:signs=10
+minecraft:skeleton_skull=10
+minecraft:skeleton_wall_skull=10
+minecraft:slime_ball=40
+minecraft:slime_block=100
+minecraft:slimeballs=40
+minecraft:small_amethyst_bud=10
+minecraft:small_flowers=10
+minecraft:smithing_table=10
+minecraft:smoker=10
+minecraft:smooth_red_sandstone_slab=10
+minecraft:smooth_red_sandstone_stairs=10
+minecraft:smooth_red_sandstone=10
+minecraft:smooth_sandstone_slab=10
+minecraft:smooth_sandstone_stairs=10
+minecraft:smooth_sandstone=10
+minecraft:soul_fire_base_blocks=100
+minecraft:spider_eye=10
+minecraft:spore_blossom=10
+minecraft:spruce_fence_gate=10
+minecraft:spruce_fence=10
+minecraft:stained_glass_panes=10
+minecraft:stained_glass=10
+minecraft:stick=10
+minecraft:stone_axe=10
+minecraft:stone_bricks=5
+minecraft:stone_crafting_materials=5
+minecraft:stone_hoe=10
+minecraft:stone_pickaxe=10
+minecraft:stone_shovel=10
+minecraft:stone_sword=10
+minecraft:stone_tool_materials=5
+minecraft:stone=5
+minecraft:stonecutter=10
+minecraft:string=15
+minecraft:sugar_cane=10
+minecraft:sugar=10
+minecraft:sunflower=10
+minecraft:suspicious_stew=10
+minecraft:sweet_berries=10
+minecraft:tadpole_bucket=10
+minecraft:tall_flowers=5
+minecraft:terracotta=100
+minecraft:tinted_glass=10
+minecraft:torchflower_seeds=10
+minecraft:torchflower=10
+minecraft:trapped_chest=10
+minecraft:trident=10
+minecraft:tropical_fish_bucket=10
+minecraft:tropical_fish=10
+minecraft:tuff=10
+minecraft:turtle_helmet=10
+minecraft:warped_fence_gate=10
+minecraft:warped_fence=10
+minecraft:warped_fungus_on_a_stick=10
+minecraft:warped_fungus=10
+minecraft:warped_stems=250
+minecraft:water_bucket=10
+minecraft:water_cauldron=10
+minecraft:wheat_seeds=10
+minecraft:wheat=10
+minecraft:white_banner=10
+minecraft:white_bed=10
+minecraft:white_candle=10
+minecraft:white_carpet=10
+minecraft:white_concrete_powder=10
+minecraft:white_concrete=10
+minecraft:white_dye=10
+minecraft:white_glazed_terracotta=10
+minecraft:white_shulker_box=10
+minecraft:white_stained_glass_pane=10
+minecraft:white_stained_glass=10
+minecraft:white_terracotta=10
+minecraft:white_tulip=10
+minecraft:white_wall_banner=10
+minecraft:white_wool=10
+minecraft:wither_rose=10
+minecraft:wither_skeleton_skull=10
+minecraft:wither_skeleton_wall_skull=10
+minecraft:wooden_axe=10
+minecraft:wooden_buttons=10
+minecraft:wooden_doors=60
+minecraft:wooden_fences=10
+minecraft:wooden_hoe=10
+minecraft:wooden_pickaxe=10
+minecraft:wooden_pressure_plates=20
+minecraft:wooden_shovel=10
+minecraft:wooden_slabs=30
+minecraft:wooden_stairs=60
+minecraft:wooden_sword=10
+minecraft:wooden_trapdoors=60
+minecraft:wool=10
+minecraft:yellow_banner=10
+minecraft:yellow_bed=10
+minecraft:yellow_candle=10
+minecraft:yellow_carpet=10
+minecraft:yellow_concrete_powder=10
+minecraft:yellow_concrete=10
+minecraft:yellow_dye=10
+minecraft:yellow_glazed_terracotta=10
+minecraft:yellow_shulker_box=10
+minecraft:yellow_stained_glass_pane=10
+minecraft:yellow_stained_glass=10
+minecraft:yellow_terracotta=10
+minecraft:yellow_wall_banner=10
+minecraft:yellow_wool=10
+minecraft:zombie_head=10
+minecraft:zombie_wall_head=10
diff --git a/src/main/java/com/sweetrpg/crafttracker/CraftTracker.java b/src/main/java/com/sweetrpg/crafttracker/CraftTracker.java
index a7d921b..ab39599 100644
--- a/src/main/java/com/sweetrpg/crafttracker/CraftTracker.java
+++ b/src/main/java/com/sweetrpg/crafttracker/CraftTracker.java
@@ -7,7 +7,6 @@
import com.sweetrpg.crafttracker.common.config.ConfigHandler;
import com.sweetrpg.crafttracker.common.event.EventHandler;
import com.sweetrpg.crafttracker.common.lib.Constants;
-import com.sweetrpg.crafttracker.common.registry.*;
import com.sweetrpg.crafttracker.data.CTAdvancementProvider;
import com.sweetrpg.crafttracker.data.CTLangProvider;
import net.minecraft.data.DataGenerator;
@@ -50,16 +49,6 @@ public CraftTracker() {
modEventBus.addListener(CommonSetup::init);
modEventBus.addListener(this::interModProcess);
- // Registries
- ModBlocks.BLOCKS.register(modEventBus);
- ModBlockEntityTypes.TILE_ENTITIES.register(modEventBus);
- ModItems.ITEMS.register(modEventBus);
- ModContainerTypes.CONTAINERS.register(modEventBus);
- ModSerializers.SERIALIZERS.register(modEventBus);
- ModRecipeSerializers.RECIPE_SERIALIZERS.register(modEventBus);
-
- modEventBus.addListener(ModRegistries::newRegistry);
-
IEventBus forgeEventBus = MinecraftForge.EVENT_BUS;
forgeEventBus.addListener(this::serverStarting);
forgeEventBus.addListener(this::registerCommands);
diff --git a/src/main/java/com/sweetrpg/crafttracker/client/overlay/CraftQueueOverlay.java b/src/main/java/com/sweetrpg/crafttracker/client/overlay/CraftQueueOverlay.java
index 944d644..3a50c10 100644
--- a/src/main/java/com/sweetrpg/crafttracker/client/overlay/CraftQueueOverlay.java
+++ b/src/main/java/com/sweetrpg/crafttracker/client/overlay/CraftQueueOverlay.java
@@ -53,17 +53,17 @@ public class CraftQueueOverlay {
return;
case DYNAMIC:
- if(ConfigHandler.CLIENT.CRAFT_QUEUE_OVERLAY_HIDE_EMPTY.get() &&
+ if(ConfigHandler.CLIENT.craftQueueOverlayHideEmpty.get() &&
products.isEmpty()) {
return;
}
break;
}
- var x = ConfigHandler.CLIENT.CRAFT_QUEUE_OVERLAY_X.get();
- var y = ConfigHandler.CLIENT.CRAFT_QUEUE_OVERLAY_Y.get();
- var olWidth = Math.min((ConfigHandler.CLIENT.CRAFT_QUEUE_OVERLAY_X.get() + ConfigHandler.CLIENT.CRAFT_QUEUE_OVERLAY_WIDTH.get()), width - 10);
- var olHeight = Math.min((ConfigHandler.CLIENT.CRAFT_QUEUE_OVERLAY_Y.get() + ConfigHandler.CLIENT.CRAFT_QUEUE_OVERLAY_HEIGHT.get()), height - 10);
+ var x = ConfigHandler.CLIENT.craftQueueOverlayX.get();
+ var y = ConfigHandler.CLIENT.craftQueueOverlayY.get();
+ var olWidth = Math.min((ConfigHandler.CLIENT.craftQueueOverlayX.get() + ConfigHandler.CLIENT.craftQueueOverlayWidth.get()), width - 10);
+ var olHeight = Math.min((ConfigHandler.CLIENT.craftQueueOverlayY.get() + ConfigHandler.CLIENT.craftQueueOverlayHeight.get()), height - 10);
var backgroundColor = 0x5f5f5f5f; // TODO: get from config
var borderColor = 0x1f1f1f1f; // TODO: get from config
diff --git a/src/main/java/com/sweetrpg/crafttracker/client/overlay/ShoppingListOverlay.java b/src/main/java/com/sweetrpg/crafttracker/client/overlay/ShoppingListOverlay.java
index 9d3222d..bb6b37f 100644
--- a/src/main/java/com/sweetrpg/crafttracker/client/overlay/ShoppingListOverlay.java
+++ b/src/main/java/com/sweetrpg/crafttracker/client/overlay/ShoppingListOverlay.java
@@ -44,23 +44,23 @@ public class ShoppingListOverlay {
return;
case DYNAMIC:
- if(ConfigHandler.CLIENT.SHOPPING_LIST_OVERLAY_HIDE_EMPTY.get() &&
+ if(ConfigHandler.CLIENT.shoppingListOverlayHideEmpty.get() &&
items.isEmpty()) {
return;
}
break;
}
- var x = ConfigHandler.CLIENT.SHOPPING_LIST_OVERLAY_X.get();
+ var x = ConfigHandler.CLIENT.shoppingListOverlayX.get();
if(x < 0) {
- x = width - (ConfigHandler.CLIENT.SHOPPING_LIST_OVERLAY_WIDTH.get() + Math.abs(x));
+ x = width - (ConfigHandler.CLIENT.shoppingListOverlayWidth.get() + Math.abs(x));
}
- var y = ConfigHandler.CLIENT.SHOPPING_LIST_OVERLAY_Y.get();
+ var y = ConfigHandler.CLIENT.shoppingListOverlayY.get();
if(x < 0) {
- y = width - (ConfigHandler.CLIENT.SHOPPING_LIST_OVERLAY_HEIGHT.get() + Math.abs(y));
+ y = width - (ConfigHandler.CLIENT.shoppingListOverlayHeight.get() + Math.abs(y));
}
- var olWidth = Math.min((x + ConfigHandler.CLIENT.SHOPPING_LIST_OVERLAY_WIDTH.get()), width - 10);
- var olHeight = Math.min((y + ConfigHandler.CLIENT.SHOPPING_LIST_OVERLAY_HEIGHT.get()), height - 10);
+ var olWidth = Math.min((x + ConfigHandler.CLIENT.shoppingListOverlayWidth.get()), width - 10);
+ var olHeight = Math.min((y + ConfigHandler.CLIENT.shoppingListOverlayHeight.get()), height - 10);
var backgroundColor = 0x5f5f5f5f; // TODO: get from config?
var borderColor = 0x1f1f1f1f; // TODO: get from config?
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/config/ConfigHandler.java b/src/main/java/com/sweetrpg/crafttracker/common/config/ConfigHandler.java
index 938e0a0..f121571 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/config/ConfigHandler.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/config/ConfigHandler.java
@@ -2,60 +2,94 @@
import com.sweetrpg.crafttracker.CraftTracker;
import com.sweetrpg.crafttracker.common.lib.Constants;
+import com.sweetrpg.crafttracker.common.lib.Costs;
+import com.sweetrpg.crafttracker.common.lib.Multipliers;
+import com.sweetrpg.crafttracker.common.manager.CraftingQueueManager;
+import net.minecraft.client.Minecraft;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.config.ModConfig;
+import net.minecraftforge.fml.event.config.ModConfigEvent;
import org.apache.commons.lang3.tuple.Pair;
+import java.util.HashMap;
+import java.util.Map;
+
public class ConfigHandler {
public static ClientConfig CLIENT;
+ public static CommonConfig COMMON;
public static ServerConfig SERVER;
- private static ForgeConfigSpec CONFIG_SERVER_SPEC;
- private static ForgeConfigSpec CONFIG_CLIENT_SPEC;
public static void init(IEventBus modEventBus) {
- Pair commonPair = new ForgeConfigSpec.Builder().configure(ServerConfig::new);
- CONFIG_SERVER_SPEC = commonPair.getRight();
- SERVER = commonPair.getLeft();
Pair clientPair = new ForgeConfigSpec.Builder().configure(ClientConfig::new);
- CONFIG_CLIENT_SPEC = clientPair.getRight();
+ ForgeConfigSpec configClientSpec = clientPair.getRight();
CLIENT = clientPair.getLeft();
+ Pair commonPair = new ForgeConfigSpec.Builder().configure(CommonConfig::new);
+ ForgeConfigSpec configCommonSpec = commonPair.getRight();
+ COMMON = commonPair.getLeft();
+ Pair serverPair = new ForgeConfigSpec.Builder().configure(ServerConfig::new);
+ ForgeConfigSpec configServerSpec = serverPair.getRight();
+ SERVER = serverPair.getLeft();
+
CraftTracker.LOGGER.debug("register configs");
+ ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, configClientSpec);
+ ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, configCommonSpec);
+ ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, configServerSpec);
+
+ modEventBus.addListener(ConfigHandler::configEventHandler);
+ }
+
+ public static void configEventHandler(ModConfigEvent event) {
+ CraftTracker.LOGGER.debug("#configEventHandler: {}", event);
- ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, CONFIG_SERVER_SPEC);
- ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, CONFIG_CLIENT_SPEC);
+ if(event instanceof ModConfigEvent.Reloading &&
+ ((event.getConfig().getType() == ModConfig.Type.CLIENT) ||
+ (event.getConfig().getType() == ModConfig.Type.COMMON)) &&
+ Minecraft.getInstance().level != null) {
+ CraftTracker.LOGGER.debug("config is reloading");
+
+ CraftingQueueManager.INSTANCE.computeAll();
+ }
}
public static class ClientConfig {
- public ForgeConfigSpec.BooleanValue CRAFT_QUEUE_OVERLAY_HIDE_EMPTY;
- public ForgeConfigSpec.IntValue CRAFT_QUEUE_OVERLAY_X;
- public ForgeConfigSpec.IntValue CRAFT_QUEUE_OVERLAY_Y;
- public ForgeConfigSpec.IntValue CRAFT_QUEUE_OVERLAY_WIDTH;
- public ForgeConfigSpec.IntValue CRAFT_QUEUE_OVERLAY_HEIGHT;
- public ForgeConfigSpec.BooleanValue SHOPPING_LIST_OVERLAY_HIDE_EMPTY;
- public ForgeConfigSpec.IntValue SHOPPING_LIST_OVERLAY_X;
- public ForgeConfigSpec.IntValue SHOPPING_LIST_OVERLAY_Y;
- public ForgeConfigSpec.IntValue SHOPPING_LIST_OVERLAY_WIDTH;
- public ForgeConfigSpec.IntValue SHOPPING_LIST_OVERLAY_HEIGHT;
+ // General
+ public ForgeConfigSpec.IntValue calculationDepth;
+
+ // Craft Queue
+ public ForgeConfigSpec.BooleanValue craftQueueOverlayHideEmpty;
+ public ForgeConfigSpec.IntValue craftQueueOverlayX;
+ public ForgeConfigSpec.IntValue craftQueueOverlayY;
+ public ForgeConfigSpec.IntValue craftQueueOverlayWidth;
+ public ForgeConfigSpec.IntValue craftQueueOverlayHeight;
+
+ // Shopping List
+ public ForgeConfigSpec.BooleanValue shoppingListOverlayHideEmpty;
+ public ForgeConfigSpec.IntValue shoppingListOverlayX;
+ public ForgeConfigSpec.IntValue shoppingListOverlayY;
+ public ForgeConfigSpec.IntValue shoppingListOverlayWidth;
+ public ForgeConfigSpec.IntValue shoppingListOverlayHeight;
public ClientConfig(ForgeConfigSpec.Builder builder) {
{
builder.push("General");
+ calculationDepth = builder.comment("Determines how far down the tree the queue calculation will go before it stops").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CALC_DEPTH).defineInRange("calculation_depth", 3, 1, 5);
+
builder.pop();
}
{
builder.push("CraftQueue");
- CRAFT_QUEUE_OVERLAY_HIDE_EMPTY = builder.comment("Sets whether the craft queue overlay should be displayed only when it has items in it.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_HIDE_EMPTY).define("craft_queue_hide_empty", true);
- CRAFT_QUEUE_OVERLAY_X = builder.comment("Sets the X screen location for the craft queue overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_X).defineInRange("craft_queue_x", 10, -1000, 10000);
- CRAFT_QUEUE_OVERLAY_Y = builder.comment("Sets the Y screen location for the craft queue overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_Y).defineInRange("craft_queue_y", 60, -1000, 10000);
- CRAFT_QUEUE_OVERLAY_WIDTH = builder.comment("Sets the width of the craft queue overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_WIDTH).defineInRange("craft_queue_width", 300, 100, 10000);
- CRAFT_QUEUE_OVERLAY_HEIGHT = builder.comment("Sets the height of the craft queue overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_HEIGHT).defineInRange("craft_queue_height", 500, 100, 10000);
+ craftQueueOverlayHideEmpty = builder.comment("Sets whether the craft queue overlay should be displayed only when it has items in it.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_HIDE_EMPTY).define("craft_queue_hide_empty", true);
+ craftQueueOverlayX = builder.comment("Sets the X screen location for the craft queue overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_X).defineInRange("craft_queue_x", 10, -1000, 10000);
+ craftQueueOverlayY = builder.comment("Sets the Y screen location for the craft queue overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_Y).defineInRange("craft_queue_y", 60, -1000, 10000);
+ craftQueueOverlayWidth = builder.comment("Sets the width of the craft queue overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_WIDTH).defineInRange("craft_queue_width", 300, 100, 10000);
+ craftQueueOverlayHeight = builder.comment("Sets the height of the craft queue overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_HEIGHT).defineInRange("craft_queue_height", 500, 100, 10000);
builder.pop();
}
@@ -63,11 +97,61 @@ public ClientConfig(ForgeConfigSpec.Builder builder) {
{
builder.push("ShoppingList");
- SHOPPING_LIST_OVERLAY_HIDE_EMPTY = builder.comment("Sets whether the 'shopping list' overlay should be displayed only when it has items in it.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_HIDE_EMPTY).define("shopping_list_hide_empty", true);
- SHOPPING_LIST_OVERLAY_X = builder.comment("Sets the X screen location for the 'shopping list' overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_X).defineInRange("shopping_list_x", -10, -1000, 10000);
- SHOPPING_LIST_OVERLAY_Y = builder.comment("Sets the Y screen location for the 'shopping list' overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_Y).defineInRange("shopping_list_y", 60, -1000, 10000);
- SHOPPING_LIST_OVERLAY_WIDTH = builder.comment("Sets the width of the 'shopping list' overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_WIDTH).defineInRange("shopping_list_width", 300, 100, 10000);
- SHOPPING_LIST_OVERLAY_HEIGHT = builder.comment("Sets the height of the 'shopping list' overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_HEIGHT).defineInRange("shopping_list_height", 500, 100, 10000);
+ shoppingListOverlayHideEmpty = builder.comment("Sets whether the 'shopping list' overlay should be displayed only when it has items in it.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_HIDE_EMPTY).define("shopping_list_hide_empty", true);
+ shoppingListOverlayX = builder.comment("Sets the X screen location for the 'shopping list' overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_X).defineInRange("shopping_list_x", -10, -1000, 10000);
+ shoppingListOverlayY = builder.comment("Sets the Y screen location for the 'shopping list' overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_Y).defineInRange("shopping_list_y", 60, -1000, 10000);
+ shoppingListOverlayWidth = builder.comment("Sets the width of the 'shopping list' overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_WIDTH).defineInRange("shopping_list_width", 300, 100, 10000);
+ shoppingListOverlayHeight = builder.comment("Sets the height of the 'shopping list' overlay.").translation(Constants.TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_HEIGHT).defineInRange("shopping_list_height", 500, 100, 10000);
+
+ builder.pop();
+ }
+ }
+ }
+
+ public static class CommonConfig {
+
+ public Map tagEntries = new HashMap<>();
+ public Map overrideEntries = new HashMap<>();
+ public Map namespaceEntries = new HashMap<>();
+ public Map recipeTypeEntries = new HashMap<>();
+
+ public CommonConfig(ForgeConfigSpec.Builder builder) {
+ {
+ builder.push("Costs By Tag");
+
+ Costs.tags.forEach((k, v) -> {
+ tagEntries.put(k, builder.comment("A tag and corresponding cost").defineInRange(k, v, 1, 10000));
+ });
+
+ builder.pop();
+ }
+
+ {
+ builder.push("Cost Overrides");
+
+ Costs.itemOverrides.forEach((k, v) -> {
+ overrideEntries.put(k, builder.comment("An item and corresponding cost override").defineInRange(k, v, 1, 10000));
+ });
+
+ builder.pop();
+ }
+
+ {
+ builder.push("Namespace Multipliers");
+
+ Multipliers.namespaces.forEach((k, v) -> {
+ namespaceEntries.put(k, builder.comment("A namespace and the multiplier associated with it").defineInRange(k, v, 0.1f, 100f));
+ });
+
+ builder.pop();
+ }
+
+ {
+ builder.push("Recipe Type Multipliers");
+
+ Multipliers.recipeTypes.forEach((k, v) -> {
+ recipeTypeEntries.put(k, builder.comment("A recipe type and the multiplier associated with it").defineInRange(k, v, 0.1f, 100f));
+ });
builder.pop();
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/lib/Constants.java b/src/main/java/com/sweetrpg/crafttracker/common/lib/Constants.java
index 841589b..ecff7c4 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/lib/Constants.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/lib/Constants.java
@@ -56,6 +56,10 @@ public class Constants {
public static final String TRANSLATION_KEY_GUI_MSG_SLIST_OVERLAY_MODE_SHOW = "crafttracker.msg.shopping_list_overlay_mode.show";
public static final String TRANSLATION_KEY_GUI_MSG_SLIST_OVERLAY_MODE_DYNAMIC = "crafttracker.msg.shopping_list_overlay_mode.dynamic";
+ // Config
+ public static final String TRANSLATION_KEY_CONFIG_CLIENT_CALC_DEPTH = "crafttracker.config.client.calculation_depth";
+ public static final String TRANSLATION_KEY_CONFIG_CLIENT_NON_VANILLA_COST_MULTIPLIER = "crafttracker.config.client.non_vanilla_cost_multiplier";
+ public static final String TRANSLATION_KEY_CONFIG_CLIENT_NON_CRAFTING_COST_MULTIPLIER = "crafttracker.config.client.non_crafting_cost_multiplier";
public static final String TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_X = "crafttracker.config.client.craft_queue_x";
public static final String TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_Y = "crafttracker.config.client.craft_queue_y";
public static final String TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_WIDTH = "crafttracker.config.client.craft_queue_width";
@@ -66,6 +70,8 @@ public class Constants {
public static final String TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_HEIGHT = "crafttracker.config.client.shopping_list_height";
public static final String TRANSLATION_KEY_CONFIG_CLIENT_CRAFT_QUEUE_HIDE_EMPTY = "crafttracker.config.client.craft_queue_hide_empty";
public static final String TRANSLATION_KEY_CONFIG_CLIENT_SHOPPING_LIST_HIDE_EMPTY = "crafttracker.config.client.shopping_list_hide_empty";
+ public static final String TRANSLATION_KEY_CONFIG_COMMON_COSTS_BY_TAG_TAGS = "crafttracker.config.common.costs_by_tag.tags";
+ public static final String TRANSLATION_KEY_CONFIG_COMMON_COST_OVERRIDES_ITEMS = "crafttracker.config.common.cost_overrides.items";
// Advancements
public static final String TRANSLATION_KEY_ADVANCEMENT_ROOT_TITLE = "advancements.crafttracker.main.root.title";
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/lib/Costs.java b/src/main/java/com/sweetrpg/crafttracker/common/lib/Costs.java
new file mode 100644
index 0000000..f1b7da8
--- /dev/null
+++ b/src/main/java/com/sweetrpg/crafttracker/common/lib/Costs.java
@@ -0,0 +1,1085 @@
+package com.sweetrpg.crafttracker.common.lib;
+
+import java.util.Map;
+
+import static java.util.Map.entry;
+
+public class Costs {
+
+ public static final Map tags = Map.ofEntries(
+ entry("c:animal_foods", 10),
+ entry("c:armors", 10),
+ entry("c:barrels/wooden", 10),
+ entry("c:barrels", 10),
+ entry("c:bookshelves", 10),
+ entry("c:bricks/nether", 10),
+ entry("c:bricks/normal", 10),
+ entry("c:bricks", 10),
+ entry("c:buckets/empty", 10),
+ entry("c:buckets/entity_water", 10),
+ entry("c:buckets/lava", 10),
+ entry("c:buckets/milk", 10),
+ entry("c:buckets/powder_snow", 10),
+ entry("c:buckets/water", 10),
+ entry("c:buckets", 10),
+ entry("c:budding_blocks", 10),
+ entry("c:buds", 10),
+ entry("c:chains", 10),
+ entry("c:chests/wooden", 10),
+ entry("c:chests", 10),
+ entry("c:clusters", 10),
+ entry("c:cobblestones", 10),
+ entry("c:concrete_powders", 10),
+ entry("c:concretes", 10),
+ entry("c:crops/beetroot", 10),
+ entry("c:crops/cactus", 10),
+ entry("c:crops/carrot", 10),
+ entry("c:crops/cocoa_bean", 10),
+ entry("c:crops/melon", 10),
+ entry("c:crops/nether_wart", 10),
+ entry("c:crops/potato", 10),
+ entry("c:crops/pumpkin", 10),
+ entry("c:crops/sugar_cane", 10),
+ entry("c:crops/wheat", 10),
+ entry("c:crops", 10),
+ entry("c:dusts/glowstone", 10),
+ entry("c:dusts/redstone", 10),
+ entry("c:dusts", 10),
+ entry("c:dyed/black", 10),
+ entry("c:dyed/blue", 10),
+ entry("c:dyed/brown", 10),
+ entry("c:dyed/cyan", 10),
+ entry("c:dyed/gray", 10),
+ entry("c:dyed/green", 10),
+ entry("c:dyed/light_blue", 10),
+ entry("c:dyed/light_gray", 10),
+ entry("c:dyed/lime", 10),
+ entry("c:dyed/magenta", 10),
+ entry("c:dyed/orange", 10),
+ entry("c:dyed/pink", 10),
+ entry("c:dyed/purple", 10),
+ entry("c:dyed/red", 10),
+ entry("c:dyed/white", 10),
+ entry("c:dyed/yellow", 10),
+ entry("c:dyed", 10),
+ entry("c:dyes/black", 10),
+ entry("c:dyes/blue", 10),
+ entry("c:dyes/brown", 10),
+ entry("c:dyes/cyan", 10),
+ entry("c:dyes/gray", 10),
+ entry("c:dyes/green", 10),
+ entry("c:dyes/light_blue", 10),
+ entry("c:dyes/light_gray", 10),
+ entry("c:dyes/lime", 10),
+ entry("c:dyes/magenta", 10),
+ entry("c:dyes/orange", 10),
+ entry("c:dyes/pink", 10),
+ entry("c:dyes/purple", 10),
+ entry("c:dyes/red", 10),
+ entry("c:dyes/white", 10),
+ entry("c:dyes/yellow", 10),
+ entry("c:dyes", 10),
+ entry("c:enchantables", 10),
+ entry("c:ender_pearls", 10),
+ entry("c:fertilizers", 10),
+ entry("c:foods/berry", 10),
+ entry("c:foods/bread", 10),
+ entry("c:foods/candy", 10),
+ entry("c:foods/cooked_fish", 10),
+ entry("c:foods/cooked_meat", 10),
+ entry("c:foods/cookie", 10),
+ entry("c:foods/edible_when_placed", 10),
+ entry("c:foods/food_poisoning", 10),
+ entry("c:foods/fruit", 10),
+ entry("c:foods/golden", 10),
+ entry("c:foods/raw_fish", 10),
+ entry("c:foods/raw_meat", 10),
+ entry("c:foods/soup", 10),
+ entry("c:foods/vegetable", 10),
+ entry("c:foods", 10),
+ entry("c:gems/amethyst", 10),
+ entry("c:gems/diamond", 10),
+ entry("c:gems/emerald", 10),
+ entry("c:gems/lapis", 10),
+ entry("c:gems/prismarine", 10),
+ entry("c:gems/quartz", 10),
+ entry("c:gems", 10),
+ entry("c:glass_blocks/cheap", 10),
+ entry("c:glass_blocks/colorless", 10),
+ entry("c:glass_blocks/tinted", 10),
+ entry("c:glass_blocks", 10),
+ entry("c:glass_panes/colorless", 10),
+ entry("c:glass_panes", 10),
+ entry("c:glazed_terracottas", 10),
+ entry("c:hidden_from_recipe_viewers", 10),
+ entry("c:ingots/copper", 10),
+ entry("c:ingots/gold", 10),
+ entry("c:ingots/iron", 10),
+ entry("c:ingots/netherite", 10),
+ entry("c:ingots", 10),
+ entry("c:leathers", 10),
+ entry("c:music_discs", 10),
+ entry("c:nuggets/gold", 10),
+ entry("c:nuggets/iron", 10),
+ entry("c:nuggets", 10),
+ entry("c:obsidians/crying", 10),
+ entry("c:obsidians/normal", 10),
+ entry("c:obsidians", 10),
+ entry("c:ores/netherite_scrap", 10),
+ entry("c:ores/quartz", 10),
+ entry("c:ores", 10),
+ entry("c:player_workstations/crafting_tables", 10),
+ entry("c:player_workstations/furnaces", 10),
+ entry("c:raw_materials/copper", 10),
+ entry("c:raw_materials/gold", 10),
+ entry("c:raw_materials/iron", 10),
+ entry("c:raw_materials", 10),
+ entry("c:relocation_not_supported", 10),
+ entry("c:rods/blaze", 10),
+ entry("c:rods/breeze", 10),
+ entry("c:rods/wooden", 10),
+ entry("c:rods", 10),
+ entry("c:ropes", 10),
+ entry("c:sandstone/blocks", 10),
+ entry("c:sandstone/red_blocks", 10),
+ entry("c:sandstone/red_slabs", 10),
+ entry("c:sandstone/red_stairs", 10),
+ entry("c:sandstone/slabs", 10),
+ entry("c:sandstone/stairs", 10),
+ entry("c:sandstone/uncolored_blocks", 10),
+ entry("c:sandstone/uncolored_slabs", 10),
+ entry("c:sandstone/uncolored_stairs", 10),
+ entry("c:shulker_boxes", 10),
+ entry("c:skulls", 10),
+ entry("c:slime_balls", 10),
+ entry("c:stones", 10),
+ entry("c:storage_blocks/bone_meal", 10),
+ entry("c:storage_blocks/coal", 10),
+ entry("c:storage_blocks/copper", 10),
+ entry("c:storage_blocks/diamond", 10),
+ entry("c:storage_blocks/dried_kelp", 10),
+ entry("c:storage_blocks/emerald", 10),
+ entry("c:storage_blocks/gold", 10),
+ entry("c:storage_blocks/iron", 10),
+ entry("c:storage_blocks/lapis", 10),
+ entry("c:storage_blocks/netherite", 10),
+ entry("c:storage_blocks/raw_copper", 10),
+ entry("c:storage_blocks/raw_gold", 10),
+ entry("c:storage_blocks/raw_iron", 10),
+ entry("c:storage_blocks/redstone", 10),
+ entry("c:storage_blocks/slime", 10),
+ entry("c:storage_blocks/wheat", 10),
+ entry("c:storage_blocks", 10),
+ entry("c:strings", 10),
+ entry("c:tools/bow", 10),
+ entry("c:tools/brush", 10),
+ entry("c:tools/crossbow", 10),
+ entry("c:tools/fishing_rod", 10),
+ entry("c:tools/igniter", 10),
+ entry("c:tools/mace", 10),
+ entry("c:tools/melee_weapon", 10),
+ entry("c:tools/mining_tool", 10),
+ entry("c:tools/ranged_weapon", 10),
+ entry("c:tools/shear", 10),
+ entry("c:tools/shield", 10),
+ entry("c:tools/spear", 10),
+ entry("c:tools", 10),
+ entry("c:villager_job_sites", 10),
+ entry("forge:anvil", 10),
+ entry("forge:arrows", 10),
+ entry("forge:banners", 10),
+ entry("forge:barrels_wooden", 10),
+ entry("forge:barrels", 10),
+ entry("forge:beds", 10),
+ entry("forge:boats", 20),
+ entry("forge:bones", 5),
+ entry("forge:bookshelves", 50),
+ entry("forge:buttons", 10),
+ entry("forge:candles", 10),
+ entry("forge:carpets", 10),
+ entry("forge:chests/ender", 475),
+ entry("forge:chests/trapped", 10),
+ entry("forge:chests/wooden", 10),
+ entry("forge:chests", 10),
+ entry("forge:coal_ores", 20),
+ entry("forge:coals", 20),
+ entry("forge:cobblestone/deepslate", 7),
+ entry("forge:cobblestone/infested", 10),
+ entry("forge:cobblestone/mossy", 10),
+ entry("forge:cobblestone/normal", 5),
+ entry("forge:cobblestone", 5),
+ entry("forge:copper_ores", 50),
+ entry("forge:crimson_stems", 10),
+ entry("forge:crops", 10),
+ entry("forge:diamond_ores", 500),
+ entry("forge:dirt", 1),
+ entry("forge:doors", 10),
+ entry("forge:dusts/glowstone", 137),
+ entry("forge:dusts/prismarine", 250),
+ entry("forge:dusts/redstone", 137),
+ entry("forge:dusts", 120),
+ entry("forge:dyes/black", 15),
+ entry("forge:dyes/blue", 10),
+ entry("forge:dyes/brown", 10),
+ entry("forge:dyes/cyan", 10),
+ entry("forge:dyes/gray", 10),
+ entry("forge:dyes/green", 15),
+ entry("forge:dyes/light_blue", 10),
+ entry("forge:dyes/light_gray", 10),
+ entry("forge:dyes/lime", 10),
+ entry("forge:dyes/magenta", 10),
+ entry("forge:dyes/orange", 10),
+ entry("forge:dyes/pink", 10),
+ entry("forge:dyes/purple", 10),
+ entry("forge:dyes/red", 10),
+ entry("forge:dyes/white", 10),
+ entry("forge:dyes/yellow", 10),
+ entry("forge:dyes", 10),
+ entry("forge:eggs", 10),
+ entry("forge:emerald_ores", 400),
+ entry("forge:enchanting_fuels", 100),
+ entry("forge:end_stones", 150),
+ entry("forge:ender_pearls", 150),
+ entry("forge:enderman_place_on_blacklist", 10),
+ entry("forge:feathers", 10),
+ entry("forge:fence_gates/wooden", 10),
+ entry("forge:fence_gates", 10),
+ entry("forge:fences/nether_brick", 10),
+ entry("forge:fences/wooden", 10),
+ entry("forge:fences", 10),
+ entry("forge:fishes", 10),
+ entry("forge:flowers", 5),
+ entry("forge:foods/pie", 10),
+ entry("forge:gems/amethyst", 150),
+ entry("forge:gems/diamond", 500),
+ entry("forge:gems/emerald", 400),
+ entry("forge:gems/lapis", 250),
+ entry("forge:gems/prismarine", 250),
+ entry("forge:gems/quartz", 300),
+ entry("forge:gems", 150),
+ entry("forge:glass_panes", 20),
+ entry("forge:glass_silica", 20),
+ entry("forge:glass_tinted", 20),
+ entry("forge:glass", 10),
+ entry("forge:gold_ores", 250),
+ entry("forge:gravel", 2),
+ entry("forge:gunpowder", 50),
+ entry("forge:heads", 100),
+ entry("forge:ingots/brick", 16),
+ entry("forge:ingots/copper", 55),
+ entry("forge:ingots/gold", 310),
+ entry("forge:ingots/iron", 110),
+ entry("forge:ingots/nether_brick", 20),
+ entry("forge:ingots/netherite", 750),
+ entry("forge:ingots", 15),
+ entry("forge:iron_ores", 110),
+ entry("forge:lapis_ores", 250),
+ entry("forge:leather", 50),
+ entry("forge:leaves", 2),
+ entry("forge:lectern_books", 100),
+ entry("forge:logs_that_burn", 10),
+ entry("forge:logs", 10),
+ entry("forge:mushrooms", 2),
+ entry("forge:music_discs", 10),
+ entry("forge:nether_stars", 900),
+ entry("forge:netherrack", 5),
+ entry("forge:non_flammable_wood", 10),
+ entry("forge:nuggets/gold", 33),
+ entry("forge:nuggets/iron", 11),
+ entry("forge:nuggets", 2),
+ entry("forge:obsidian", 400),
+ entry("forge:ore_bearing_ground/deepslate", 10),
+ entry("forge:ore_bearing_ground/netherrack", 10),
+ entry("forge:ore_bearing_ground/stone", 10),
+ entry("forge:ore_rates/dense", 10),
+ entry("forge:ore_rates/singular", 10),
+ entry("forge:ore_rates/sparse", 10),
+ entry("forge:ores_in_ground/deepslate", 10),
+ entry("forge:ores_in_ground/netherrack", 10),
+ entry("forge:ores_in_ground/stone", 10),
+ entry("forge:ores/coal", 25),
+ entry("forge:ores/copper", 50),
+ entry("forge:ores/diamond", 500),
+ entry("forge:ores/emerald", 400),
+ entry("forge:ores/gold", 300),
+ entry("forge:ores/iron", 100),
+ entry("forge:ores/lapis", 250),
+ entry("forge:ores/netherite_scrap", 750),
+ entry("forge:ores/quartz", 300),
+ entry("forge:ores/redstone", 200),
+ entry("forge:ores", 10),
+ entry("forge:planks", 10),
+ entry("forge:rails", 10),
+ entry("forge:raw_materials/copper", 50),
+ entry("forge:raw_materials/gold", 300),
+ entry("forge:raw_materials/iron", 100),
+ entry("forge:raw_materials", 10),
+ entry("forge:redstone_ores", 200),
+ entry("forge:rods/blaze", 450),
+ entry("forge:rods/wooden", 10),
+ entry("forge:rods", 50),
+ entry("forge:sand/colorless", 10),
+ entry("forge:sand/red", 10),
+ entry("forge:sand", 10),
+ entry("forge:sandstone", 15),
+ entry("forge:saplings", 2),
+ entry("forge:seeds/beetroot", 10),
+ entry("forge:seeds/melon", 10),
+ entry("forge:seeds/pumpkin", 10),
+ entry("forge:seeds/wheat", 10),
+ entry("forge:seeds", 2),
+ entry("forge:shears", 10),
+ entry("forge:signs", 10),
+ entry("forge:slimeballs", 40),
+ entry("forge:small_flowers", 10),
+ entry("forge:soul_fire_base_blocks", 100),
+ entry("forge:stained_glass_panes", 10),
+ entry("forge:stained_glass", 10),
+ entry("forge:stone_bricks", 5),
+ entry("forge:stone", 5),
+ entry("forge:string", 15),
+ entry("forge:tall_flowers", 5),
+ entry("forge:terracotta", 100),
+ entry("forge:warped_stems", 250),
+ entry("forge:wooden_buttons", 10),
+ entry("forge:wooden_doors", 60),
+ entry("forge:wooden_fences", 10),
+ entry("forge:wooden_pressure_plates", 20),
+ entry("forge:wooden_slabs", 30),
+ entry("forge:wooden_stairs", 60),
+ entry("forge:wooden_trapdoors", 60),
+ entry("forge:wool", 10),
+ entry("minecraft:acacia_fence_gate", 10),
+ entry("minecraft:acacia_fence", 10),
+ entry("minecraft:allium", 10),
+ entry("minecraft:amethyst_cluster", 10),
+ entry("minecraft:amethyst_shard", 10),
+ entry("minecraft:ancient_debris", 10),
+ entry("minecraft:andesite", 10),
+ entry("minecraft:anvil", 10),
+ entry("minecraft:apple", 10),
+ entry("minecraft:arrows", 10),
+ entry("minecraft:axolotl_bucket", 10),
+ entry("minecraft:azure_bluet", 10),
+ entry("minecraft:baked_potato", 10),
+ entry("minecraft:bamboo_fence_gate", 10),
+ entry("minecraft:bamboo_fence", 10),
+ entry("minecraft:bamboo", 10),
+ entry("minecraft:banners", 10),
+ entry("minecraft:barrel", 10),
+ entry("minecraft:barrels_wooden", 10),
+ entry("minecraft:barrels", 10),
+ entry("minecraft:beds", 10),
+ entry("minecraft:beef", 10),
+ entry("minecraft:beetroot_seeds", 10),
+ entry("minecraft:beetroot_soup", 10),
+ entry("minecraft:beetroot", 10),
+ entry("minecraft:birch_fence_gate", 10),
+ entry("minecraft:birch_fence", 10),
+ entry("minecraft:black_banner", 10),
+ entry("minecraft:black_bed", 10),
+ entry("minecraft:black_candle", 10),
+ entry("minecraft:black_carpet", 10),
+ entry("minecraft:black_concrete_powder", 10),
+ entry("minecraft:black_concrete", 10),
+ entry("minecraft:black_dye", 10),
+ entry("minecraft:black_glazed_terracotta", 10),
+ entry("minecraft:black_shulker_box", 10),
+ entry("minecraft:black_stained_glass_pane", 10),
+ entry("minecraft:black_stained_glass", 10),
+ entry("minecraft:black_terracotta", 10),
+ entry("minecraft:black_wall_banner", 10),
+ entry("minecraft:black_wool", 10),
+ entry("minecraft:blackstone", 6),
+ entry("minecraft:blast_furnace", 10),
+ entry("minecraft:blaze_rod", 10),
+ entry("minecraft:blue_banner", 10),
+ entry("minecraft:blue_bed", 10),
+ entry("minecraft:blue_candle", 10),
+ entry("minecraft:blue_carpet", 10),
+ entry("minecraft:blue_concrete_powder", 10),
+ entry("minecraft:blue_concrete", 10),
+ entry("minecraft:blue_dye", 10),
+ entry("minecraft:blue_glazed_terracotta", 10),
+ entry("minecraft:blue_orchid", 10),
+ entry("minecraft:blue_shulker_box", 10),
+ entry("minecraft:blue_stained_glass_pane", 10),
+ entry("minecraft:blue_stained_glass", 10),
+ entry("minecraft:blue_terracotta", 10),
+ entry("minecraft:blue_wall_banner", 10),
+ entry("minecraft:blue_wool", 10),
+ entry("minecraft:boats", 20),
+ entry("minecraft:bone_block", 10),
+ entry("minecraft:bone_meal", 10),
+ entry("minecraft:bone", 10),
+ entry("minecraft:bones", 5),
+ entry("minecraft:bookshelf", 10),
+ entry("minecraft:bookshelves", 50),
+ entry("minecraft:bow", 10),
+ entry("minecraft:bread", 10),
+ entry("minecraft:breeze_rod", 10),
+ entry("minecraft:brewing_stand", 10),
+ entry("minecraft:brick", 10),
+ entry("minecraft:brown_banner", 10),
+ entry("minecraft:brown_bed", 10),
+ entry("minecraft:brown_candle", 10),
+ entry("minecraft:brown_carpet", 10),
+ entry("minecraft:brown_concrete_powder", 10),
+ entry("minecraft:brown_concrete", 10),
+ entry("minecraft:brown_dye", 10),
+ entry("minecraft:brown_glazed_terracotta", 10),
+ entry("minecraft:brown_mushroom", 10),
+ entry("minecraft:brown_shulker_box", 10),
+ entry("minecraft:brown_stained_glass_pane", 10),
+ entry("minecraft:brown_stained_glass", 10),
+ entry("minecraft:brown_terracotta", 10),
+ entry("minecraft:brown_wall_banner", 10),
+ entry("minecraft:brown_wool", 10),
+ entry("minecraft:brush", 10),
+ entry("minecraft:bucket", 10),
+ entry("minecraft:budding_amethyst", 10),
+ entry("minecraft:buttons", 10),
+ entry("minecraft:cactus", 10),
+ entry("minecraft:cake", 10),
+ entry("minecraft:candles", 10),
+ entry("minecraft:carpets", 10),
+ entry("minecraft:carrot_on_a_stick", 10),
+ entry("minecraft:carrot", 10),
+ entry("minecraft:cartography_table", 10),
+ entry("minecraft:carved_pumpkin", 10),
+ entry("minecraft:cauldron", 10),
+ entry("minecraft:chain", 10),
+ entry("minecraft:chainmail_boots", 10),
+ entry("minecraft:chainmail_chestplate", 10),
+ entry("minecraft:chainmail_helmet", 10),
+ entry("minecraft:chainmail_leggings", 10),
+ entry("minecraft:cherry_fence_gate", 10),
+ entry("minecraft:cherry_fence", 10),
+ entry("minecraft:cherry_leaves", 10),
+ entry("minecraft:chest", 10),
+ entry("minecraft:chests_ender", 475),
+ entry("minecraft:chests_trapped", 10),
+ entry("minecraft:chests_wooden", 10),
+ entry("minecraft:chests", 10),
+ entry("minecraft:chicken", 10),
+ entry("minecraft:chiseled_red_sandstone", 10),
+ entry("minecraft:chiseled_sandstone", 10),
+ entry("minecraft:chorus_flower", 10),
+ entry("minecraft:chorus_fruit", 10),
+ entry("minecraft:coal_block", 10),
+ entry("minecraft:coal_ore", 20),
+ entry("minecraft:coal_ores", 20),
+ entry("minecraft:coals", 20),
+ entry("minecraft:cobbled_deepslate", 10),
+ entry("minecraft:cobblestone_deepslate", 7),
+ entry("minecraft:cobblestone_mossy", 10),
+ entry("minecraft:cobblestone_normal", 5),
+ entry("minecraft:cobblestone", 5),
+ entry("minecraft:cocoa_beans", 10),
+ entry("minecraft:cod_bucket", 10),
+ entry("minecraft:cod", 10),
+ entry("minecraft:compass", 10),
+ entry("minecraft:composter", 10),
+ entry("minecraft:cooked_beef", 10),
+ entry("minecraft:cooked_chicken", 10),
+ entry("minecraft:cooked_cod", 10),
+ entry("minecraft:cooked_mutton", 10),
+ entry("minecraft:cooked_porkchop", 10),
+ entry("minecraft:cooked_rabbit", 10),
+ entry("minecraft:cooked_salmon", 10),
+ entry("minecraft:cookie", 10),
+ entry("minecraft:copper_block", 10),
+ entry("minecraft:copper_ingot", 10),
+ entry("minecraft:copper_ore", 10),
+ entry("minecraft:copper_ores", 50),
+ entry("minecraft:cornflower", 10),
+ entry("minecraft:crafting_table", 10),
+ entry("minecraft:creeper_head", 10),
+ entry("minecraft:creeper_wall_head", 10),
+ entry("minecraft:crimson_fence_gate", 10),
+ entry("minecraft:crimson_fence", 10),
+ entry("minecraft:crimson_fungus", 10),
+ entry("minecraft:crimson_stems", 10),
+ entry("minecraft:crops", 10),
+ entry("minecraft:crossbow", 10),
+ entry("minecraft:crying_obsidian", 10),
+ entry("minecraft:cut_red_sandstone_slab", 10),
+ entry("minecraft:cut_red_sandstone", 10),
+ entry("minecraft:cut_sandstone_slab", 10),
+ entry("minecraft:cut_sandstone", 10),
+ entry("minecraft:cyan_banner", 10),
+ entry("minecraft:cyan_bed", 10),
+ entry("minecraft:cyan_candle", 10),
+ entry("minecraft:cyan_carpet", 10),
+ entry("minecraft:cyan_concrete_powder", 10),
+ entry("minecraft:cyan_concrete", 10),
+ entry("minecraft:cyan_dye", 10),
+ entry("minecraft:cyan_glazed_terracotta", 10),
+ entry("minecraft:cyan_shulker_box", 10),
+ entry("minecraft:cyan_stained_glass_pane", 10),
+ entry("minecraft:cyan_stained_glass", 10),
+ entry("minecraft:cyan_terracotta", 10),
+ entry("minecraft:cyan_wall_banner", 10),
+ entry("minecraft:cyan_wool", 10),
+ entry("minecraft:dandelion", 10),
+ entry("minecraft:dark_oak_fence_gate", 10),
+ entry("minecraft:dark_oak_fence", 10),
+ entry("minecraft:deepslate_coal_ore", 10),
+ entry("minecraft:deepslate_copper_ore", 10),
+ entry("minecraft:deepslate_diamond_ore", 10),
+ entry("minecraft:deepslate_emerald_ore", 10),
+ entry("minecraft:deepslate_gold_ore", 10),
+ entry("minecraft:deepslate_iron_ore", 10),
+ entry("minecraft:deepslate_lapis_ore", 10),
+ entry("minecraft:deepslate_redstone_ore", 10),
+ entry("minecraft:deepslate", 10),
+ entry("minecraft:diamond_axe", 10),
+ entry("minecraft:diamond_block", 10),
+ entry("minecraft:diamond_boots", 10),
+ entry("minecraft:diamond_chestplate", 10),
+ entry("minecraft:diamond_helmet", 10),
+ entry("minecraft:diamond_hoe", 10),
+ entry("minecraft:diamond_leggings", 10),
+ entry("minecraft:diamond_ore", 10),
+ entry("minecraft:diamond_ores", 500),
+ entry("minecraft:diamond_pickaxe", 10),
+ entry("minecraft:diamond_shovel", 10),
+ entry("minecraft:diamond_sword", 10),
+ entry("minecraft:diamond", 10),
+ entry("minecraft:diorite", 10),
+ entry("minecraft:dirt", 1),
+ entry("minecraft:doors", 10),
+ entry("minecraft:dragon_head", 10),
+ entry("minecraft:dragon_wall_head", 10),
+ entry("minecraft:dried_kelp_block", 10),
+ entry("minecraft:dried_kelp", 10),
+ entry("minecraft:dusts_glowstone", 137),
+ entry("minecraft:dusts_prismarine", 250),
+ entry("minecraft:dusts_redstone", 137),
+ entry("minecraft:dusts", 120),
+ entry("minecraft:dyes_black", 15),
+ entry("minecraft:dyes_blue", 10),
+ entry("minecraft:dyes_brown", 10),
+ entry("minecraft:dyes_cyan", 10),
+ entry("minecraft:dyes_gray", 10),
+ entry("minecraft:dyes_green", 15),
+ entry("minecraft:dyes_light_blue", 10),
+ entry("minecraft:dyes_light_gray", 10),
+ entry("minecraft:dyes_lime", 10),
+ entry("minecraft:dyes_magenta", 10),
+ entry("minecraft:dyes_orange", 10),
+ entry("minecraft:dyes_pink", 10),
+ entry("minecraft:dyes_purple", 10),
+ entry("minecraft:dyes_red", 10),
+ entry("minecraft:dyes_white", 10),
+ entry("minecraft:dyes_yellow", 10),
+ entry("minecraft:dyes", 10),
+ entry("minecraft:egg", 10),
+ entry("minecraft:eggs", 10),
+ entry("minecraft:elytra", 10),
+ entry("minecraft:emerald_block", 10),
+ entry("minecraft:emerald_ore", 10),
+ entry("minecraft:emerald_ores", 400),
+ entry("minecraft:emerald", 10),
+ entry("minecraft:enchanted_golden_apple", 10),
+ entry("minecraft:enchanting_fuels", 100),
+ entry("minecraft:end_stone", 10),
+ entry("minecraft:end_stones", 150),
+ entry("minecraft:ender_chest", 10),
+ entry("minecraft:ender_pearl", 10),
+ entry("minecraft:ender_pearls", 150),
+ entry("minecraft:feather", 10),
+ entry("minecraft:feathers", 10),
+ entry("minecraft:fence_gates_wooden", 10),
+ entry("minecraft:fence_gates", 10),
+ entry("minecraft:fences_nether_brick", 10),
+ entry("minecraft:fences_wooden", 10),
+ entry("minecraft:fences", 10),
+ entry("minecraft:fishes", 10),
+ entry("minecraft:fishing_rod", 10),
+ entry("minecraft:fletching_table", 10),
+ entry("minecraft:flint_and_steel", 10),
+ entry("minecraft:flowering_azalea_leaves", 10),
+ entry("minecraft:flowering_azalea", 10),
+ entry("minecraft:flowers", 5),
+ entry("minecraft:furnace", 10),
+ entry("minecraft:gems_amethyst", 150),
+ entry("minecraft:gems_diamond", 500),
+ entry("minecraft:gems_emerald", 400),
+ entry("minecraft:gems_lapis", 250),
+ entry("minecraft:gems_prismarine", 250),
+ entry("minecraft:gems_quartz", 300),
+ entry("minecraft:gems", 150),
+ entry("minecraft:glass_pane", 20),
+ entry("minecraft:glass_panes", 20),
+ entry("minecraft:glass_silica", 20),
+ entry("minecraft:glass_tinted", 20),
+ entry("minecraft:glass", 10),
+ entry("minecraft:glow_berries", 10),
+ entry("minecraft:glowstone_dust", 10),
+ entry("minecraft:gold_block", 10),
+ entry("minecraft:gold_ingot", 10),
+ entry("minecraft:gold_nugget", 10),
+ entry("minecraft:gold_ore", 250),
+ entry("minecraft:gold_ores", 250),
+ entry("minecraft:golden_apple", 275),
+ entry("minecraft:golden_axe", 275),
+ entry("minecraft:golden_boots", 300),
+ entry("minecraft:golden_carrot", 250),
+ entry("minecraft:golden_chestplate", 300),
+ entry("minecraft:golden_helmet", 300),
+ entry("minecraft:golden_hoe", 300),
+ entry("minecraft:golden_leggings", 300),
+ entry("minecraft:golden_pickaxe", 275),
+ entry("minecraft:golden_shovel", 275),
+ entry("minecraft:golden_sword", 300),
+ entry("minecraft:granite", 10),
+ entry("minecraft:gravel", 2),
+ entry("minecraft:gray_banner", 10),
+ entry("minecraft:gray_bed", 10),
+ entry("minecraft:gray_candle", 10),
+ entry("minecraft:gray_carpet", 10),
+ entry("minecraft:gray_concrete_powder", 10),
+ entry("minecraft:gray_concrete", 10),
+ entry("minecraft:gray_dye", 10),
+ entry("minecraft:gray_glazed_terracotta", 10),
+ entry("minecraft:gray_shulker_box", 10),
+ entry("minecraft:gray_stained_glass_pane", 10),
+ entry("minecraft:gray_stained_glass", 10),
+ entry("minecraft:gray_terracotta", 10),
+ entry("minecraft:gray_wall_banner", 10),
+ entry("minecraft:gray_wool", 10),
+ entry("minecraft:green_banner", 10),
+ entry("minecraft:green_bed", 10),
+ entry("minecraft:green_candle", 10),
+ entry("minecraft:green_carpet", 10),
+ entry("minecraft:green_concrete_powder", 10),
+ entry("minecraft:green_concrete", 10),
+ entry("minecraft:green_dye", 10),
+ entry("minecraft:green_glazed_terracotta", 10),
+ entry("minecraft:green_shulker_box", 10),
+ entry("minecraft:green_stained_glass_pane", 10),
+ entry("minecraft:green_stained_glass", 10),
+ entry("minecraft:green_terracotta", 10),
+ entry("minecraft:green_wall_banner", 10),
+ entry("minecraft:green_wool", 10),
+ entry("minecraft:grindstone", 10),
+ entry("minecraft:gunpowder", 50),
+ entry("minecraft:hay_block", 10),
+ entry("minecraft:heads", 100),
+ entry("minecraft:honey_bottle", 10),
+ entry("minecraft:infested_cobblestone", 10),
+ entry("minecraft:ingots_brick", 16),
+ entry("minecraft:ingots_copper", 55),
+ entry("minecraft:ingots_gold", 310),
+ entry("minecraft:ingots_iron", 110),
+ entry("minecraft:ingots_nether_brick", 20),
+ entry("minecraft:ingots_netherite", 750),
+ entry("minecraft:ingots", 15),
+ entry("minecraft:iron_axe", 150),
+ entry("minecraft:iron_block", 150),
+ entry("minecraft:iron_boots", 150),
+ entry("minecraft:iron_chestplate", 150),
+ entry("minecraft:iron_helmet", 150),
+ entry("minecraft:iron_hoe", 150),
+ entry("minecraft:iron_ingot", 150),
+ entry("minecraft:iron_leggings", 150),
+ entry("minecraft:iron_nugget", 150),
+ entry("minecraft:iron_ore", 110),
+ entry("minecraft:iron_ores", 110),
+ entry("minecraft:iron_pickaxe", 150),
+ entry("minecraft:iron_shovel", 150),
+ entry("minecraft:iron_sword", 150),
+ entry("minecraft:jungle_fence_gate", 10),
+ entry("minecraft:jungle_fence", 10),
+ entry("minecraft:lapis_block", 400),
+ entry("minecraft:lapis_lazuli", 125),
+ entry("minecraft:lapis_ore", 250),
+ entry("minecraft:lapis_ores", 250),
+ entry("minecraft:large_amethyst_bud", 10),
+ entry("minecraft:lava_bucket", 10),
+ entry("minecraft:lava_cauldron", 10),
+ entry("minecraft:leather_boots", 10),
+ entry("minecraft:leather_chestplate", 10),
+ entry("minecraft:leather_helmet", 60),
+ entry("minecraft:leather_leggings", 60),
+ entry("minecraft:leather", 50),
+ entry("minecraft:leaves", 2),
+ entry("minecraft:lectern_books", 100),
+ entry("minecraft:lectern", 10),
+ entry("minecraft:light_blue_banner", 10),
+ entry("minecraft:light_blue_bed", 10),
+ entry("minecraft:light_blue_candle", 10),
+ entry("minecraft:light_blue_carpet", 10),
+ entry("minecraft:light_blue_concrete_powder", 10),
+ entry("minecraft:light_blue_concrete", 10),
+ entry("minecraft:light_blue_dye", 10),
+ entry("minecraft:light_blue_glazed_terracotta", 10),
+ entry("minecraft:light_blue_shulker_box", 10),
+ entry("minecraft:light_blue_stained_glass_pane", 10),
+ entry("minecraft:light_blue_stained_glass", 10),
+ entry("minecraft:light_blue_terracotta", 10),
+ entry("minecraft:light_blue_wall_banner", 10),
+ entry("minecraft:light_blue_wool", 10),
+ entry("minecraft:light_gray_banner", 10),
+ entry("minecraft:light_gray_bed", 10),
+ entry("minecraft:light_gray_candle", 10),
+ entry("minecraft:light_gray_carpet", 10),
+ entry("minecraft:light_gray_concrete_powder", 10),
+ entry("minecraft:light_gray_concrete", 10),
+ entry("minecraft:light_gray_dye", 10),
+ entry("minecraft:light_gray_glazed_terracotta", 10),
+ entry("minecraft:light_gray_shulker_box", 10),
+ entry("minecraft:light_gray_stained_glass_pane", 10),
+ entry("minecraft:light_gray_stained_glass", 10),
+ entry("minecraft:light_gray_terracotta", 10),
+ entry("minecraft:light_gray_wall_banner", 10),
+ entry("minecraft:light_gray_wool", 10),
+ entry("minecraft:lilac", 10),
+ entry("minecraft:lily_of_the_valley", 10),
+ entry("minecraft:lime_banner", 10),
+ entry("minecraft:lime_bed", 10),
+ entry("minecraft:lime_candle", 10),
+ entry("minecraft:lime_carpet", 10),
+ entry("minecraft:lime_concrete_powder", 10),
+ entry("minecraft:lime_concrete", 10),
+ entry("minecraft:lime_dye", 10),
+ entry("minecraft:lime_glazed_terracotta", 10),
+ entry("minecraft:lime_shulker_box", 10),
+ entry("minecraft:lime_stained_glass_pane", 10),
+ entry("minecraft:lime_stained_glass", 10),
+ entry("minecraft:lime_terracotta", 10),
+ entry("minecraft:lime_wall_banner", 10),
+ entry("minecraft:lime_wool", 10),
+ entry("minecraft:logs_that_burn", 10),
+ entry("minecraft:logs", 10),
+ entry("minecraft:loom", 10),
+ entry("minecraft:mace", 10),
+ entry("minecraft:magenta_banner", 10),
+ entry("minecraft:magenta_bed", 10),
+ entry("minecraft:magenta_candle", 10),
+ entry("minecraft:magenta_carpet", 10),
+ entry("minecraft:magenta_concrete_powder", 10),
+ entry("minecraft:magenta_concrete", 10),
+ entry("minecraft:magenta_dye", 10),
+ entry("minecraft:magenta_glazed_terracotta", 10),
+ entry("minecraft:magenta_shulker_box", 10),
+ entry("minecraft:magenta_stained_glass_pane", 10),
+ entry("minecraft:magenta_stained_glass", 10),
+ entry("minecraft:magenta_terracotta", 10),
+ entry("minecraft:magenta_wall_banner", 10),
+ entry("minecraft:magenta_wool", 10),
+ entry("minecraft:mangrove_fence_gate", 10),
+ entry("minecraft:mangrove_fence", 10),
+ entry("minecraft:mangrove_propagule", 10),
+ entry("minecraft:medium_amethyst_bud", 10),
+ entry("minecraft:melon_seeds", 10),
+ entry("minecraft:melon_slice", 10),
+ entry("minecraft:melon", 10),
+ entry("minecraft:milk_bucket", 10),
+ entry("minecraft:mossy_cobblestone", 10),
+ entry("minecraft:mushroom_stew", 10),
+ entry("minecraft:mushrooms", 2),
+ entry("minecraft:music_disc_11", 10),
+ entry("minecraft:music_disc_13", 10),
+ entry("minecraft:music_disc_5", 10),
+ entry("minecraft:music_disc_blocks", 10),
+ entry("minecraft:music_disc_cat", 10),
+ entry("minecraft:music_disc_chirp", 10),
+ entry("minecraft:music_disc_creator_music_box", 10),
+ entry("minecraft:music_disc_creator", 10),
+ entry("minecraft:music_disc_far", 10),
+ entry("minecraft:music_disc_mall", 10),
+ entry("minecraft:music_disc_mellohi", 10),
+ entry("minecraft:music_disc_otherside", 10),
+ entry("minecraft:music_disc_pigstep", 10),
+ entry("minecraft:music_disc_precipice", 10),
+ entry("minecraft:music_disc_relic", 10),
+ entry("minecraft:music_disc_stal", 10),
+ entry("minecraft:music_disc_strad", 10),
+ entry("minecraft:music_disc_wait", 10),
+ entry("minecraft:music_disc_ward", 10),
+ entry("minecraft:music_discs", 10),
+ entry("minecraft:mutton", 10),
+ entry("minecraft:nether_brick_fence", 10),
+ entry("minecraft:nether_brick", 10),
+ entry("minecraft:nether_gold_ore", 10),
+ entry("minecraft:nether_quartz_ore", 10),
+ entry("minecraft:nether_star", 900),
+ entry("minecraft:nether_stars", 900),
+ entry("minecraft:nether_wart", 10),
+ entry("minecraft:netherite_axe", 1000),
+ entry("minecraft:netherite_block", 1000),
+ entry("minecraft:netherite_boots", 1000),
+ entry("minecraft:netherite_chestplate", 1000),
+ entry("minecraft:netherite_helmet", 1000),
+ entry("minecraft:netherite_hoe", 1000),
+ entry("minecraft:netherite_ingot", 1000),
+ entry("minecraft:netherite_leggings", 1000),
+ entry("minecraft:netherite_pickaxe", 1000),
+ entry("minecraft:netherite_shovel", 1000),
+ entry("minecraft:netherite_sword", 1000),
+ entry("minecraft:netherrack", 5),
+ entry("minecraft:non_flammable_wood", 10),
+ entry("minecraft:nuggets_gold", 33),
+ entry("minecraft:nuggets_iron", 11),
+ entry("minecraft:nuggets", 2),
+ entry("minecraft:oak_fence_gate", 10),
+ entry("minecraft:oak_fence", 10),
+ entry("minecraft:obsidian", 400),
+ entry("minecraft:ominous_bottle", 10),
+ entry("minecraft:orange_banner", 10),
+ entry("minecraft:orange_bed", 10),
+ entry("minecraft:orange_candle", 10),
+ entry("minecraft:orange_carpet", 10),
+ entry("minecraft:orange_concrete_powder", 10),
+ entry("minecraft:orange_concrete", 10),
+ entry("minecraft:orange_dye", 10),
+ entry("minecraft:orange_glazed_terracotta", 10),
+ entry("minecraft:orange_shulker_box", 10),
+ entry("minecraft:orange_stained_glass_pane", 10),
+ entry("minecraft:orange_stained_glass", 10),
+ entry("minecraft:orange_terracotta", 10),
+ entry("minecraft:orange_tulip", 10),
+ entry("minecraft:orange_wall_banner", 10),
+ entry("minecraft:orange_wool", 10),
+ entry("minecraft:ore_bearing_ground_deepslate", 10),
+ entry("minecraft:ore_bearing_ground_netherrack", 10),
+ entry("minecraft:ore_bearing_ground_stone", 10),
+ entry("minecraft:ores_coal", 25),
+ entry("minecraft:ores_copper", 50),
+ entry("minecraft:ores_diamond", 500),
+ entry("minecraft:ores_emerald", 400),
+ entry("minecraft:ores_gold", 300),
+ entry("minecraft:ores_in_ground_deepslate", 10),
+ entry("minecraft:ores_in_ground_netherrack", 10),
+ entry("minecraft:ores_in_ground_stone", 10),
+ entry("minecraft:ores_iron", 100),
+ entry("minecraft:ores_lapis", 250),
+ entry("minecraft:ores_netherite_scrap", 750),
+ entry("minecraft:ores_quartz", 300),
+ entry("minecraft:ores_redstone", 200),
+ entry("minecraft:ores", 10),
+ entry("minecraft:oxeye_daisy", 10),
+ entry("minecraft:peony", 10),
+ entry("minecraft:piglin_head", 10),
+ entry("minecraft:piglin_wall_head", 10),
+ entry("minecraft:pink_banner", 10),
+ entry("minecraft:pink_bed", 10),
+ entry("minecraft:pink_candle", 10),
+ entry("minecraft:pink_carpet", 10),
+ entry("minecraft:pink_concrete_powder", 10),
+ entry("minecraft:pink_concrete", 10),
+ entry("minecraft:pink_dye", 10),
+ entry("minecraft:pink_glazed_terracotta", 10),
+ entry("minecraft:pink_petals", 10),
+ entry("minecraft:pink_shulker_box", 10),
+ entry("minecraft:pink_stained_glass_pane", 10),
+ entry("minecraft:pink_stained_glass", 10),
+ entry("minecraft:pink_terracotta", 10),
+ entry("minecraft:pink_tulip", 10),
+ entry("minecraft:pink_wall_banner", 10),
+ entry("minecraft:pink_wool", 10),
+ entry("minecraft:pitcher_plant", 10),
+ entry("minecraft:pitcher_pod", 10),
+ entry("minecraft:planks", 10),
+ entry("minecraft:player_head", 10),
+ entry("minecraft:player_wall_head", 10),
+ entry("minecraft:poisonous_potato", 10),
+ entry("minecraft:poppy", 10),
+ entry("minecraft:porkchop", 10),
+ entry("minecraft:potato", 10),
+ entry("minecraft:powder_snow_bucket", 10),
+ entry("minecraft:powder_snow_cauldron", 10),
+ entry("minecraft:prismarine_crystals", 10),
+ entry("minecraft:pufferfish_bucket", 10),
+ entry("minecraft:pufferfish", 10),
+ entry("minecraft:pumpkin_pie", 10),
+ entry("minecraft:pumpkin_seeds", 10),
+ entry("minecraft:pumpkin", 10),
+ entry("minecraft:purple_banner", 10),
+ entry("minecraft:purple_bed", 10),
+ entry("minecraft:purple_candle", 10),
+ entry("minecraft:purple_carpet", 10),
+ entry("minecraft:purple_concrete_powder", 10),
+ entry("minecraft:purple_concrete", 10),
+ entry("minecraft:purple_dye", 10),
+ entry("minecraft:purple_glazed_terracotta", 10),
+ entry("minecraft:purple_shulker_box", 10),
+ entry("minecraft:purple_stained_glass_pane", 10),
+ entry("minecraft:purple_stained_glass", 10),
+ entry("minecraft:purple_terracotta", 10),
+ entry("minecraft:purple_wall_banner", 10),
+ entry("minecraft:purple_wool", 10),
+ entry("minecraft:quartz", 10),
+ entry("minecraft:rabbit_stew", 10),
+ entry("minecraft:rabbit", 10),
+ entry("minecraft:rails", 10),
+ entry("minecraft:raw_copper_block", 10),
+ entry("minecraft:raw_copper", 10),
+ entry("minecraft:raw_gold_block", 300),
+ entry("minecraft:raw_gold", 300),
+ entry("minecraft:raw_iron_block", 100),
+ entry("minecraft:raw_iron", 100),
+ entry("minecraft:raw_materials_copper", 50),
+ entry("minecraft:raw_materials_gold", 300),
+ entry("minecraft:raw_materials_iron", 100),
+ entry("minecraft:raw_materials", 10),
+ entry("minecraft:red_banner", 10),
+ entry("minecraft:red_bed", 10),
+ entry("minecraft:red_candle", 10),
+ entry("minecraft:red_carpet", 10),
+ entry("minecraft:red_concrete_powder", 10),
+ entry("minecraft:red_concrete", 10),
+ entry("minecraft:red_dye", 10),
+ entry("minecraft:red_glazed_terracotta", 10),
+ entry("minecraft:red_mushroom", 10),
+ entry("minecraft:red_sand", 10),
+ entry("minecraft:red_sandstone_slab", 10),
+ entry("minecraft:red_sandstone_stairs", 10),
+ entry("minecraft:red_sandstone", 10),
+ entry("minecraft:red_shulker_box", 10),
+ entry("minecraft:red_stained_glass_pane", 10),
+ entry("minecraft:red_stained_glass", 10),
+ entry("minecraft:red_terracotta", 10),
+ entry("minecraft:red_tulip", 10),
+ entry("minecraft:red_wall_banner", 10),
+ entry("minecraft:red_wool", 10),
+ entry("minecraft:redstone_block", 600),
+ entry("minecraft:redstone_ore", 200),
+ entry("minecraft:redstone_ores", 200),
+ entry("minecraft:redstone", 200),
+ entry("minecraft:rods_blaze", 450),
+ entry("minecraft:rods_wooden", 50),
+ entry("minecraft:rods", 50),
+ entry("minecraft:rose_bush", 10),
+ entry("minecraft:rotten_flesh", 10),
+ entry("minecraft:salmon_bucket", 10),
+ entry("minecraft:salmon", 10),
+ entry("minecraft:sand_colorless", 10),
+ entry("minecraft:sand_red", 10),
+ entry("minecraft:sand", 10),
+ entry("minecraft:sandstone_slab", 10),
+ entry("minecraft:sandstone_stairs", 10),
+ entry("minecraft:sandstone", 15),
+ entry("minecraft:saplings", 2),
+ entry("minecraft:seagrass", 10),
+ entry("minecraft:seeds", 2),
+ entry("minecraft:shears", 10),
+ entry("minecraft:shield", 10),
+ entry("minecraft:shulker_box", 10),
+ entry("minecraft:signs", 10),
+ entry("minecraft:skeleton_skull", 10),
+ entry("minecraft:skeleton_wall_skull", 10),
+ entry("minecraft:slime_ball", 40),
+ entry("minecraft:slime_block", 100),
+ entry("minecraft:slimeballs", 40),
+ entry("minecraft:small_amethyst_bud", 10),
+ entry("minecraft:small_flowers", 10),
+ entry("minecraft:smithing_table", 10),
+ entry("minecraft:smoker", 10),
+ entry("minecraft:smooth_red_sandstone_slab", 10),
+ entry("minecraft:smooth_red_sandstone_stairs", 10),
+ entry("minecraft:smooth_red_sandstone", 10),
+ entry("minecraft:smooth_sandstone_slab", 10),
+ entry("minecraft:smooth_sandstone_stairs", 10),
+ entry("minecraft:smooth_sandstone", 10),
+ entry("minecraft:soul_fire_base_blocks", 100),
+ entry("minecraft:spider_eye", 10),
+ entry("minecraft:spore_blossom", 10),
+ entry("minecraft:spruce_fence_gate", 10),
+ entry("minecraft:spruce_fence", 10),
+ entry("minecraft:stained_glass_panes", 10),
+ entry("minecraft:stained_glass", 10),
+ entry("minecraft:stick", 10),
+ entry("minecraft:stone_axe", 10),
+ entry("minecraft:stone_bricks", 5),
+ entry("minecraft:stone_crafting_materials", 5),
+ entry("minecraft:stone_hoe", 10),
+ entry("minecraft:stone_pickaxe", 10),
+ entry("minecraft:stone_shovel", 10),
+ entry("minecraft:stone_sword", 10),
+ entry("minecraft:stone_tool_materials", 5),
+ entry("minecraft:stone", 5),
+ entry("minecraft:stonecutter", 10),
+ entry("minecraft:string", 15),
+ entry("minecraft:sugar_cane", 10),
+ entry("minecraft:sugar", 10),
+ entry("minecraft:sunflower", 10),
+ entry("minecraft:suspicious_stew", 10),
+ entry("minecraft:sweet_berries", 10),
+ entry("minecraft:tadpole_bucket", 10),
+ entry("minecraft:tall_flowers", 5),
+ entry("minecraft:terracotta", 100),
+ entry("minecraft:tinted_glass", 10),
+ entry("minecraft:torchflower_seeds", 10),
+ entry("minecraft:torchflower", 10),
+ entry("minecraft:trapped_chest", 10),
+ entry("minecraft:trident", 10),
+ entry("minecraft:tropical_fish_bucket", 10),
+ entry("minecraft:tropical_fish", 10),
+ entry("minecraft:tuff", 10),
+ entry("minecraft:turtle_helmet", 10),
+ entry("minecraft:warped_fence_gate", 10),
+ entry("minecraft:warped_fence", 10),
+ entry("minecraft:warped_fungus_on_a_stick", 10),
+ entry("minecraft:warped_fungus", 10),
+ entry("minecraft:warped_stems", 250),
+ entry("minecraft:water_bucket", 10),
+ entry("minecraft:water_cauldron", 10),
+ entry("minecraft:wheat_seeds", 10),
+ entry("minecraft:wheat", 10),
+ entry("minecraft:white_banner", 10),
+ entry("minecraft:white_bed", 10),
+ entry("minecraft:white_candle", 10),
+ entry("minecraft:white_carpet", 10),
+ entry("minecraft:white_concrete_powder", 10),
+ entry("minecraft:white_concrete", 10),
+ entry("minecraft:white_dye", 10),
+ entry("minecraft:white_glazed_terracotta", 10),
+ entry("minecraft:white_shulker_box", 10),
+ entry("minecraft:white_stained_glass_pane", 10),
+ entry("minecraft:white_stained_glass", 10),
+ entry("minecraft:white_terracotta", 10),
+ entry("minecraft:white_tulip", 10),
+ entry("minecraft:white_wall_banner", 10),
+ entry("minecraft:white_wool", 10),
+ entry("minecraft:wither_rose", 10),
+ entry("minecraft:wither_skeleton_skull", 10),
+ entry("minecraft:wither_skeleton_wall_skull", 10),
+ entry("minecraft:wooden_axe", 10),
+ entry("minecraft:wooden_buttons", 10),
+ entry("minecraft:wooden_doors", 60),
+ entry("minecraft:wooden_fences", 10),
+ entry("minecraft:wooden_hoe", 10),
+ entry("minecraft:wooden_pickaxe", 10),
+ entry("minecraft:wooden_pressure_plates", 20),
+ entry("minecraft:wooden_shovel", 10),
+ entry("minecraft:wooden_slabs", 30),
+ entry("minecraft:wooden_stairs", 60),
+ entry("minecraft:wooden_sword", 10),
+ entry("minecraft:wooden_trapdoors", 60),
+ entry("minecraft:wool", 10),
+ entry("minecraft:yellow_banner", 10),
+ entry("minecraft:yellow_bed", 10),
+ entry("minecraft:yellow_candle", 10),
+ entry("minecraft:yellow_carpet", 10),
+ entry("minecraft:yellow_concrete_powder", 10),
+ entry("minecraft:yellow_concrete", 10),
+ entry("minecraft:yellow_dye", 10),
+ entry("minecraft:yellow_glazed_terracotta", 10),
+ entry("minecraft:yellow_shulker_box", 10),
+ entry("minecraft:yellow_stained_glass_pane", 10),
+ entry("minecraft:yellow_stained_glass", 10),
+ entry("minecraft:yellow_terracotta", 10),
+ entry("minecraft:yellow_wall_banner", 10),
+ entry("minecraft:yellow_wool", 10),
+ entry("minecraft:zombie_head", 10),
+ entry("minecraft:zombie_wall_head", 10)
+ );
+
+ public static final Map itemOverrides = Map.ofEntries(
+ entry("create:precision_mechanism", 250),
+ entry("minecraft:trapped_chest", 11)
+ );
+}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/lib/Multipliers.java b/src/main/java/com/sweetrpg/crafttracker/common/lib/Multipliers.java
new file mode 100644
index 0000000..d112082
--- /dev/null
+++ b/src/main/java/com/sweetrpg/crafttracker/common/lib/Multipliers.java
@@ -0,0 +1,20 @@
+package com.sweetrpg.crafttracker.common.lib;
+
+import java.util.Map;
+
+import static java.util.Map.entry;
+
+public class Multipliers {
+
+ public static final Map namespaces = Map.ofEntries(
+ entry("minecraft", 1f),
+ entry("create", 1.5f)
+ );
+
+ public static final Map recipeTypes = Map.ofEntries(
+ entry("minecraft:crafting", 1f),
+ entry("minecraft:smelting", 1.1f),
+ entry("minecraft:blasting", 1.2f),
+ entry("create:crushing", 1.1f)
+ );
+}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/manager/CraftingQueueManager.java b/src/main/java/com/sweetrpg/crafttracker/common/manager/CraftingQueueManager.java
index 4b0e2dc..da6bd27 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/manager/CraftingQueueManager.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/manager/CraftingQueueManager.java
@@ -1,6 +1,7 @@
package com.sweetrpg.crafttracker.common.manager;
import com.sweetrpg.crafttracker.CraftTracker;
+import com.sweetrpg.crafttracker.common.config.ConfigHandler;
import com.sweetrpg.crafttracker.common.model.CraftingQueueItem;
import com.sweetrpg.crafttracker.common.model.CraftingQueueProduct;
import com.sweetrpg.crafttracker.common.storage.CraftingQueueStorage;
@@ -24,10 +25,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.nio.file.FileAlreadyExistsException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.StandardOpenOption;
+import java.nio.file.*;
import java.text.MessageFormat;
import java.util.*;
@@ -41,8 +39,6 @@ public class CraftingQueueManager {
public static CraftingQueueManager INSTANCE = new CraftingQueueManager();
- private static final int MAX_PROCESSING_LEVEL = 3;
-
private Map endProducts = new HashMap<>();
private Map intermediateProducts = new HashMap<>();
private Map rawMaterials = new HashMap<>();
@@ -66,13 +62,15 @@ public void load(Player player) {
CraftTracker.LOGGER.debug("file: {}", file);
try {
- try (InputStream in = Files.newInputStream(file, StandardOpenOption.READ)) {
- var data = NbtIo.readCompressed(in);
- var products = CraftingQueueStorage.load(data);
- products.forEach((k, v) -> v.setRecipes(RecipeUtil.getRecipesFor(k)));
- this.endProducts = products;
- this.computeAll();
- }
+ InputStream in = Files.newInputStream(file, StandardOpenOption.READ);
+ var data = NbtIo.readCompressed(in);
+ var products = CraftingQueueStorage.load(data);
+ products.forEach((k, v) -> v.setRecipes(RecipeUtil.getRecipesFor(k)));
+ this.endProducts = products;
+ this.computeAll();
+ }
+ catch (NoSuchFileException e) {
+ // ignore
}
catch (IOException e) {
CraftTracker.LOGGER.error("An error occurred while loading crafting queue [" + file + "]", e);
@@ -164,8 +162,8 @@ public List getFuel() {
*
* This will trigger a recalculation of the entire queue.
*
- * @param player The player whose queue is being adjusted
- * @param itemId The item to add to the queue
+ * @param player The player whose queue is being adjusted
+ * @param itemId The item to add to the queue
* @param quantity The amount to add
*/
public void addProduct(Player player, ResourceLocation itemId, int quantity) {
@@ -195,8 +193,8 @@ public void addProduct(Player player, ResourceLocation itemId, int quantity) {
* A convenience method to adjust the quantity of a product.
* This will call the appropriate add* or remove* method.
*
- * @param player The player whose queue is being adjusted
- * @param itemId The item to adjust
+ * @param player The player whose queue is being adjusted
+ * @param itemId The item to adjust
* @param quantity The amount to adjust; positive values will increase the amount, negative values will reduce it.
*/
public void adjustProduct(Player player, ResourceLocation itemId, int quantity) {
@@ -227,8 +225,8 @@ public void removeProduct(Player player, ResourceLocation itemId) {
/**
* Removes a single end product, or a quantity of it, from the queue.
*
- * @param player The player whose queue is being adjusted
- * @param itemId The item to remove from the queue
+ * @param player The player whose queue is being adjusted
+ * @param itemId The item to remove from the queue
* @param quantity The amount of the item to remove. If this value is the greater than or equal to the amount
* currently in the queue, the item is removed entirely.
*/
@@ -280,10 +278,6 @@ public void removeAll() {
public void computeAll() {
CraftTracker.LOGGER.debug("CraftingQueueManager#computeAll");
-// this.intermediateProducts.clear();
-// this.rawMaterials.clear();
-// this.fuel.clear();
-
ProcessingContext ctx = new ProcessingContext();
this.endProducts.forEach((k, v) -> {
@@ -300,7 +294,7 @@ public void computeAll() {
/**
* Starts the computation of an end product's intermediates and materials.
*
- * @param ctx The context to use for processing the queue
+ * @param ctx The context to use for processing the queue
* @param product The product to process
*/
void computeProduct(ProcessingContext ctx, CraftingQueueProduct product) {
@@ -363,10 +357,10 @@ void coalesceProducts(ProcessingContext ctx) {
* If the recipe's namespace or the result item's namespace differ from the ingredients, the function will exit
* early with a `null` return value in order to prevent strange suggestions of intermediates and raw materials.
*
- * @param recipe The recipe to compute
+ * @param recipe The recipe to compute
* @param iterations The desired number of times the recipe is to be crafted by the player
- * @param depth The current depth of processing the queue. This is metadata about the processing context used to
- * prevent potential loops in looking up required items.
+ * @param depth The current depth of processing the queue. This is metadata about the processing context used to
+ * prevent potential loops in looking up required items.
* @return A computed recipe, or `null` if certain criteria are not met or thresholds are crossed.
*/
ComputedRecipe computeRecipe(Recipe> recipe, int iterations, int depth) {
@@ -452,7 +446,7 @@ ComputedRecipe computeRecipe(Recipe> recipe, int iterations, int depth) {
var subRecipes = RecipeUtil.getRecipesFor(id);
CraftTracker.LOGGER.debug("subRecipes: {}", subRecipes.stream().map(DebugUtil::printRecipe).toList());
- if(subRecipes.isEmpty() || depth >= MAX_PROCESSING_LEVEL) {
+ if(subRecipes.isEmpty() || depth >= ConfigHandler.CLIENT.calculationDepth.get()) {
CraftTracker.LOGGER.debug("subRecipes is empty; ingredient {} is a raw material", ingredientId);
// no recipes for this ingredient, so it's a raw material
computedRecipe.rawMaterials.compute(id,
@@ -529,15 +523,7 @@ class ProcessingContext {
@Override
public String toString() {
- return MessageFormat.format("""
- ProcessingContext[
- intermediateProducts={0}
- rawMaterials={1}
- fuel={2}
- handledItems={3}
- computedRecipes={4}
- ]
- """,
+ return MessageFormat.format("ProcessingContext[ intermediateProducts={0}, rawMaterials={1}, fuel={2}, handledItems={3}, computedRecipes={4} ]",
intermediateProducts, rawMaterials, fuel, handledItems, computedRecipes);
}
}
@@ -581,13 +567,7 @@ public ComputedRecipeItem tag(boolean tag) {
@Override
public String toString() {
- return MessageFormat.format("""
- ComputedRecipeItem[
- itemId={0}
- amount={1}
- tag={2}
- ]
- """,
+ return MessageFormat.format("ComputedRecipeItem[ itemId={0}, amount={1}, tag={2} ]",
itemId, amount, tag);
}
}
@@ -604,6 +584,7 @@ class ComputedRecipe {
/**
* Constructs the object with the ID of the recipe it represents.
+ *
* @param recipeId The recipe ID
*/
ComputedRecipe(ResourceLocation recipeId) {
@@ -612,28 +593,14 @@ class ComputedRecipe {
@Override
public String toString() {
- return MessageFormat.format("""
- ComputedRecipe[
- recipeId={0}
- intermediateProducts={1}
- rawMaterials={2}
- fuel={3}
- ]
- """,
+ return MessageFormat.format("ComputedRecipe[ recipeId={0}, intermediateProducts={1}, rawMaterials={2}, fuel={3} ]",
recipeId, intermediateProducts, rawMaterials, fuel);
}
}
@Override
public String toString() {
- return MessageFormat.format("""
- CraftingQueueManager[
- endProducts={0}
- intermediateProducts={1}
- rawMaterials={2}
- fuel={3}
- ]
- """,
+ return MessageFormat.format(" CraftingQueueManager[ endProducts={0}, intermediateProducts={1}, rawMaterials={2}, fuel={3} ]",
endProducts, intermediateProducts, rawMaterials, fuel);
}
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/manager/ShoppingListManager.java b/src/main/java/com/sweetrpg/crafttracker/common/manager/ShoppingListManager.java
index 76b1e0f..155a190 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/manager/ShoppingListManager.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/manager/ShoppingListManager.java
@@ -11,10 +11,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.nio.file.FileAlreadyExistsException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.StandardOpenOption;
+import java.nio.file.*;
+import java.text.MessageFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -47,11 +45,12 @@ public void load(Player player) {
CraftTracker.LOGGER.debug("file: {}", file);
try {
- try (InputStream in = Files.newInputStream(file, StandardOpenOption.READ)) {
- var data = NbtIo.readCompressed(in);
- var items = ShoppingListStorage.load(data);
- this.items = items;
- }
+ InputStream in = Files.newInputStream(file, StandardOpenOption.READ);
+ var data = NbtIo.readCompressed(in);
+ this.items = ShoppingListStorage.load(data);
+ }
+ catch (NoSuchFileException e) {
+ // ignore
}
catch (IOException e) {
CraftTracker.LOGGER.error("An error occurred while loading shopping list [" + file + "]", e);
@@ -123,8 +122,8 @@ public void clearItems(Player player) {
/**
* Adds an item to the shopping list. Merges with an existing item if there is one.
*
- * @param player The player whose shopping list is updated
- * @param itemId The ID of the item to add
+ * @param player The player whose shopping list is updated
+ * @param itemId The ID of the item to add
* @param quantity The amount of the item to add
*/
public void addItem(Player player, ResourceLocation itemId, int quantity) {
@@ -144,8 +143,8 @@ public void addItem(Player player, ResourceLocation itemId, int quantity) {
/**
* Removes an item from the shopping list
*
- * @param player The player whose shopping list is updated
- * @param itemId The ID of the item to remove
+ * @param player The player whose shopping list is updated
+ * @param itemId The ID of the item to remove
* @param quantity The amount of the item to remove. If the quantity is equal to or greater than what is currently
* in the list, the entire entry is removed.
*/
@@ -174,7 +173,7 @@ public class ListItem {
/**
* Default constructor.
*
- * @param itemId The ID of the item
+ * @param itemId The ID of the item
* @param quantity The quantity of the item
*/
public ListItem(ResourceLocation itemId, int quantity) {
@@ -197,5 +196,11 @@ public int getQuantity() {
public void setQuantity(int quantity) {
this.quantity = quantity;
}
+
+ @Override
+ public String toString() {
+ return MessageFormat.format("ListItem[ itemId={0}, quantity={1} ]",
+ itemId, quantity);
+ }
}
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/model/CraftingQueueItem.java b/src/main/java/com/sweetrpg/crafttracker/common/model/CraftingQueueItem.java
index 67271f3..4e76b6e 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/model/CraftingQueueItem.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/model/CraftingQueueItem.java
@@ -2,6 +2,8 @@
import net.minecraft.resources.ResourceLocation;
+import java.text.MessageFormat;
+
/**
* A value object for holding intermediate, material, and fuel information from the crafting queue.
*/
@@ -71,4 +73,10 @@ public boolean isTag() {
public void setTag(boolean tag) {
this.tag = tag;
}
+
+ @Override
+ public String toString() {
+ return MessageFormat.format("CraftingQueueItem[ itemId={0}, amount={1}, tag={2} ]",
+ itemId, amount, tag);
+ }
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/model/CraftingQueueProduct.java b/src/main/java/com/sweetrpg/crafttracker/common/model/CraftingQueueProduct.java
index a47c434..468d009 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/model/CraftingQueueProduct.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/model/CraftingQueueProduct.java
@@ -64,14 +64,7 @@ public void setIndex(int index) {
@Override
public String toString() {
- return MessageFormat.format("""
- CraftingQueueProduct[
- itemId={0}
- recipes={1}
- iterations={2}
- index={3}
- ]
- """,
+ return MessageFormat.format("CraftingQueueProduct[ itemId={0}, recipes={1}, iterations={2}, index={3} ]",
productId, recipes, iterations, index);
}
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModBlockEntityTypes.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModBlockEntityTypes.java
deleted file mode 100644
index 6592fb3..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModBlockEntityTypes.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.entity.BlockEntity;
-import net.minecraft.world.level.block.entity.BlockEntityType;
-import net.minecraftforge.registries.DeferredRegister;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegistryObject;
-
-import java.util.function.Supplier;
-
-public class ModBlockEntityTypes {
-
- public static final DeferredRegister> TILE_ENTITIES = DeferredRegister.create(ForgeRegistries.Keys.BLOCK_ENTITY_TYPES, Constants.MOD_ID);
-
- private static RegistryObject> register(final String name, final BlockEntityType.BlockEntitySupplier sup, Supplier extends Block> validBlock) {
- return register(name, () -> BlockEntityType.Builder.of(sup, validBlock.get()).build(null));
- }
-
- private static > RegistryObject register(final String name, final Supplier sup) {
- return TILE_ENTITIES.register(name, sup);
- }
-
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModBlocks.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModBlocks.java
deleted file mode 100644
index a2bd65e..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModBlocks.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.world.item.BlockItem;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.level.block.Block;
-import net.minecraftforge.registries.DeferredRegister;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegistryObject;
-
-import javax.annotation.Nullable;
-import java.util.function.Function;
-import java.util.function.Supplier;
-
-public class ModBlocks {
-
- public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.Keys.BLOCKS, Constants.MOD_ID);
- public static final DeferredRegister- ITEMS = ModItems.ITEMS;
-
- private static Item.Properties createInitialProp() {
- return new Item.Properties().tab(ModItemGroups.GENERAL);
- }
-
- private static BlockItem makeItemBlock(Block block) {
- return makeItemBlock(block, null);
- }
-
- private static BlockItem makeItemBlock(Block block, @Nullable Function extraPropFunc) {
- Item.Properties prop = createInitialProp();
- return new BlockItem(block, extraPropFunc != null ? extraPropFunc.apply(prop) : prop);
- }
-
- private static RegistryObject registerWithItem(final String name, final Supplier blockSupplier, @Nullable Function extraPropFunc) {
- return register(name, blockSupplier, (b) -> makeItemBlock(b.get(), extraPropFunc));
- }
-
- private static RegistryObject registerWithItem(final String name, final Supplier blockSupplier) {
- return register(name, blockSupplier, (b) -> makeItemBlock(b.get()));
- }
-
- private static RegistryObject register(final String name, final Supplier blockSupplier, final Function, Item> itemFunction) {
- RegistryObject blockObj = register(name, blockSupplier);
- ITEMS.register(name, () -> itemFunction.apply(blockObj));
- return blockObj;
- }
-
- private static RegistryObject register(final String name, final Supplier blockSupplier) {
- return BLOCKS.register(name, blockSupplier);
- }
-
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModContainerTypes.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModContainerTypes.java
deleted file mode 100644
index aa2de6c..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModContainerTypes.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.world.inventory.AbstractContainerMenu;
-import net.minecraft.world.inventory.MenuType;
-import net.minecraftforge.common.extensions.IForgeMenuType;
-import net.minecraftforge.network.IContainerFactory;
-import net.minecraftforge.registries.DeferredRegister;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegistryObject;
-
-import java.util.function.Supplier;
-
-public class ModContainerTypes {
-
- public static final DeferredRegister> CONTAINERS = DeferredRegister.create(ForgeRegistries.Keys.CONTAINER_TYPES, Constants.MOD_ID);
-
- private static > RegistryObject> register(final String name, final IContainerFactory factory) {
- return register(name, () -> IForgeMenuType.create(factory));
- }
-
- private static > RegistryObject register(final String name, final Supplier sup) {
- return CONTAINERS.register(name, sup);
- }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModItemGroups.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModItemGroups.java
deleted file mode 100644
index 5a8c6a9..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModItemGroups.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import net.minecraft.world.item.CreativeModeTab;
-import net.minecraft.world.item.ItemStack;
-import net.minecraft.world.item.Items;
-
-import java.util.function.Supplier;
-
-public class ModItemGroups {
-
- public static final CreativeModeTab GENERAL = new CustomItemGroup("CraftTracker", () -> new ItemStack(Items.CRAFTING_TABLE));
-
- public static class CustomItemGroup extends CreativeModeTab {
-
- private Supplier icon;
-
- public CustomItemGroup(String label, Supplier iconIn) {
- super(label);
- this.icon = iconIn;
- }
-
- @Override
- public ItemStack makeIcon() {
- return this.icon.get();
- }
- }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModItems.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModItems.java
deleted file mode 100644
index e5d2968..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModItems.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.world.item.Item;
-import net.minecraftforge.registries.DeferredRegister;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegistryObject;
-
-import javax.annotation.Nullable;
-import java.util.function.Function;
-import java.util.function.Supplier;
-
-public class ModItems {
-
- public static final DeferredRegister
- ITEMS = DeferredRegister.create(ForgeRegistries.Keys.ITEMS, Constants.MOD_ID);
-
- private static Item.Properties createInitialProp() {
- return new Item.Properties().tab(ModItemGroups.GENERAL);
- }
-
- private static RegistryObject registerWith(final String name, Function itemConstructor, int maxStackSize) {
- return register(name, () -> itemConstructor.apply(createInitialProp().stacksTo(maxStackSize)));
- }
-
- private static RegistryObject register(final String name, Function itemConstructor) {
- return register(name, () -> itemConstructor.apply(createInitialProp()));
- }
-
- private static RegistryObject
- register(final String name) {
- return registerWith(name, null);
- }
-
- private static RegistryObject
- registerWith(final String name, @Nullable Function extraPropFunc) {
- Item.Properties prop = createInitialProp();
- return register(name, () -> new Item(extraPropFunc != null ? extraPropFunc.apply(prop) : prop));
- }
-
- private static RegistryObject register(final String name, final Supplier sup) {
- return ITEMS.register(name, sup);
- }
-
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModKeyBindings.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModKeyBindings.java
index 07048d1..f01ae71 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModKeyBindings.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModKeyBindings.java
@@ -23,4 +23,5 @@ public static void init() {
ClientRegistry.registerKeyBinding(POPULATE_SHOPPING_LIST_MAPPING);
ClientRegistry.registerKeyBinding(CLEAR_SHOPPING_LIST_MAPPING);
}
+
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModRecipeSerializers.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModRecipeSerializers.java
deleted file mode 100644
index b0f4a08..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModRecipeSerializers.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.item.crafting.Recipe;
-import net.minecraft.world.item.crafting.RecipeSerializer;
-import net.minecraft.world.item.crafting.SimpleRecipeSerializer;
-import net.minecraftforge.registries.DeferredRegister;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegistryObject;
-
-import java.util.function.Function;
-import java.util.function.Supplier;
-
-public class ModRecipeSerializers {
-
- public static final DeferredRegister> RECIPE_SERIALIZERS = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, Constants.MOD_ID);
-
- private static , T extends RecipeSerializer> RegistryObject> register(final String name, Function factory) {
- return register(name, () -> new SimpleRecipeSerializer<>(factory));
- }
-
- private static > RegistryObject register(final String name, final Supplier sup) {
- return RECIPE_SERIALIZERS.register(name, sup);
- }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModRegistries.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModRegistries.java
deleted file mode 100644
index e00d80a..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModRegistries.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import net.minecraft.resources.ResourceLocation;
-import net.minecraftforge.registries.IForgeRegistryEntry;
-import net.minecraftforge.registries.NewRegistryEvent;
-import net.minecraftforge.registries.RegistryBuilder;
-
-public class ModRegistries {
-
- protected class Keys {
- }
-
- public static void newRegistry(NewRegistryEvent event) {
- }
-
- private static > RegistryBuilder makeRegistry(final ResourceLocation rl, Class type) {
- return new RegistryBuilder().setName(rl).setType(type);
- }
-
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModSerializers.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModSerializers.java
deleted file mode 100644
index b4ef42d..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModSerializers.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.network.syncher.EntityDataSerializer;
-import net.minecraftforge.registries.DataSerializerEntry;
-import net.minecraftforge.registries.DeferredRegister;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegistryObject;
-
-import java.util.function.Supplier;
-
-public class ModSerializers {
-
- public static final DeferredRegister SERIALIZERS = DeferredRegister.create(ForgeRegistries.Keys.DATA_SERIALIZERS, Constants.MOD_ID);
-
- private static > RegistryObject register2(final String name, final Supplier factory) {
- return register(name, () -> new DataSerializerEntry(factory.get()));
- }
-
- private static RegistryObject register(final String name, final Supplier sup) {
- return SERIALIZERS.register(name, sup);
- }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModSounds.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModSounds.java
deleted file mode 100644
index 9605da8..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModSounds.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import com.sweetrpg.crafttracker.common.util.Util;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.sounds.SoundEvent;
-import net.minecraftforge.registries.DeferredRegister;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegistryObject;
-
-import java.util.function.Function;
-import java.util.function.Supplier;
-
-public class ModSounds {
-
- public static final DeferredRegister SOUNDS = DeferredRegister.create(ForgeRegistries.Keys.SOUND_EVENTS, Constants.MOD_ID);
-
- private static RegistryObject register(final String name) {
- return register(name, SoundEvent::new);
- }
-
- private static RegistryObject register(final String name, final Function factory) {
- return register(name, () -> factory.apply(Util.getResource(name)));
- }
-
- private static RegistryObject register(final String name, final Supplier sup) {
- return SOUNDS.register(name, sup);
- }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModTags.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModTags.java
deleted file mode 100644
index 377c46b..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModTags.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.sweetrpg.crafttracker.common.registry;
-
-import com.sweetrpg.crafttracker.common.util.Util;
-import net.minecraft.tags.BlockTags;
-import net.minecraft.tags.ItemTags;
-import net.minecraft.tags.TagKey;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.level.block.Block;
-
-public class ModTags {
-
- private static TagKey
- modItemTag(String name) {
- return ItemTags.create(Util.getResource(name));
- }
-
- private static TagKey modBlockTag(String name) {
- return BlockTags.create(Util.getResource(name));
- }
-
-// private static TagKey> tag(String path) {
-// return EntityTypeTags.bind(Util.getResourcePath(path));
-// }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/AdvancementUtil.java b/src/main/java/com/sweetrpg/crafttracker/common/util/AdvancementUtil.java
index f6f44b9..220a32a 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/util/AdvancementUtil.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/util/AdvancementUtil.java
@@ -16,6 +16,6 @@ public static void trigger(ModAdvancements.Key advancement, ServerPlayer player)
if(ModTriggers.ENTRIES.get(ct.getCriterion().getPath()) instanceof SimpleTrigger trigger) {
trigger.trigger(player);
}
-
}
+
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/Cache.java b/src/main/java/com/sweetrpg/crafttracker/common/util/Cache.java
deleted file mode 100644
index f2bdc98..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/util/Cache.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.sweetrpg.crafttracker.common.util;
-
-import java.util.Optional;
-import java.util.function.Predicate;
-import java.util.function.Supplier;
-
-public class Cache implements Supplier {
-
- private final Supplier getter;
- private Optional value;
-
- private Cache(Supplier getterIn) {
- this.getter = getterIn;
- }
-
- @Override
- public T get() {
- if (this.value == null) {
- this.value = Optional.ofNullable(this.getter.get());
- }
-
- return this.value.orElse(null);
- }
-
- public boolean test(Predicate pred) {
- return pred.test(this.get());
- }
-
- public void markForRefresh() {
- this.value = null;
- }
-
- public static Cache make(Supplier getterIn) {
- return new Cache<>(getterIn);
- }
-
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/DebugUtil.java b/src/main/java/com/sweetrpg/crafttracker/common/util/DebugUtil.java
index 5cd82f2..c8c6d68 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/util/DebugUtil.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/util/DebugUtil.java
@@ -22,26 +22,24 @@ public class DebugUtil {
public static String printIngredient(Ingredient ingredient) {
StringBuilder builder = new StringBuilder();
- builder.append("Ingredient{\n");
+ builder.append("Ingredient{ ");
- builder.append("\titems=[\n");
+ builder.append("items=[ ");
Arrays.stream(ingredient.getItems())
.forEach(i -> {
- builder.append("\t\tregistryName=");
+ builder.append("registryName=");
builder.append(i.getItem().getRegistryName());
- builder.append("\n");
- builder.append("\t\ttags=[");
+ builder.append(", tags=[");
builder.append(String.join(",", i.getTags().map(TagKey::toString).toList()));
- builder.append("]\n");
+ builder.append("]");
- builder.append("\t\tcount=");
+ builder.append(", count=");
builder.append(i.getCount());
- builder.append("\n");
});
- builder.append("\t]\n");
+ builder.append(" ]");
- builder.append("}");
+ builder.append(" }");
return builder.toString();
}
@@ -55,21 +53,18 @@ public static String printIngredient(Ingredient ingredient) {
public static String printItemStack(ItemStack itemStack) {
StringBuilder builder = new StringBuilder();
- builder.append("ItemStack{\n");
+ builder.append("ItemStack{ ");
- builder.append("\tregistryName=");
+ builder.append("registryName=");
builder.append(itemStack.getItem().getRegistryName());
- builder.append("\n");
- builder.append("\tcount=");
+ builder.append(", count=");
builder.append(itemStack.getCount());
- builder.append("\n");
- builder.append("\ttags=[");
+ builder.append(", tags=[");
builder.append(String.join(",", itemStack.getTags().map(TagKey::toString).toList()));
- builder.append("]\n");
- builder.append("}");
+ builder.append(" }");
return builder.toString();
}
@@ -83,12 +78,12 @@ public static String printItemStack(ItemStack itemStack) {
public static String printItem(Item item) {
StringBuilder builder = new StringBuilder();
- builder.append("Item{");
+ builder.append("Item{ ");
builder.append("registryName=");
builder.append(item.getRegistryName());
- builder.append("}");
+ builder.append(" }");
return builder.toString();
}
@@ -102,23 +97,21 @@ public static String printItem(Item item) {
public static String printRecipe(Recipe> recipe) {
StringBuilder builder = new StringBuilder();
- builder.append("Recipe{\n");
+ builder.append("Recipe{ ");
- builder.append("\tid=");
+ builder.append("id=");
builder.append(recipe.getId());
- builder.append("\n");
- builder.append("\tresultItem=");
+ builder.append(", resultItem=");
builder.append(DebugUtil.printItemStack(recipe.getResultItem()));
- builder.append("\n");
- builder.append("\tingredients=[\n\t\t");
- builder.append(String.join(",\n\t\t", recipe.getIngredients().stream()
+ builder.append(", ingredients=[ ");
+ builder.append(String.join(",", recipe.getIngredients().stream()
.map(DebugUtil::printIngredient)
.toList()));
- builder.append("\t]\n");
+ builder.append(" ]");
- builder.append("}");
+ builder.append(" }");
return builder.toString();
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/RecipeUtil.java b/src/main/java/com/sweetrpg/crafttracker/common/util/RecipeUtil.java
index 2710eff..80f693c 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/util/RecipeUtil.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/util/RecipeUtil.java
@@ -2,14 +2,13 @@
import com.sweetrpg.crafttracker.CraftTracker;
import com.sweetrpg.crafttracker.common.lib.Constants;
+import com.sweetrpg.crafttracker.common.util.calc.ItemCostCalculator;
+import com.sweetrpg.crafttracker.common.util.calc.RecipeCostCalculator;
import net.minecraft.client.Minecraft;
import net.minecraft.core.NonNullList;
import net.minecraft.resources.ResourceLocation;
-import net.minecraft.tags.TagKey;
import net.minecraft.util.Tuple;
-import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
-import net.minecraft.world.item.crafting.CraftingRecipe;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.Recipe;
import org.apache.commons.lang3.ObjectUtils;
@@ -23,46 +22,6 @@
*/
public class RecipeUtil {
- public static final float NON_VANILLA_COST_MULTIPLIER = 1.2f;
- public static final float NON_CRAFTING_COST_MULTIPLIER = 1.25f;
-
- private static Map ingredientCostsByTag = new HashMap<>();
- private static Map ingredientCostOverrides = new HashMap<>();
-
- static {
- var mgr = Minecraft.getInstance().getResourceManager();
-
- var ingCostsResource = new ResourceLocation(Constants.MOD_ID, "ingredient-costs.properties");
- try {
- var costs = mgr.getResource(ingCostsResource);
- var props = new Properties();
- props.load(costs.getInputStream());
- props.entrySet().forEach(entry -> {
- var key = new ResourceLocation((String) entry.getKey());
- var value = Integer.parseInt((String) entry.getValue());
- ingredientCostsByTag.put(key, value);
- });
- }
- catch (IOException e) {
- CraftTracker.LOGGER.error("I/O exception when trying to load ingredient costs file", e);
- }
-
- var ingOverridesResource = new ResourceLocation(Constants.MOD_ID, "ingredient-overrides.properties");
- try {
- var costs = mgr.getResource(ingOverridesResource);
- var props = new Properties();
- props.load(costs.getInputStream());
- props.entrySet().forEach(entry -> {
- var key = new ResourceLocation((String) entry.getKey());
- var value = Integer.parseInt((String) entry.getValue());
- ingredientCostOverrides.put(key, value);
- });
- }
- catch (IOException e) {
- CraftTracker.LOGGER.error("I/O exception when trying to load ingredient overrides file", e);
- }
- }
-
/**
* Looks up recipes that will output the specified item
*
@@ -121,145 +80,6 @@ public static boolean areIngredientsSameNamespace(String namespace, NonNullList<
return ing.size() == 1;
}
- /**
- * Calculates the "cost" of a recipe.
- *
- * Computes the cost of a recipe from:
- * - the sum of its ingredients' costs
- * - whether the recipe is "vanilla"
- * - whether the recipe is "simple" (crafted vs. smelted, etc.)
- *
- * @param recipe The recipe to calculate
- * @return A integer value of the recipe's cost
- */
- public static int calculateRecipeCost(Recipe> recipe) {
- CraftTracker.LOGGER.debug("RecipeUtil#calculateRecipeCost: {}", DebugUtil.printRecipe(recipe));
-
- int cost = recipe.getIngredients().stream()
- .map(RecipeUtil::calculateIngredientCost)
- .reduce(0, Integer::sum);
-
- // if the item's namespace is not 'minecraft:', increase the cost
- if(!recipe.getId().getNamespace().equals("minecraft")) {
- CraftTracker.LOGGER.debug("RecipeUtil#calculateRecipeCost: increasing cost ({}) of non-vanilla recipe {} by {}",
- cost, DebugUtil.printRecipe(recipe), NON_VANILLA_COST_MULTIPLIER);
- cost = (int) (cost * NON_VANILLA_COST_MULTIPLIER);
- }
-
- if(!(recipe instanceof CraftingRecipe)) {
- CraftTracker.LOGGER.debug("RecipeUtil#calculateRecipeCost: increasing cost ({}) of non-crafting table recipe {} by {}",
- cost, DebugUtil.printRecipe(recipe), NON_CRAFTING_COST_MULTIPLIER);
- cost = (int) (cost * NON_VANILLA_COST_MULTIPLIER);
- }
-
- return cost;
- }
-
- /**
- * Calculates the cost of an ingredient
- *
- * Computes the cost of an ingredient by looking at the constituent items (i.e., if the ingredient is a tag, looking
- * at the cost of items that match the tag).
- * An item's cost can be set in the override list.
- * The ultimate cost of an ingredient will be the highest cost of the items matching its tag.
- *
- * @param ingredient The ingredient to calculate
- * @return An integer value of the ingredient's cost
- */
- public static int calculateIngredientCost(Ingredient ingredient) {
- CraftTracker.LOGGER.debug("RecipeUtil#getIngredientCost: {}", DebugUtil.printIngredient(ingredient));
-
- for(ItemStack stack : ingredient.getItems()) {
- // is the item in the override list?
- var itemId = stack.getItem().getRegistryName();
- var count = stack.getCount();
-
- if(ingredientCostOverrides.containsKey(itemId)) {
- CraftTracker.LOGGER.debug("found item {} in override list", itemId);
- return ingredientCostOverrides.get(itemId) * count;
- }
-
- // it's not, so check its tags
- int highestCost = 0;
- for(TagKey
- tag : stack.getTags().toList()) {
- var tagId = tag.location();
- if(ingredientCostsByTag.containsKey(tagId)) {
- CraftTracker.LOGGER.debug("found item {} in tag list", tagId);
- int cost = ingredientCostsByTag.get(tagId) * count;
-
- // if the item's namespace is not 'minecraft:', increase the cost
- if(!ObjectUtils.defaultIfNull(stack.getItem().getRegistryName().getNamespace(), "").equals("minecraft") &&
- !ObjectUtils.defaultIfNull(tagId.getNamespace(), "").equals("minecraft")) {
- CraftTracker.LOGGER.debug("RecipeUtil#calculateRecipeCost: increasing cost ({}) of non-vanilla item {} by {}",
- cost, tagId, NON_VANILLA_COST_MULTIPLIER);
- cost = (int) (cost * NON_VANILLA_COST_MULTIPLIER);
- }
-
- if(cost > highestCost) {
- highestCost = cost;
- }
- }
- }
- if(highestCost > 0) {
- return highestCost;
- }
- }
-
- CraftTracker.LOGGER.debug("#calculateIngredientCost: fell through to default cost");
- return 1;
- }
-
- /**
- * Calculates the cost of an item stack
- *
- * The logic here is the same as for {@link #calculateIngredientCost(Ingredient)}, except that it applies to an
- * {@link ItemStack}. See that method's documentation for details, with the caveat that this method will fall
- * back on an item's rarity if all other calculations are insufficient.
- *
- * @param stack The stack to calculate
- * @return An integer value of the item stack's cost
- */
- public static int calculateItemCost(ItemStack stack) {
- CraftTracker.LOGGER.debug("#calculateItemCost: {}", DebugUtil.printItemStack(stack));
-
- var itemId = stack.getItem().getRegistryName();
- var count = stack.getCount();
-
- if(ingredientCostOverrides.containsKey(itemId)) {
- CraftTracker.LOGGER.debug("found item {} in override list", itemId);
- return ingredientCostOverrides.get(itemId) * count;
- }
-
- // it's not, so check its tags
- int highestCost = 0;
- for(TagKey
- tag : stack.getTags().toList()) {
- var tagId = tag.location();
- if(ingredientCostsByTag.containsKey(tagId)) {
- CraftTracker.LOGGER.debug("found item {} in tag list", tagId);
- int cost = ingredientCostsByTag.get(tagId) * count;
-
- // if the item's namespace is not 'minecraft:', increase the cost
- if(!ObjectUtils.defaultIfNull(stack.getItem().getRegistryName().getNamespace(), "").equals("minecraft") &&
- !ObjectUtils.defaultIfNull(tagId.getNamespace(), "").equals("minecraft")) {
- CraftTracker.LOGGER.debug("RecipeUtil#calculateItemCost: increasing cost ({}) of non-vanilla item {} by {}",
- cost, tagId, NON_VANILLA_COST_MULTIPLIER);
- cost = (int) (cost * NON_VANILLA_COST_MULTIPLIER);
- }
-
- if(cost > highestCost) {
- highestCost = (int) cost;
- }
- }
- }
- if(highestCost > 0) {
- return highestCost;
- }
-
- CraftTracker.LOGGER.debug("#calculateIngredientCost: fell through to rarity");
- var rarity = stack.getItem().getRarity(stack);
- return Math.max(rarity.ordinal() * count, count);
- }
-
/**
* Given a list of recipes, return the one that is least expensive.
*
@@ -276,12 +96,15 @@ public static Recipe> chooseLeastExpensiveOf(List extends Recipe>> recipes
List, Integer>> recipeCosts = new ArrayList<>();
for(Recipe> recipe : recipes) {
- var cost = RecipeUtil.calculateRecipeCost(recipe);
+ CraftTracker.LOGGER.debug("recipe: {}", DebugUtil.printRecipe(recipe));
+ var cost = new RecipeCostCalculator(recipe).calculate();
+ CraftTracker.LOGGER.debug("cost: {}", cost);
var tuple = new Tuple<>(recipe, cost);
recipeCosts.add(tuple);
}
+ CraftTracker.LOGGER.debug("sorting recipes");
recipeCosts.sort((rc1, rc2) -> {
var result = rc1.getB().compareTo(rc2.getB());
if(result == 0) {
@@ -290,7 +113,9 @@ public static Recipe> chooseLeastExpensiveOf(List extends Recipe>> recipes
return result;
});
- return recipeCosts.get(0).getA();
+ var itemToReturn = recipeCosts.get(0).getA();
+ CraftTracker.LOGGER.debug("returning top item from sorted recipes: {}", DebugUtil.printRecipe(itemToReturn));
+ return itemToReturn;
}
/**
@@ -303,18 +128,30 @@ public static ItemStack chooseLeastExpensiveOf(ItemStack[] stacks) {
CraftTracker.LOGGER.debug("RecipeUtil#chooseLeastExpensiveOf: {}", Arrays.stream(stacks).map(DebugUtil::printItemStack).toList());
if(stacks.length == 1) {
+ CraftTracker.LOGGER.debug("only 1 item in the stack; returning that");
return stacks[0];
}
List> itemCosts = new ArrayList<>();
for(ItemStack stack : stacks) {
- var cost = RecipeUtil.calculateItemCost(stack);
+ CraftTracker.LOGGER.debug("stack: {}", DebugUtil.printItemStack(stack));
+ var cost = new ItemCostCalculator(stack).calculate();
+ CraftTracker.LOGGER.debug("cost: {}", cost);
var tuple = new Tuple<>(stack, cost);
itemCosts.add(tuple);
}
+ CraftTracker.LOGGER.debug("Considering the costs of {} items:", itemCosts.size());
+ itemCosts.forEach(t -> {
+ var s = t.getA();
+ var c = t.getB();
+
+ CraftTracker.LOGGER.debug("item: {}, cost: {}", s.getItem().getRegistryName(), c);
+ });
+
+ CraftTracker.LOGGER.debug("sorting items");
itemCosts.sort((rc1, rc2) -> {
var result = rc1.getB().compareTo(rc2.getB());
if(result == 0) {
@@ -324,7 +161,9 @@ public static ItemStack chooseLeastExpensiveOf(ItemStack[] stacks) {
return result;
});
- return itemCosts.get(0).getA();
+ var itemToReturn = itemCosts.get(0).getA();
+ CraftTracker.LOGGER.debug("returning top item from sorted items: {}", DebugUtil.printItemStack(itemToReturn));
+ return itemToReturn;
}
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/TextUtils.java b/src/main/java/com/sweetrpg/crafttracker/common/util/TextUtils.java
deleted file mode 100644
index 16ef581..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/common/util/TextUtils.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.sweetrpg.crafttracker.common.util;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.ChatFormatting;
-import net.minecraft.network.chat.MutableComponent;
-import net.minecraft.network.chat.TranslatableComponent;
-
-public class TextUtils {
- private static final MutableComponent NO_EFFECTS = (new TranslatableComponent("effect.none")).withStyle(ChatFormatting.GRAY);
-
- /**
- * Syntactic sugar for custom translation keys. Always prefixed with the mod's ID in lang files (e.g. crafttracker.your.key.here).
- */
- public static MutableComponent getTranslation(String type, String key, Object... args) {
- return new TranslatableComponent(type + "." + Constants.MOD_ID + "." + key, args);
- }
-
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/Util.java b/src/main/java/com/sweetrpg/crafttracker/common/util/Util.java
index 80abb65..0bc9bb0 100644
--- a/src/main/java/com/sweetrpg/crafttracker/common/util/Util.java
+++ b/src/main/java/com/sweetrpg/crafttracker/common/util/Util.java
@@ -63,78 +63,6 @@ public static Path getStoragePath() {
return STORAGE_DIR.resolve(addressPath).normalize();
}
- public static String format1DP(double value) {
- return Util.dfShort.format(value);
- }
-
- public static String format2DP(double value) {
- return Util.dfShortDouble.format(value);
- }
-
- public static boolean isPointInRegion(int x, int y, int width, int height, double mouseX, double mouseY) {
- return mouseX >= x - 1 && mouseX < x + width + 1 && mouseY >= y - 1 && mouseY < y + height + 1;
- }
-
- public static float[] rgbIntToFloatArray(int rgbInt) {
- int r = (rgbInt >> 16) & 255;
- int g = (rgbInt >> 8) & 255;
- int b = (rgbInt >> 0) & 255;
-
- return new float[]{r / 255F, g / 255F, b / 255F};
- }
-
- public static int[] rgbIntToIntArray(int rgbInt) {
- int r = (rgbInt >> 16) & 255;
- int g = (rgbInt >> 8) & 255;
- int b = (rgbInt >> 0) & 255;
-
- return new int[]{r, g, b};
- }
-
- public static int colorDye(int startColor, DyeColor dye) {
- return colorDye(startColor, Lists.newArrayList(dye));
- }
-
- public static int colorDye(int startColor, Collection dyes) {
- List colors = dyes.stream()
- .mapToInt(DyeColor::getTextColor)
- .mapToObj(Util::rgbIntToIntArray)
- .collect(Collectors.toList());
-
- if(startColor != -1) {
- colors.add(0, rgbIntToIntArray(startColor));
- }
-
- return colorDye(colors);
- }
-
- public static int colorDye(Collection colors) {
- int[] temp = new int[3];
- int maxCompSum = 0;
-
- for(int[] color : colors) {
- maxCompSum += Math.max(color[0], Math.max(color[1], color[2]));
- temp[0] += color[0];
- temp[1] += color[1];
- temp[2] += color[2];
- }
-
- int redAve = temp[0] / colors.size();
- int greenAve = temp[1] / colors.size();
- int blueAve = temp[2] / colors.size();
-
- float maxAve = (float) maxCompSum / (float) colors.size();
- float max = Math.max(redAve, Math.max(greenAve, blueAve));
-
- redAve = (int) (redAve * maxAve / max);
- greenAve = (int) (greenAve * maxAve / max);
- blueAve = (int) (blueAve * maxAve / max);
-
- int finalColor = (redAve << 8) + greenAve;
- finalColor = (finalColor << 8) + blueAve;
- return finalColor;
- }
-
/**
* @param name The path of the resource
*/
@@ -167,92 +95,4 @@ public static String getResourcePath(String modId, String name) {
return getResource(modId, name).toString();
}
- public static FriendlyByteBuf createBuf() {
- return new FriendlyByteBuf(Unpooled.buffer());
- }
-
- // From net.minecraft.util.Util
- public static T make(Supplier supplier) {
- return supplier.get();
- }
-
- // From net.minecraft.util.Util
- public static T make(T object, Consumer consumer) {
- consumer.accept(object);
- return object;
- }
-
- // From net.minecraft.util.Util but for RegistryObject
- public static > RegistryObject acceptOrElse(RegistryObject opt, Consumer consumer, Runnable orElse) {
- if(opt.isPresent()) {
- consumer.accept(opt.get());
- }
- else {
- orElse.run();
- }
-
- return opt;
- }
-
- public static Optional acceptOrElse(Optional opt, Consumer consumer, Runnable orElse) {
- if(opt.isPresent()) {
- consumer.accept(opt.get());
- }
- else {
- orElse.run();
- }
-
- return opt;
- }
-
- public static boolean allMatch(Iterable input, Predicate matcher) {
- Objects.requireNonNull(matcher);
- for(T e : input) {
- if(!matcher.test(e)) {
- return false;
- }
- }
- return true;
- }
-
- public static boolean anyMatch(Iterable input, Predicate matcher) {
- Objects.requireNonNull(matcher);
- for(T e : input) {
- if(matcher.test(e)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Takes various registry related objects and returns the
- * registry id of the object it is representing
- */
- public static ResourceLocation getRegistryId(Object obj) {
- if(obj instanceof ResourceLocation) {
- return (ResourceLocation) obj;
- }
-
- if(obj instanceof String) {
- // Returns null when namespace or path contain invalid
- // characters
- return ResourceLocation.tryParse((String) obj);
- }
-
- if(obj instanceof IForgeRegistryEntry) {
- return ((IForgeRegistryEntry) obj).getRegistryName();
- }
-
- if(obj instanceof IRegistryDelegate) {
- return ((IRegistryDelegate) obj).name();
- }
-
- if(obj instanceof RegistryObject) {
- return ((RegistryObject) obj).getId();
- }
-
- return null;
- }
-
}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ICostCalculator.java b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ICostCalculator.java
new file mode 100644
index 0000000..7b03ce9
--- /dev/null
+++ b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ICostCalculator.java
@@ -0,0 +1,7 @@
+package com.sweetrpg.crafttracker.common.util.calc;
+
+public interface ICostCalculator {
+
+ int calculate();
+
+}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/IngredientCostCalculator.java b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/IngredientCostCalculator.java
new file mode 100644
index 0000000..f25988b
--- /dev/null
+++ b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/IngredientCostCalculator.java
@@ -0,0 +1,96 @@
+package com.sweetrpg.crafttracker.common.util.calc;
+
+import com.sweetrpg.crafttracker.CraftTracker;
+import com.sweetrpg.crafttracker.common.config.ConfigHandler;
+import com.sweetrpg.crafttracker.common.util.DebugUtil;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.tags.TagKey;
+import net.minecraft.world.item.Item;
+import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.item.crafting.Ingredient;
+import org.apache.commons.lang3.ObjectUtils;
+
+/**
+ * Calculates the cost of an ingredient
+ *
+ * Computes the cost of an ingredient by looking at the constituent items (i.e., if the ingredient is a tag, looking
+ * at the cost of items that match the tag).
+ * An item's cost can be set in the override list.
+ * The ultimate cost of an ingredient will be the highest cost of the items matching its tag.
+ */
+public class IngredientCostCalculator implements ICostCalculator {
+
+ private final Ingredient ingredient;
+
+ /**
+ * Default constructor.
+ *
+ * @param ingredient The ingredient to calculate
+ */
+ public IngredientCostCalculator(Ingredient ingredient) {
+ this.ingredient = ingredient;
+ }
+
+ /**
+ * Perform the calculation.
+ *
+ * @return An integer value of the ingredient's cost
+ */
+ @Override
+ public int calculate() {
+ CraftTracker.LOGGER.debug("#getIngredientCost: {}", DebugUtil.printIngredient(ingredient));
+
+ for(ItemStack stack : ingredient.getItems()) {
+ CraftTracker.LOGGER.debug("stack: {}", DebugUtil.printItemStack(stack));
+
+ // is the item in the override list?
+ var itemId = stack.getItem().getRegistryName();
+ var count = stack.getCount();
+
+ if(ConfigHandler.COMMON.overrideEntries.containsKey(itemId)) {
+ CraftTracker.LOGGER.debug("found item {} in override list", itemId);
+ return ConfigHandler.COMMON.overrideEntries.get(itemId).get() * count;
+ }
+
+ // it's not, so check its tags
+ int highestCost = 0;
+ for(TagKey
- tag : stack.getTags().toList()) {
+ var tagId = tag.location();
+ CraftTracker.LOGGER.debug("looking at tagId: {}", tagId);
+
+ if(ConfigHandler.COMMON.tagEntries.containsKey(tagId)) {
+ CraftTracker.LOGGER.debug("found tag {} in tag list", tagId);
+
+ int cost = ConfigHandler.COMMON.tagEntries.get(tagId).get() * count;
+ CraftTracker.LOGGER.debug("cost of tag {} is {}", tagId, cost);
+
+ // adjust the cost by the namespace's multiplier
+ var tagNamespace = ObjectUtils.defaultIfNull(stack.getItem().getRegistryName(), new ResourceLocation("", "")).getNamespace();
+ CraftTracker.LOGGER.debug("tagNamespace: {}", tagNamespace);
+ var multiplier = ConfigHandler.COMMON.namespaceEntries.get(tagNamespace);
+ CraftTracker.LOGGER.debug("multiplier: {}", multiplier);
+
+ if(multiplier != null) {
+ var newCost = (int) (cost * multiplier.get());
+ CraftTracker.LOGGER.debug("#calculate: increasing cost of tag {} in namespace {} by {}: from {} to {}",
+ tagId, tagNamespace, multiplier.get(),
+ cost, newCost);
+ cost = newCost;
+ }
+
+ if(cost > highestCost) {
+ CraftTracker.LOGGER.trace("replacing highestCost with new value: was {}, is {}", highestCost, cost);
+ highestCost = cost;
+ }
+ }
+ }
+ if(highestCost > 0) {
+ CraftTracker.LOGGER.debug("returning highest cost: {}", highestCost);
+ return highestCost;
+ }
+ }
+
+ CraftTracker.LOGGER.debug("#calculateIngredientCost: fell through to default cost");
+ return 1;
+ }
+}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ItemCostCalculator.java b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ItemCostCalculator.java
new file mode 100644
index 0000000..cbc4376
--- /dev/null
+++ b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ItemCostCalculator.java
@@ -0,0 +1,89 @@
+package com.sweetrpg.crafttracker.common.util.calc;
+
+import com.sweetrpg.crafttracker.CraftTracker;
+import com.sweetrpg.crafttracker.common.config.ConfigHandler;
+import com.sweetrpg.crafttracker.common.util.DebugUtil;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.tags.TagKey;
+import net.minecraft.world.item.Item;
+import net.minecraft.world.item.ItemStack;
+import org.apache.commons.lang3.ObjectUtils;
+
+/**
+ * Calculates the cost of an item stack
+ *
+ * The logic here is the same as for {@link IngredientCostCalculator}, except that it applies to an
+ * {@link ItemStack}. See that method's documentation for details, with the caveat that this method will fall
+ * back on an item's rarity if all other calculations are insufficient.
+ */
+public class ItemCostCalculator implements ICostCalculator {
+
+ private final ItemStack stack;
+
+ /**
+ * Default constructor.
+ *
+ * @param stack The stack to calculate
+ */
+ public ItemCostCalculator(ItemStack stack) {
+ this.stack = stack;
+ }
+
+ /**
+ * Perform the calculation.
+ *
+ * @return An integer value of the item stack's cost
+ */
+ @Override
+ public int calculate() {
+ CraftTracker.LOGGER.debug("#calculateItemCost: {}", DebugUtil.printItemStack(stack));
+
+ var itemId = stack.getItem().getRegistryName();
+ var count = stack.getCount();
+
+ if(ConfigHandler.COMMON.overrideEntries.containsKey(itemId)) {
+ CraftTracker.LOGGER.debug("found item {} in override list", itemId);
+ return ConfigHandler.COMMON.overrideEntries.get(itemId).get() * count;
+ }
+
+ // it's not, so check its tags
+ int highestCost = 0;
+ for(TagKey
- tag : stack.getTags().toList()) {
+ var tagId = tag.location();
+ CraftTracker.LOGGER.debug("looking at tagId: {}", tagId);
+
+ if(ConfigHandler.COMMON.tagEntries.containsKey(tagId)) {
+ CraftTracker.LOGGER.debug("found item {} in tag list", tagId);
+
+ int cost = ConfigHandler.COMMON.tagEntries.get(tagId).get() * count;
+ CraftTracker.LOGGER.debug("cost of tag {} is {}", tagId, cost);
+
+ var tagNamespace = ObjectUtils.defaultIfNull(stack.getItem().getRegistryName(), new ResourceLocation("", "")).getNamespace();
+ CraftTracker.LOGGER.debug("tagNamespace: {}", tagNamespace);
+ var multiplier = ConfigHandler.COMMON.namespaceEntries.get(tagNamespace);
+ CraftTracker.LOGGER.debug("multiplier: {}", multiplier);
+
+ if(multiplier != null) {
+ var newCost = (int) (cost * multiplier.get());
+ CraftTracker.LOGGER.debug("#calculate: increasing cost of tag {} in namespace {} by {}: from {} to {}",
+ tagId, tagNamespace, multiplier.get(),
+ cost, newCost);
+ cost = newCost;
+ }
+
+ if(cost > highestCost) {
+ CraftTracker.LOGGER.trace("replacing highestCost with new value: was {}, is {}", highestCost, cost);
+ highestCost = (int) cost;
+ }
+ }
+ }
+ if(highestCost > 0) {
+ CraftTracker.LOGGER.debug("returning highest cost: {}", highestCost);
+ return highestCost;
+ }
+
+ CraftTracker.LOGGER.debug("#calculate: fell through to rarity");
+ var rarity = stack.getItem().getRarity(stack);
+ return Math.max(rarity.ordinal() * count, count);
+ }
+}
diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/RecipeCostCalculator.java b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/RecipeCostCalculator.java
new file mode 100644
index 0000000..bd87629
--- /dev/null
+++ b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/RecipeCostCalculator.java
@@ -0,0 +1,75 @@
+package com.sweetrpg.crafttracker.common.util.calc;
+
+import com.sweetrpg.crafttracker.CraftTracker;
+import com.sweetrpg.crafttracker.common.config.ConfigHandler;
+import com.sweetrpg.crafttracker.common.util.DebugUtil;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.world.item.crafting.Recipe;
+import org.apache.commons.lang3.ObjectUtils;
+
+/**
+ * Calculates the "cost" of a recipe.
+ *
+ * Computes the cost of a recipe from:
+ * - the sum of its ingredients' costs
+ * - whether the recipe is "vanilla"
+ * - whether the recipe is "simple" (crafted vs. smelted, etc.)
+ */
+public class RecipeCostCalculator implements ICostCalculator {
+
+ private final Recipe> recipe;
+
+ /**
+ * Default constructor.
+ *
+ * @param recipe The recipe to calculate
+ */
+ public RecipeCostCalculator(Recipe> recipe) {
+ this.recipe = recipe;
+ }
+
+ /**
+ * Perform the calculation.
+ *
+ * @return An integer value of the recipe's cost
+ */
+ @Override
+ public int calculate() {
+ CraftTracker.LOGGER.debug("#calculate: {}", DebugUtil.printRecipe(recipe));
+
+ int cost = recipe.getIngredients().stream()
+ .map(IngredientCostCalculator::new)
+ .map(IngredientCostCalculator::calculate)
+ .reduce(0, Integer::sum);
+ CraftTracker.LOGGER.debug("summed cost of items: {}", cost);
+
+ // adjust the cost by the namespace's multiplier
+ var recipeNamespace = ObjectUtils.defaultIfNull(recipe.getId(), new ResourceLocation("", "")).getNamespace();
+ CraftTracker.LOGGER.debug("recipeNamespace: {}", recipeNamespace);
+ var multiplier = ConfigHandler.COMMON.namespaceEntries.get(recipeNamespace);
+ CraftTracker.LOGGER.debug("multiplier: {}", multiplier);
+
+ if(multiplier != null) {
+ var newCost = (int) (cost * multiplier.get());
+ CraftTracker.LOGGER.debug("#calculate: increasing cost of recipe {} in namespace {} by {}: from {} to {}",
+ recipe.getId(), recipeNamespace, multiplier.get(),
+ cost, newCost);
+ cost = newCost;
+ }
+
+ var recipeType = recipe.getType();
+ CraftTracker.LOGGER.debug("recipe type: {}", recipeType);
+
+ var typeMultiplier = ConfigHandler.COMMON.recipeTypeEntries.get(recipeType.toString());
+ if(typeMultiplier != null) {
+ var newCost = (int) (cost * typeMultiplier.get());
+ CraftTracker.LOGGER.debug("#calculate: increasing cost of recipe type {} by {}: from {} to {}",
+ recipeType, typeMultiplier.get(),
+ cost, newCost);
+ cost = newCost;
+ }
+
+ CraftTracker.LOGGER.debug("returning cost: {}", cost);
+ return cost;
+ }
+}
diff --git a/src/main/java/com/sweetrpg/crafttracker/data/CTBlockTagsProvider.java b/src/main/java/com/sweetrpg/crafttracker/data/CTBlockTagsProvider.java
deleted file mode 100644
index 10616be..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/data/CTBlockTagsProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.sweetrpg.crafttracker.data;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.data.DataGenerator;
-import net.minecraft.data.tags.BlockTagsProvider;
-import net.minecraftforge.common.data.ExistingFileHelper;
-
-public class CTBlockTagsProvider extends BlockTagsProvider {
-
- public CTBlockTagsProvider(DataGenerator generatorIn, ExistingFileHelper existingFileHelper) {
- super(generatorIn, Constants.MOD_ID, existingFileHelper);
- }
-
- @Override
- public String getName() {
- return "CraftTracker Block Tags";
- }
-
- @Override
- protected void addTags() {
- this.registerModTags();
- this.registerMinecraftTags();
- this.registerForgeTags();
-
- this.registerBlockMineables();
- }
-
- protected void registerBlockMineables() {
-
- }
-
- protected void registerMinecraftTags() {
- }
-
- protected void registerForgeTags() {
-
- }
-
- protected void registerModTags() {
- }
-
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/data/CTBlockstateProvider.java b/src/main/java/com/sweetrpg/crafttracker/data/CTBlockstateProvider.java
deleted file mode 100644
index d6470d4..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/data/CTBlockstateProvider.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package com.sweetrpg.crafttracker.data;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.core.Direction;
-import net.minecraft.data.DataGenerator;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.state.properties.IntegerProperty;
-import net.minecraft.world.level.block.state.properties.Property;
-import net.minecraft.world.phys.AABB;
-import net.minecraftforge.client.model.generators.*;
-import net.minecraftforge.common.data.ExistingFileHelper;
-import net.minecraftforge.registries.IForgeRegistryEntry;
-
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.function.BiConsumer;
-import java.util.function.BiFunction;
-import java.util.function.Supplier;
-
-public class CTBlockstateProvider extends BlockStateProvider {
-
- // Applies texture to all faces and for the input face culls that direction
- private static final BiFunction.ElementBuilder.FaceBuilder>> cullFaceFactory = (texture, input) -> (d, b) -> b.texture(texture).cullface(d == input ? d : null);
-
- public CTBlockstateProvider(DataGenerator gen, ExistingFileHelper exFileHelper) {
- super(gen, Constants.MOD_ID, exFileHelper);
- }
-
- public ExistingFileHelper getExistingHelper() {
- return this.models().existingFileHelper;
- }
-
- @Override
- public String getName() {
- return "CraftTracker Blockstates/Block Models";
- }
-
- @Override
- protected void registerStatesAndModels() {
- }
-
- private String blockName(Block block) {
- return block.getRegistryName().getPath();
- }
-
- public ResourceLocation resourceBlock(String path) {
- return new ResourceLocation(Constants.MOD_ID, "block/" + path);
- }
-
- protected void createFromShape(Supplier extends Block> blockIn, AABB bb) {
- BlockModelBuilder model = this.models()
- .getBuilder(name(blockIn))
- .parent(this.models().getExistingFile(mcLoc(ModelProvider.BLOCK_FOLDER + "/block")))
- .texture("particle", extend(blockTexture(blockIn), "_bottom"))
- .texture("bottom", extend(blockTexture(blockIn), "_bottom"))
- .texture("top", extend(blockTexture(blockIn), "_top"))
- .texture("side", extend(blockTexture(blockIn), "_side"));
-
- model.element()
- .from((float) bb.minX, (float) bb.minY, (float) bb.minZ)
- .to((float) bb.maxX, (float) bb.maxY, (float) bb.maxZ)
- .allFaces((d, f) -> f.cullface(d == Direction.DOWN ? d : null).texture(d.getAxis().isHorizontal() ? "#side" : d == Direction.DOWN ? "#bottom" : "#top"));
-
- this.simpleBlock(blockIn.get(), model);
- }
-
- public void stageBlock(Block block, IntegerProperty ageProperty, Property>... ignored) {
- getVariantBuilder(block).forAllStatesExcept(state -> {
- int ageSuffix = state.getValue(ageProperty);
- String stageName = blockName(block) + "_stage" + ageSuffix;
- return ConfiguredModel.builder().modelFile(models().cross(stageName, resourceBlock(stageName))).build();
- }, ignored);
- }
-
- public void customStageBlock(Block block, @Nullable ResourceLocation parent, String textureKey, IntegerProperty ageProperty, List suffixes, Property>... ignored) {
- getVariantBuilder(block).forAllStatesExcept(state -> {
- int ageSuffix = state.getValue(ageProperty);
- String stageName = blockName(block) + "_stage";
- stageName += suffixes.isEmpty() ? ageSuffix : suffixes.get(Math.min(suffixes.size(), ageSuffix));
- if(parent == null) {
- return ConfiguredModel.builder().modelFile(models().cross(stageName, resourceBlock(stageName))).build();
- }
- return ConfiguredModel.builder().modelFile(models().singleTexture(stageName, parent, textureKey, resourceBlock(stageName))).build();
- }, ignored);
- }
-
- private String name(Supplier extends IForgeRegistryEntry>> block) {
- return block.get().getRegistryName().getPath();
- }
-
- private ResourceLocation blockTexture(Supplier extends Block> block) {
- ResourceLocation base = block.get().getRegistryName();
- return prextend(base, ModelProvider.BLOCK_FOLDER + "/");
- }
-
- public ModelFile cross(Supplier extends Block> block) {
- return this.models().cross(name(block), blockTexture(block));
- }
-
- protected void makeSimple(Supplier extends Block> blockIn) {
- this.simpleBlock(blockIn.get());
- }
-
- private ResourceLocation prextend(ResourceLocation rl, String prefix) {
- return new ResourceLocation(rl.getNamespace(), prefix + rl.getPath());
- }
-
- private ResourceLocation extend(ResourceLocation rl, String suffix) {
- return new ResourceLocation(rl.getNamespace(), rl.getPath() + suffix);
- }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/data/CTItemModelProvider.java b/src/main/java/com/sweetrpg/crafttracker/data/CTItemModelProvider.java
deleted file mode 100644
index e984b24..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/data/CTItemModelProvider.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.sweetrpg.crafttracker.data;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.data.DataGenerator;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.level.ItemLike;
-import net.minecraft.world.level.block.Block;
-import net.minecraftforge.client.model.generators.ItemModelBuilder;
-import net.minecraftforge.client.model.generators.ItemModelProvider;
-import net.minecraftforge.client.model.generators.ModelFile.UncheckedModelFile;
-import net.minecraftforge.client.model.generators.ModelProvider;
-import net.minecraftforge.common.data.ExistingFileHelper;
-
-import java.util.function.Supplier;
-
-public class CTItemModelProvider extends ItemModelProvider {
-
- public CTItemModelProvider(DataGenerator generator, ExistingFileHelper existingFileHelper) {
- super(generator, Constants.MOD_ID, existingFileHelper);
- }
-
- @Override
- public String getName() {
- return "CraftTracker Item Models";
- }
-
- @Override
- protected void registerModels() {
-
- }
-
- private ResourceLocation itemTexture(Supplier extends ItemLike> item) {
- return modLoc(ModelProvider.ITEM_FOLDER + "/" + name(item));
- }
-
- private String name(Supplier extends ItemLike> item) {
- return item.get().asItem().getRegistryName().getPath();
- }
-
- private ItemModelBuilder blockItem(Supplier extends Block> block) {
- return blockItem(block, "");
- }
-
- private ItemModelBuilder generated(Supplier extends ItemLike> item) {
- return generated(item, itemTexture(item));
- }
-
- private ItemModelBuilder generated(Supplier extends ItemLike> item, ResourceLocation texture) {
- return getBuilder(name(item)).parent(new UncheckedModelFile(ModelProvider.ITEM_FOLDER + "/generated")).texture("layer0", texture);
- }
-
- private ItemModelBuilder handheld(Supplier extends ItemLike> item) {
- return handheld(item, itemTexture(item));
- }
-
- private ItemModelBuilder handheld(Supplier extends ItemLike> item, ResourceLocation texture) {
- return getBuilder(name(item)).parent(new UncheckedModelFile(ModelProvider.ITEM_FOLDER + "/handheld")).texture("layer0", texture);
- }
-
- private ItemModelBuilder blockItem(Supplier extends Block> block, String suffix) {
- return withExistingParent(name(block), modLoc(ModelProvider.BLOCK_FOLDER + "/" + name(block) + suffix));
- }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/data/CTItemTagsProvider.java b/src/main/java/com/sweetrpg/crafttracker/data/CTItemTagsProvider.java
deleted file mode 100644
index 32a3a8c..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/data/CTItemTagsProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.sweetrpg.crafttracker.data;
-
-import com.sweetrpg.crafttracker.common.lib.Constants;
-import net.minecraft.data.DataGenerator;
-import net.minecraft.data.tags.BlockTagsProvider;
-import net.minecraft.data.tags.ItemTagsProvider;
-import net.minecraft.tags.TagKey;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.level.ItemLike;
-import net.minecraftforge.common.data.ExistingFileHelper;
-
-import java.util.Arrays;
-import java.util.function.Supplier;
-
-public class CTItemTagsProvider extends ItemTagsProvider {
-
- public CTItemTagsProvider(DataGenerator generatorIn, BlockTagsProvider blockTagProvider, ExistingFileHelper existingFileHelper) {
- super(generatorIn, blockTagProvider, Constants.MOD_ID, existingFileHelper);
- }
-
- @Override
- public String getName() {
- return "CraftTracker Item Tags";
- }
-
- @Override
- public void addTags() {
-
- }
-
- @SafeVarargs
- private final void createTag(TagKey
- tag, Supplier extends ItemLike>... items) {
- tag(tag).add(Arrays.stream(items).map(Supplier::get).map(ItemLike::asItem).toArray(Item[]::new));
- }
-
- @SafeVarargs
- private final void appendToTag(TagKey
- tag, TagKey
- ... toAppend) {
- tag(tag).addTags(toAppend);
- }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/data/CTLootTableProvider.java b/src/main/java/com/sweetrpg/crafttracker/data/CTLootTableProvider.java
deleted file mode 100644
index fb0e08a..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/data/CTLootTableProvider.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.sweetrpg.crafttracker.data;
-
-import com.google.common.collect.ImmutableList;
-import com.mojang.datafixers.util.Pair;
-import com.sweetrpg.crafttracker.common.registry.ModBlocks;
-import net.minecraft.data.DataGenerator;
-import net.minecraft.data.loot.BlockLoot;
-import net.minecraft.data.loot.EntityLoot;
-import net.minecraft.data.loot.LootTableProvider;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.entity.EntityType;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.storage.loot.LootTable;
-import net.minecraft.world.level.storage.loot.ValidationContext;
-import net.minecraft.world.level.storage.loot.parameters.LootContextParamSet;
-import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
-
-import java.util.List;
-import java.util.Map;
-import java.util.function.BiConsumer;
-import java.util.function.Consumer;
-import java.util.function.Supplier;
-import java.util.stream.Collectors;
-
-public class CTLootTableProvider extends LootTableProvider {
-
- public CTLootTableProvider(DataGenerator dataGeneratorIn) {
- super(dataGeneratorIn);
- }
-
- @Override
- public String getName() {
- return "CraftTracker Loot Tables";
- }
-
- @Override
- protected List>>, LootContextParamSet>> getTables() {
- return ImmutableList.of(Pair.of(Blocks::new, LootContextParamSets.BLOCK), Pair.of(Entities::new, LootContextParamSets.ENTITY));
- }
-
- @Override
- protected void validate(Map map, ValidationContext validationTracker) {
- }
-
- private static class Blocks extends BlockLoot {
-
- @Override
- protected void addTables() {
- }
-
-
- private void dropsSelf(Supplier extends Block> block) {
- dropSelf(block.get());
- }
-
- @Override
- protected Iterable getKnownBlocks() {
- return ModBlocks.BLOCKS.getEntries().stream().map(Supplier::get).collect(Collectors.toList());
- }
- }
-
- private static class Entities extends EntityLoot {
-
- @Override
- protected void addTables() {
-
- }
-
- protected void registerNoLoot(Supplier extends EntityType>> type) {
- this.add(type.get(), LootTable.lootTable());
- }
-
- @Override
- protected Iterable> getKnownEntities() {
- return List.of();
- }
- }
-}
diff --git a/src/main/java/com/sweetrpg/crafttracker/data/CTRecipeProvider.java b/src/main/java/com/sweetrpg/crafttracker/data/CTRecipeProvider.java
deleted file mode 100644
index 70fc5a3..0000000
--- a/src/main/java/com/sweetrpg/crafttracker/data/CTRecipeProvider.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.sweetrpg.crafttracker.data;
-
-import com.google.gson.JsonObject;
-import com.sweetrpg.crafttracker.CraftTracker;
-import net.minecraft.data.DataGenerator;
-import net.minecraft.data.HashCache;
-import net.minecraft.data.recipes.FinishedRecipe;
-import net.minecraft.data.recipes.RecipeProvider;
-
-import java.nio.file.Path;
-import java.util.function.Consumer;
-
-public class CTRecipeProvider extends RecipeProvider {
-
- public CTRecipeProvider(DataGenerator generatorIn) {
- super(generatorIn);
- }
-
- @Override
- public String getName() {
- return "CraftTracker Recipes";
- }
-
- @Override
- protected void buildCraftingRecipes(Consumer consumer) {
- CraftTracker.LOGGER.debug("Build crafting recipes: {}", consumer);
-
- // shopping list
- }
-
- @Override
- protected void saveAdvancement(HashCache cache, JsonObject advancementJson, Path pathIn) {
- // NOOP - We don't replace any of the advancement things yet...
- }
-}
diff --git a/src/main/resources/assets/crafttracker/ingredient-costs.properties b/src/main/resources/assets/crafttracker/ingredient-costs.properties
deleted file mode 100644
index 5a15c5d..0000000
--- a/src/main/resources/assets/crafttracker/ingredient-costs.properties
+++ /dev/null
@@ -1,308 +0,0 @@
-minecraft\:anvil=10
-minecraft\:arrows=10
-minecraft\:banners=10
-minecraft\:barrels=10
-minecraft\:barrels_wooden=10
-minecraft\:beds=10
-minecraft\:boats=20
-minecraft\:bones=5
-minecraft\:bookshelves=50
-minecraft\:buttons=10
-minecraft\:candles=10
-minecraft\:carpets=10
-minecraft\:chests=10
-minecraft\:chests_ender=475
-minecraft\:chests_trapped=10
-minecraft\:chests_wooden=10
-minecraft\:coal_ores=20
-minecraft\:coals=20
-minecraft\:cobblestone=5
-minecraft\:cobblestone_deepslate=7
-minecraft\:cobblestone_mossy=10
-minecraft\:cobblestone_normal=5
-minecraft\:copper_ores=50
-minecraft\:crimson_stems=10
-minecraft\:crops=10
-minecraft\:diamond_ores=500
-minecraft\:dirt=1
-minecraft\:doors=10
-minecraft\:dusts=120
-minecraft\:dusts_glowstone=137
-minecraft\:dusts_prismarine=250
-minecraft\:dusts_redstone=137
-minecraft\:dyes=10
-minecraft\:dyes_black=15
-minecraft\:dyes_blue=10
-minecraft\:dyes_brown=10
-minecraft\:dyes_cyan=10
-minecraft\:dyes_gray=10
-minecraft\:dyes_green=15
-minecraft\:dyes_light_blue=10
-minecraft\:dyes_light_gray=10
-minecraft\:dyes_lime=10
-minecraft\:dyes_magenta=10
-minecraft\:dyes_orange=10
-minecraft\:dyes_pink=10
-minecraft\:dyes_purple=10
-minecraft\:dyes_red=10
-minecraft\:dyes_white=10
-minecraft\:dyes_yellow=10
-minecraft\:eggs=10
-minecraft\:emerald_ores=400
-minecraft\:enchanting_fuels=100
-minecraft\:end_stones=150
-minecraft\:ender_pearls=150
-minecraft\:feathers=10
-minecraft\:fence_gates=10
-minecraft\:fence_gates_wooden=10
-minecraft\:fences=10
-minecraft\:fences_nether_brick=10
-minecraft\:fences_wooden=10
-minecraft\:fishes=10
-minecraft\:flowers=5
-minecraft\:gems=150
-minecraft\:gems_amethyst=150
-minecraft\:gems_diamond=500
-minecraft\:gems_emerald=400
-minecraft\:gems_lapis=250
-minecraft\:gems_prismarine=250
-minecraft\:gems_quartz=300
-minecraft\:glass=10
-minecraft\:glass_panes=20
-minecraft\:glass_silica=20
-minecraft\:glass_tinted=20
-minecraft\:gold_ores=250
-minecraft\:gravel=2
-minecraft\:gunpowder=50
-minecraft\:heads=100
-minecraft\:ingots=15
-minecraft\:ingots_brick=16
-minecraft\:ingots_copper=55
-minecraft\:ingots_gold=310
-minecraft\:ingots_iron=110
-minecraft\:ingots_nether_brick=20
-minecraft\:ingots_netherite=750
-minecraft\:iron_ores=110
-minecraft\:lapis_ores=250
-minecraft\:leather=50
-minecraft\:leaves=2
-minecraft\:lectern_books=100
-minecraft\:logs=10
-minecraft\:logs_that_burn=10
-minecraft\:mushrooms=2
-minecraft\:music_discs=10
-minecraft\:nether_stars=900
-minecraft\:netherrack=5
-minecraft\:non_flammable_wood=10
-minecraft\:nuggets=2
-minecraft\:nuggets_gold=33
-minecraft\:nuggets_iron=11
-minecraft\:obsidian=400
-minecraft\:ore_bearing_ground_deepslate=10
-minecraft\:ore_bearing_ground_netherrack=10
-minecraft\:ore_bearing_ground_stone=10
-minecraft\:ores=10
-minecraft\:ores_coal=25
-minecraft\:ores_copper=50
-minecraft\:ores_diamond=500
-minecraft\:ores_emerald=400
-minecraft\:ores_gold=300
-minecraft\:ores_in_ground_deepslate=10
-minecraft\:ores_in_ground_netherrack=10
-minecraft\:ores_in_ground_stone=10
-minecraft\:ores_iron=100
-minecraft\:ores_lapis=250
-minecraft\:ores_netherite_scrap=750
-minecraft\:ores_quartz=300
-minecraft\:ores_redstone=200
-minecraft\:planks=10
-minecraft\:rails=10
-minecraft\:raw_materials=10
-minecraft\:raw_materials_copper=50
-minecraft\:raw_materials_gold=300
-minecraft\:raw_materials_iron=100
-minecraft\:redstone_ores=200
-minecraft\:rods=50
-minecraft\:rods_blaze=450
-minecraft\:rods_wooden=10
-minecraft\:sand=10
-minecraft\:sand_colorless=10
-minecraft\:sand_red=10
-minecraft\:sandstone=15
-minecraft\:saplings=2
-minecraft\:seeds=2
-minecraft\:shears=10
-minecraft\:signs=10
-minecraft\:slimeballs=40
-minecraft\:small_flowers=10
-minecraft\:soul_fire_base_blocks=100
-minecraft\:stained_glass=10
-minecraft\:stained_glass_panes=10
-minecraft\:stone=5
-minecraft\:stone_bricks=5
-minecraft\:string=15
-minecraft\:tall_flowers=5
-minecraft\:terracotta=100
-minecraft\:warped_stems=250
-minecraft\:wooden_buttons=10
-minecraft\:wooden_doors=60
-minecraft\:wooden_fences=10
-minecraft\:wooden_pressure_plates=20
-minecraft\:wooden_slabs=30
-minecraft\:wooden_stairs=60
-minecraft\:wooden_trapdoors=60
-minecraft\:wool=10
-forge\:anvil=10
-forge\:arrows=10
-forge\:banners=10
-forge\:barrels=10
-forge\:barrels_wooden=10
-forge\:beds=10
-forge\:boats=20
-forge\:bones=5
-forge\:bookshelves=50
-forge\:buttons=10
-forge\:candles=10
-forge\:carpets=10
-forge\:chests=10
-forge\:chests/ender=475
-forge\:chests/trapped=10
-forge\:chests/wooden=10
-forge\:coal_ores=20
-forge\:coals=20
-forge\:cobblestone=5
-forge\:cobblestone_deepslate=7
-forge\:cobblestone_mossy=10
-forge\:cobblestone_normal=5
-forge\:copper_ores=50
-forge\:crimson_stems=10
-forge\:crops=10
-forge\:diamond_ores=500
-forge\:dirt=1
-forge\:doors=10
-forge\:dusts=120
-forge\:dusts_glowstone=137
-forge\:dusts_prismarine=250
-forge\:dusts_redstone=137
-forge\:dyes=10
-forge\:dyes_black=15
-forge\:dyes_blue=10
-forge\:dyes_brown=10
-forge\:dyes_cyan=10
-forge\:dyes_gray=10
-forge\:dyes_green=15
-forge\:dyes_light_blue=10
-forge\:dyes_light_gray=10
-forge\:dyes_lime=10
-forge\:dyes_magenta=10
-forge\:dyes_orange=10
-forge\:dyes_pink=10
-forge\:dyes_purple=10
-forge\:dyes_red=10
-forge\:dyes_white=10
-forge\:dyes_yellow=10
-forge\:eggs=10
-forge\:emerald_ores=400
-forge\:enchanting_fuels=100
-forge\:end_stones=150
-forge\:ender_pearls=150
-forge\:feathers=10
-forge\:fence_gates=10
-forge\:fence_gates_wooden=10
-forge\:fences=10
-forge\:fences_nether_brick=10
-forge\:fences_wooden=10
-forge\:fishes=10
-forge\:flowers=5
-forge\:gems=150
-forge\:gems_amethyst=150
-forge\:gems_diamond=500
-forge\:gems_emerald=400
-forge\:gems_lapis=250
-forge\:gems_prismarine=250
-forge\:gems_quartz=300
-forge\:glass=10
-forge\:glass_panes=20
-forge\:glass_silica=20
-forge\:glass_tinted=20
-forge\:gold_ores=250
-forge\:gravel=2
-forge\:gunpowder=50
-forge\:heads=100
-forge\:ingots=15
-forge\:ingots_brick=16
-forge\:ingots_copper=55
-forge\:ingots_gold=310
-forge\:ingots_iron=110
-forge\:ingots_nether_brick=20
-forge\:ingots_netherite=750
-forge\:iron_ores=110
-forge\:lapis_ores=250
-forge\:leather=50
-forge\:leaves=2
-forge\:lectern_books=100
-forge\:logs=10
-forge\:logs_that_burn=10
-forge\:mushrooms=2
-forge\:music_discs=10
-forge\:nether_stars=900
-forge\:netherrack=5
-forge\:non_flammable_wood=10
-forge\:nuggets=2
-forge\:nuggets_gold=33
-forge\:nuggets_iron=11
-forge\:obsidian=400
-forge\:ore_bearing_ground_deepslate=10
-forge\:ore_bearing_ground_netherrack=10
-forge\:ore_bearing_ground_stone=10
-forge\:ores=10
-forge\:ores_coal=25
-forge\:ores_copper=50
-forge\:ores_diamond=500
-forge\:ores_emerald=400
-forge\:ores_gold=300
-forge\:ores_in_ground_deepslate=10
-forge\:ores_in_ground_netherrack=10
-forge\:ores_in_ground_stone=10
-forge\:ores_iron=100
-forge\:ores_lapis=250
-forge\:ores_netherite_scrap=750
-forge\:ores_quartz=300
-forge\:ores_redstone=200
-forge\:planks=10
-forge\:rails=10
-forge\:raw_materials=10
-forge\:raw_materials_copper=50
-forge\:raw_materials_gold=300
-forge\:raw_materials_iron=100
-forge\:redstone_ores=200
-forge\:rods=50
-forge\:rods_blaze=450
-forge\:rods_wooden=10
-forge\:sand=10
-forge\:sand_colorless=10
-forge\:sand_red=10
-forge\:sandstone=15
-forge\:saplings=2
-forge\:seeds=2
-forge\:shears=10
-forge\:signs=10
-forge\:slimeballs=40
-forge\:small_flowers=10
-forge\:soul_fire_base_blocks=100
-forge\:stained_glass=10
-forge\:stained_glass_panes=10
-forge\:stone=5
-forge\:stone_bricks=5
-forge\:string=15
-forge\:tall_flowers=5
-forge\:terracotta=100
-forge\:warped_stems=250
-forge\:wooden_buttons=10
-forge\:wooden_doors=60
-forge\:wooden_fences=10
-forge\:wooden_pressure_plates=20
-forge\:wooden_slabs=30
-forge\:wooden_stairs=60
-forge\:wooden_trapdoors=60
-forge\:wool=10
diff --git a/src/main/resources/assets/crafttracker/ingredient-overrides.properties b/src/main/resources/assets/crafttracker/ingredient-overrides.properties
deleted file mode 100644
index a620283..0000000
--- a/src/main/resources/assets/crafttracker/ingredient-overrides.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-create\:precision_mechanism=250
-minecraft\:trapped_chest=11
diff --git a/src/test/java/com/sweetrpg/crafttracker/test/CacheTest.java b/src/test/java/com/sweetrpg/crafttracker/test/CacheTest.java
deleted file mode 100644
index ce5d3bc..0000000
--- a/src/test/java/com/sweetrpg/crafttracker/test/CacheTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.sweetrpg.crafttracker.test;
-
-import static org.junit.jupiter.api.Assertions.*;
-
-import org.junit.jupiter.api.Test;
-
-import com.sweetrpg.crafttracker.common.util.Cache;
-
-public class CacheTest {
-
- @Test
- public void test() {
- Cache cache = Cache.make(() -> new String("string"));
- String first = cache.get();
- String second = cache.get();
-
- cache.markForRefresh();
- String third = cache.get();
-
- assertSame(first, second);
- assertNotSame(second, third);
-
- assertTrue(cache.test((v) -> v.length() == 6));
- }
-}
diff --git a/src/test/java/com/sweetrpg/crafttracker/test/crafttracker/common/util/UtilTest.java b/src/test/java/com/sweetrpg/crafttracker/test/crafttracker/common/util/UtilTest.java
deleted file mode 100644
index c22ea41..0000000
--- a/src/test/java/com/sweetrpg/crafttracker/test/crafttracker/common/util/UtilTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.sweetrpg.crafttracker.test.crafttracker.common.util;
-
-import org.junit.jupiter.api.Test;
-
-public class UtilTest {
-
- @Test
- public void testGetRegistryId() {
-// ResourceLocation dirtRL = new ResourceLocation("minecraft:dirt");
-// assertEquals(dirtRL, getRegistryId("minecraft:dirt"));
-// assertEquals(dirtRL, getRegistryId(dirtRL));
-// assertEquals(dirtRL, getRegistryId(RegistryObject.of(dirtRL, Block.class, "dummy_mod")));
-//
-// assertEquals(dirtRL, getRegistryId(new IRegistryDelegate() {
-// @Override public ResourceLocation name() { return dirtRL; }
-// // Methods should never be called
-// @Override public Class type() { return Block.class; }
-// @Override public Block get() { return null; }
-// }));
-//
-// assertEquals(dirtRL, getRegistryId(new IForgeRegistryEntry() {
-// @Override public ResourceLocation getRegistryName() { return dirtRL; }
-// // Methods should never be called
-// @Override public Class getRegistryType() { return Block.class; }
-// @Override public Block setRegistryName(ResourceLocation name) { return null; }
-// }));
-//
-// assertNull(getRegistryId("name:space:invalid")); // invalid rl's should return null
-// assertNull(getRegistryId(Integer.valueOf(0))); // other object types too
- }
-}