Skip to content

Commit

Permalink
feat: change downgrade digestion recipes to not need purified gold
Browse files Browse the repository at this point in the history
Closes #166
  • Loading branch information
klikli-dev committed Jan 27, 2024
1 parent a4965ad commit 92f19c1
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 66 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// 1.20.4 2024-01-17T16:43:37.159883 Digestion Recipes
6dd2189c67c199fbd06cff3e00a83346199a2b32 data/theurgy/recipes/digestion/alchemical_sulfur_gems_abundant_from_common.json
// 1.20.4 2024-01-27T08:06:31.2271403 Digestion Recipes
98b34d30ceed74472a74dda3ee23ea4e144076aa data/theurgy/recipes/digestion/alchemical_sulfur_gems_abundant_from_common.json
071e26781ce4eb98e8c8803cee053269957518e6 data/theurgy/recipes/digestion/alchemical_sulfur_gems_common_from_abundant.json
a328fd1f1a457511a72ce02d5837b56c8013ff5d data/theurgy/recipes/digestion/alchemical_sulfur_gems_common_from_rare.json
71a78cb8786e9bd4fdc797de6652625d11c41d9e data/theurgy/recipes/digestion/alchemical_sulfur_gems_common_from_rare.json
9ce22358ffcc2dd66d46832a1ce645c4776b78e9 data/theurgy/recipes/digestion/alchemical_sulfur_gems_precious_from_rare.json
51ec220ec288313446c1f44b688465d5dd64dbf7 data/theurgy/recipes/digestion/alchemical_sulfur_gems_rare_from_common.json
ff0761d289e90985980ef9804449f07227c84339 data/theurgy/recipes/digestion/alchemical_sulfur_gems_rare_from_precious.json
49ab3ffa8a6e35d642af0bc0b2a0ab5bfda9f805 data/theurgy/recipes/digestion/alchemical_sulfur_metals_abundant_from_common.json
3d45ab9db06abf6ea00a7968dcfb4e763c0639c6 data/theurgy/recipes/digestion/alchemical_sulfur_gems_rare_from_precious.json
092ab6b005115b045d9a8164beeea9cc5c94f880 data/theurgy/recipes/digestion/alchemical_sulfur_metals_abundant_from_common.json
d74c6f62c278f16b1078f14b61b28118b00b8a59 data/theurgy/recipes/digestion/alchemical_sulfur_metals_common_from_abundant.json
9b4264c9b9788ac3458d84e41803d11678faa5b9 data/theurgy/recipes/digestion/alchemical_sulfur_metals_common_from_rare.json
bdcf9f437e030d8369a966920b4079ca9cfbc952 data/theurgy/recipes/digestion/alchemical_sulfur_metals_common_from_rare.json
024210cf0056ab8efeeabef20c48f336286cd943 data/theurgy/recipes/digestion/alchemical_sulfur_metals_precious_from_rare.json
317596916205b52ad1345acc5388b3761530c42f data/theurgy/recipes/digestion/alchemical_sulfur_metals_rare_from_common.json
a2a500c71cde4e496a461cdefedf7ee08519e7de data/theurgy/recipes/digestion/alchemical_sulfur_metals_rare_from_precious.json
86e067706671026f24a4e0f15edb9b20fd4e7666 data/theurgy/recipes/digestion/alchemical_sulfur_other_minerals_abundant_from_common.json
1377d90bdc20fa8017fc825037d1ce9510aadacb data/theurgy/recipes/digestion/alchemical_sulfur_metals_rare_from_precious.json
76fd54c87196b15335b82cea12cea3c94f31e1d2 data/theurgy/recipes/digestion/alchemical_sulfur_other_minerals_abundant_from_common.json
2a1793cc5525f5b0756f5cf3081392e445994a68 data/theurgy/recipes/digestion/alchemical_sulfur_other_minerals_common_from_abundant.json
df8f3f66fd4e3e0fede78f918e5fa664b8739e1b data/theurgy/recipes/digestion/alchemical_sulfur_other_minerals_common_from_rare.json
dc5d4b39678f02b0b204dd5352c90567f2f5da03 data/theurgy/recipes/digestion/alchemical_sulfur_other_minerals_common_from_rare.json
5638065b1969c6ffb006983a127c88ab3d52cf09 data/theurgy/recipes/digestion/alchemical_sulfur_other_minerals_precious_from_rare.json
dd4cfaa1fb43fa72fa6128ee7c52811879955d0b data/theurgy/recipes/digestion/alchemical_sulfur_other_minerals_rare_from_common.json
8e0a2492be52ac321fd520571fff530cf1748e46 data/theurgy/recipes/digestion/alchemical_sulfur_other_minerals_rare_from_precious.json
90a599488f36f0a56f0b1c18a567452c75783b7d data/theurgy/recipes/digestion/alchemical_sulfur_other_minerals_rare_from_precious.json
e976dde05980f8f3cef51e5fc45b0f5dec3e7262 data/theurgy/recipes/digestion/purified_gold.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.4 2024-01-16T15:38:38.1752171 Languages: en_us
e51d3f87db43a367b15cb5b0f2844f4d4cdad2a9 assets/theurgy/lang/en_us.json
// 1.20.4 2024-01-27T08:06:31.2341441 Languages: en_us
fe8ef516da63fa8669dd7ee023113f0ef1e5becd assets/theurgy/lang/en_us.json
6 changes: 3 additions & 3 deletions src/generated/resources/assets/theurgy/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
"book.theurgy.the_hermetica.getting_started.digestion_exaltation.description": "Convert Common Metals Niter into Rare Metals Niter",
"book.theurgy.the_hermetica.getting_started.digestion_exaltation.intro.text": "The key process of Exaltation is the Digestion of lower Niter into higher Niter (or vice versa).\n\\\n\\\nWe need 4 [Alchemical Niter: Common Metals](item://theurgy:alchemical_sulfur_metals_common) to create 1 [Alchemical Niter: Rare Metals](item://theurgy:alchemical_sulfur_metals_rare).\n",
"book.theurgy.the_hermetica.getting_started.digestion_exaltation.intro.title": "Digestion",
"book.theurgy.the_hermetica.getting_started.digestion_exaltation.metals.text": "[#](008080)Right-click[#]() the [](item://theurgy:digestion_vat) with the ingredients to place them inside:\n- 4x [Alchemical Niter: Common Metals](item://theurgy:alchemical_sulfur_metals_common)\n- [](item://theurgy:sal_ammoniac_bucket)\n- [](item://theurgy:purified_gold)\n\n(Check JEI for more recipes)\n",
"book.theurgy.the_hermetica.getting_started.digestion_exaltation.metals.text": "[#](008080)Right-click[#]() the [](item://theurgy:digestion_vat) with the ingredients to place them inside:\n- 4x [Alchemical Niter: Common Metals](item://theurgy:alchemical_sulfur_metals_common)\n- [](item://theurgy:sal_ammoniac_bucket)\n- [](item://theurgy:purified_gold)\n\n_Gold is not needed for \"downgrade\", only for \"upgrade\"._\n\\\n(Check JEI for more recipes)\n",
"book.theurgy.the_hermetica.getting_started.digestion_exaltation.metals.title": "Alchemical Niter: Rare Metals",
"book.theurgy.the_hermetica.getting_started.digestion_exaltation.name": "Digestion",
"book.theurgy.the_hermetica.getting_started.digestion_exaltation.start.text": "[#](008080)Shift-right-click[#]() the [](item://theurgy:digestion_vat) with an [#](008080)empty hand[#]() to close the vat and start the digestion.\n\\\n\\\nOnce it opens again the process is complete.\n\\\n\\\n[#](008080)Right-click[#]() with an empty hand to retrieve the [Alchemical Niter: Rare Metals](item://theurgy:alchemical_sulfur_metals_rare).\n",
Expand Down Expand Up @@ -501,7 +501,7 @@
"book.theurgy.the_hermetica.getting_started.purified_gold.description": "The Catalysator for Niter Digestion",
"book.theurgy.the_hermetica.getting_started.purified_gold.digestion.text": "[#](008080)Right-click[#]() the [](item://theurgy:digestion_vat) with the ingredients to place them inside:\n- [](item://minecraft:gold_ingot)\n- [Any Alchemical Salt](item://theurgy:alchemical_salt_mineral)\n- [](item://minecraft:water_bucket)\n",
"book.theurgy.the_hermetica.getting_started.purified_gold.digestion.title": "Digestion of Gold",
"book.theurgy.the_hermetica.getting_started.purified_gold.gold.text": "Purified Gold acts as a catalyst for Niter Digestion, making the already malleable Niter even more so. This allows Niter to be processed into a different tier by combining or splitting it.\n",
"book.theurgy.the_hermetica.getting_started.purified_gold.gold.text": "Purified Gold acts as a catalyst for Niter Digestion, making the already malleable Niter even more so. This allows Niter to be processed into a higher tier by combining it. The reverse process does not need a catalyst.\n",
"book.theurgy.the_hermetica.getting_started.purified_gold.name": "Purified Gold",
"book.theurgy.the_hermetica.getting_started.purified_gold.purifying.text": "Purification is achieved - somewhat counterintuitively - by Digestion. However, luckily, it does not need [](item://theurgy:purified_gold) as catalyst.\n\\\n\\\nInstead, any [Alchemical Salt](item://theurgy:alchemical_salt_mineral) can be used. The Salt will connect with the impurities in the Gold and draw them out.\n",
"book.theurgy.the_hermetica.getting_started.purified_gold.purifying.title": "Purifying Gold",
Expand Down Expand Up @@ -548,7 +548,7 @@
"book.theurgy.the_hermetica.getting_started.required_items.target.text": "Then you also need *one* sulfur of the target type. For this demonstration we will use sulfur of quartz.\n",
"book.theurgy.the_hermetica.getting_started.required_items.target.title": "Target Sulfur",
"book.theurgy.the_hermetica.getting_started.required_items_exaltation.catalyst.text": "Finally we need purified gold as a catalyst for the Digestion process.\n\\\n\\\nThe next entry will describe how to obtain it from [](item://minecraft:gold_ingot), [any Alchemical Salt](item://theurgy:alchemical_salt_mineral) and [](item://minecraft:water_bucket).\n",
"book.theurgy.the_hermetica.getting_started.required_items_exaltation.catalyst.title": "catalyst",
"book.theurgy.the_hermetica.getting_started.required_items_exaltation.catalyst.title": "Catalyst",
"book.theurgy.the_hermetica.getting_started.required_items_exaltation.description": "The items needed for this process",
"book.theurgy.the_hermetica.getting_started.required_items_exaltation.name": "Required Items",
"book.theurgy.the_hermetica.getting_started.required_items_exaltation.source.text": "Again we need some sulfur to convert into your desired sulfur. For this demonstration we will use sulfur of Iron.\n\\\n\\\nWe need 4 iron sulfur per 1 gold sulfur we want to create.\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
{
"count": 1,
"item": "theurgy:alchemical_sulfur_gems_common"
},
{
"count": 1,
"item": "theurgy:purified_gold"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
{
"count": 1,
"item": "theurgy:alchemical_sulfur_gems_rare"
},
{
"count": 1,
"item": "theurgy:purified_gold"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
{
"count": 1,
"item": "theurgy:alchemical_sulfur_gems_precious"
},
{
"count": 1,
"item": "theurgy:purified_gold"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
{
"count": 1,
"item": "theurgy:alchemical_sulfur_metals_common"
},
{
"count": 1,
"item": "theurgy:purified_gold"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
{
"count": 1,
"item": "theurgy:alchemical_sulfur_metals_rare"
},
{
"count": 1,
"item": "theurgy:purified_gold"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
{
"count": 1,
"item": "theurgy:alchemical_sulfur_metals_precious"
},
{
"count": 1,
"item": "theurgy:purified_gold"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
{
"count": 1,
"item": "theurgy:alchemical_sulfur_other_minerals_common"
},
{
"count": 1,
"item": "theurgy:purified_gold"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
{
"count": 1,
"item": "theurgy:alchemical_sulfur_other_minerals_rare"
},
{
"count": 1,
"item": "theurgy:purified_gold"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
{
"count": 1,
"item": "theurgy:alchemical_sulfur_other_minerals_precious"
},
{
"count": 1,
"item": "theurgy:purified_gold"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ public boolean matches(RecipeWrapperWithFluid pContainer, Level pLevel) {
return false;

IntList visited = new IntArrayList();
for (var ingredient : this.ingredientsWithCount) {
//first check for each ingredient if we have it in the container
for(var ingredient : this.ingredientsWithCount) {
var found = false;
for (int i = 0; i < pContainer.getContainerSize(); i++) {
if (visited.contains(i))
for(int i = 0; i < pContainer.getContainerSize(); i++) {
//skip already visited slots to not "double dip"
if(visited.contains(i))
continue;

var stack = pContainer.getItem(i);
Expand All @@ -85,6 +87,16 @@ public boolean matches(RecipeWrapperWithFluid pContainer, Level pLevel) {
return false;
}

//Now make sure that we have no additional ingredients
for(int i = 0; i < pContainer.getContainerSize(); i++) {
if(visited.contains(i))
continue;

var stack = pContainer.getItem(i);
if(!stack.isEmpty())
return false;
}

return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ The key process of Exaltation is the Digestion of lower Niter into higher Niter
);
this.pageTitle("Alchemical Niter: Rare Metals");
this.pageText("""
[#]($INPUT)Right-click[#]() the {0} with the ingredients to place them inside:
- 4x {1}
- {2}
- {3}
(Check JEI for more recipes)
""",
[#]($INPUT)Right-click[#]() the {0} with the ingredients to place them inside:
- 4x {1}
- {2}
- {3}
_Gold is not needed for "downgrade", only for "upgrade"._
\\
(Check JEI for more recipes)
""",
this.itemLink(ItemRegistry.DIGESTION_VAT.get()),
this.itemLink("Alchemical Niter: Common Metals", SulfurRegistry.METALS_COMMON.get()),
this.itemLink(ItemRegistry.SAL_AMMONIAC_BUCKET.get()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected void generatePages() {
.withTitle(this.context().pageTitle())
.withText(this.context().pageText()));
this.pageText("""
Purified Gold acts as a catalyst for Niter Digestion, making the already malleable Niter even more so. This allows Niter to be processed into a different tier by combining or splitting it.
Purified Gold acts as a catalyst for Niter Digestion, making the already malleable Niter even more so. This allows Niter to be processed into a higher tier by combining it. The reverse process does not need a catalyst.
"""
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ Because we are converting within the same type (metals) you only need *one* sulf
this.page("catalyst", () -> BookSpotlightPageModel.create()
.withItem(Ingredient.of(ItemRegistry.PURIFIED_GOLD.get()))
.withTitle(this.context().pageTitle())
.withText(this.context().pageText()));
this.pageTitle("catalyst");
.withText(this.context().pageText())
);
this.pageTitle("Catalyst");
this.pageText("""
Finally we need purified gold as a catalyst for the Digestion process.
\\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public void makeTierConversion(AlchemicalSulfurItem lower, AlchemicalSulfurItem
), higher, 1, TIME * 5, "_from_" + lower.tier().name().toLowerCase());

this.makeRecipe(FluidRegistry.SAL_AMMONIAC.get(), salAmmoniacAmount, List.of(
Pair.of(higher, 1),
Pair.of(ItemRegistry.PURIFIED_GOLD.get(), 1)
Pair.of(higher, 1)
), lower, conversionFactor, TIME * 5, "_from_" + higher.tier().name().toLowerCase());
}

Expand Down

0 comments on commit 92f19c1

Please sign in to comment.