From d867858e5226865f519be1ba59c96b87cf73a294 Mon Sep 17 00:00:00 2001 From: Kli Kli Date: Mon, 24 Jun 2024 08:40:52 +0200 Subject: [PATCH] fix: various fixes Closes #1132 Closes #1134 Closes #1133 Closes #1131 --- gradle.properties | 8 ++--- .../assets/occultism/lang/en_us.json | 1 + ...ons_dream_essence_from_fruit_or_seed.json} | 4 +-- .../demons_dream_essence_from_seeds.json | 32 ------------------- .../books/dictionary_of_spirits/book.json | 3 +- .../entries/getting_started/demons_dream.json | 8 ++--- .../getting_started/divination_rod.json | 3 +- .../entries/getting_started/first_ritual.json | 3 +- .../entries/getting_started/spirit_fire.json | 3 +- .../entries/pentacles/pentacles_overview.json | 3 +- ...ons_dream_essence_from_fruit_or_seed.json} | 11 +++++-- .../demons_dream_essence_from_seeds.json | 18 ----------- .../crushing/blaze_powder_from_rod.json | 6 ++-- .../recipe/ritual/summon_foliot_crusher.json | 8 ++--- .../datagen/OccultismBookProvider.java | 14 ++++---- .../recipe/OccultismRecipeProvider.java | 22 ++++++------- .../datagen/recipe/RitualRecipes.java | 8 ++--- .../builders/CrushingRecipeBuilder.java | 4 +++ .../registry/OccultismCreativeModeTabs.java | 15 +++++++-- .../occultism/registry/OccultismItems.java | 15 +++++++++ .../occultism/registry/OccultismTags.java | 1 + 21 files changed, 91 insertions(+), 99 deletions(-) rename src/generated/resources/data/occultism/advancement/recipes/food/crafting/{demons_dream_essence_from_fruit.json => demons_dream_essence_from_fruit_or_seed.json} (87%) delete mode 100644 src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_seeds.json rename src/generated/resources/data/occultism/recipe/crafting/{demons_dream_essence_from_fruit.json => demons_dream_essence_from_fruit_or_seed.json} (64%) delete mode 100644 src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_seeds.json diff --git a/gradle.properties b/gradle.properties index 715025303..c14ed8013 100644 --- a/gradle.properties +++ b/gradle.properties @@ -49,10 +49,10 @@ smartbrainlib_version=1.14.3 smartbrainlib_version_range=[1.14.3,) almost_unified_version=0.5.0 almost_unified_version_range=[0.5.0,) -modonomicon_version=1.78.1 -modonomicon_version_range=[1.78.1,) -theurgy_version=1.20.0 -theurgy_version_range=[1.20.0,) +modonomicon_version=1.90.2 +modonomicon_version_range=[1.90.0,) +theurgy_version=1.23.0 +theurgy_version_range=[1.23.0,) per_viam_invenire_version_range=[0.1.57,) emi_version=1.1.7+1.21 emi_version_range=[1.1.7+1.21,) \ No newline at end of file diff --git a/src/generated/resources/assets/occultism/lang/en_us.json b/src/generated/resources/assets/occultism/lang/en_us.json index baf56fd3c..02c4e595e 100644 --- a/src/generated/resources/assets/occultism/lang/en_us.json +++ b/src/generated/resources/assets/occultism/lang/en_us.json @@ -309,6 +309,7 @@ "book.occultism.dictionary_of_spirits.getting_started.demons_dream.intro2.text": "These Demons possess a wide variety of powers and useful skills, and for centuries magicians have sought to summon them for their own gain.\nThe first step on the journey to successfully summoning such an Entity is to learn how to interact with the Otherworld.\n", "book.occultism.dictionary_of_spirits.getting_started.demons_dream.name": "Lifting the Veil", "book.occultism.dictionary_of_spirits.getting_started.demons_dream.note_on_spirit_fire.text": "**Hint**: The otherworld materials you obtain by harvesting under the effects of[#](ad03fc)Third Eye[#]() **can be obtained more easily using [](item://occultism:spirit_fire)**. Proceed with the next entry in this book to learn more about spirit fire.\n", + "book.occultism.dictionary_of_spirits.getting_started.demons_dream.recipe_essence.text": "Fruit and seeds can be mixed freely to create the essence.\n", "book.occultism.dictionary_of_spirits.getting_started.demons_dream.spotlight.text": "Demon's Dream is a herb that gives humans the [#](ad03fc)Third Eye[#](),\nallowing them to see where the [#](ad03fc)Otherworld[#]() intersects with our own.\nSeeds can be found **by breaking grass**.\n**Consuming** the grown fruit activates the ability *with a certain chance*.\n", "book.occultism.dictionary_of_spirits.getting_started.demons_dream.spotlight2.text": "Multiple Demon's Dream fruits or seeds can be compressed into an essence that is much more potent. It *guarantees* the [#](ad03fc)Third Eye[#]() and provides it for a longer amount of time, but comes with a lot of (positive and negative) side effects.\n", "book.occultism.dictionary_of_spirits.getting_started.demons_dream.spotlight3.text": "The essence can be purified in spirit fire (more on that later!) to obtain a version free from all negative side effects, while retaining the positive.\n", diff --git a/src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_fruit.json b/src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_fruit_or_seed.json similarity index 87% rename from src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_fruit.json rename to src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_fruit_or_seed.json index af78e504d..e75728600 100644 --- a/src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_fruit.json +++ b/src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_fruit_or_seed.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "occultism:crafting/demons_dream_essence_from_fruit" + "recipe": "occultism:crafting/demons_dream_essence_from_fruit_or_seed" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "occultism:crafting/demons_dream_essence_from_fruit" + "occultism:crafting/demons_dream_essence_from_fruit_or_seed" ] } } \ No newline at end of file diff --git a/src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_seeds.json b/src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_seeds.json deleted file mode 100644 index 084011b81..000000000 --- a/src/generated/resources/data/occultism/advancement/recipes/food/crafting/demons_dream_essence_from_seeds.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_datura": { - "conditions": { - "items": [ - { - "items": "#c:seeds/datura" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "occultism:crafting/demons_dream_essence_from_seeds" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_the_recipe", - "has_datura" - ] - ], - "rewards": { - "recipes": [ - "occultism:crafting/demons_dream_essence_from_seeds" - ] - } -} \ No newline at end of file diff --git a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/book.json b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/book.json index 93a51f4e7..114b10d8b 100644 --- a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/book.json +++ b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/book.json @@ -2,6 +2,7 @@ "auto_add_read_conditions": true, "book_content_texture": "modonomicon:textures/gui/book_content.png", "book_overview_texture": "modonomicon:textures/gui/book_overview.png", + "book_text_offset_height": 0, "book_text_offset_width": 0, "book_text_offset_x": 0, "book_text_offset_y": 0, @@ -51,7 +52,7 @@ "search_button_x_offset": 0, "search_button_y_offset": 0, "single_page_texture": "modonomicon:textures/gui/single_page_entry.png", - "tooltip": "", + "tooltip": "book.occultism.dictionary_of_spirits.tooltip", "top_frame_overlay": { "frame_height": 7, "frame_width": 72, diff --git a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/demons_dream.json b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/demons_dream.json index 2c36ccf6a..52dc5b8fe 100644 --- a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/demons_dream.json +++ b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/demons_dream.json @@ -65,7 +65,8 @@ "occultism:textures/gui/book/datura_effect.png" ], "text": "", - "title": "" + "title": "", + "use_legacy_rendering": false }, { "type": "modonomicon:text", @@ -96,9 +97,8 @@ "condition": { "type": "modonomicon:none" }, - "recipe_id_1": "occultism:crafting/demons_dream_essence_from_fruit", - "recipe_id_2": "occultism:crafting/demons_dream_essence_from_seeds", - "text": "", + "recipe_id_1": "occultism:crafting/demons_dream_essence_from_fruit_or_seed", + "text": "book.occultism.dictionary_of_spirits.getting_started.demons_dream.recipe_essence.text", "title1": "", "title2": "" }, diff --git a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/divination_rod.json b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/divination_rod.json index 1386efea9..ad4739a32 100644 --- a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/divination_rod.json +++ b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/divination_rod.json @@ -133,7 +133,8 @@ "occultism:textures/gui/book/rod_near.png" ], "text": "book.occultism.dictionary_of_spirits.getting_started.divination_rod.divination_rod_screenshots.text", - "title": "" + "title": "", + "use_legacy_rendering": false }, { "type": "modonomicon:text", diff --git a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/first_ritual.json b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/first_ritual.json index aa202d877..04aae084f 100644 --- a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/first_ritual.json +++ b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/first_ritual.json @@ -53,7 +53,8 @@ "occultism:textures/gui/book/bowl_placement.png" ], "text": "book.occultism.dictionary_of_spirits.getting_started.first_ritual.bowl_placement.text", - "title": "" + "title": "", + "use_legacy_rendering": false }, { "type": "modonomicon:text", diff --git a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/spirit_fire.json b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/spirit_fire.json index 8f7c49e28..2950c85d4 100644 --- a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/spirit_fire.json +++ b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/getting_started/spirit_fire.json @@ -32,7 +32,8 @@ "occultism:textures/gui/book/spiritfire_instructions.png" ], "text": "book.occultism.dictionary_of_spirits.getting_started.spirit_fire.spirit_fire_screenshot.text", - "title": "" + "title": "", + "use_legacy_rendering": false }, { "type": "modonomicon:text", diff --git a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/pentacles/pentacles_overview.json b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/pentacles/pentacles_overview.json index d1af8beda..7c3e0068d 100644 --- a/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/pentacles/pentacles_overview.json +++ b/src/generated/resources/data/occultism/modonomicon/books/dictionary_of_spirits/entries/pentacles/pentacles_overview.json @@ -67,7 +67,8 @@ "occultism:textures/gui/book/bowl_placement.png" ], "text": "", - "title": "" + "title": "", + "use_legacy_rendering": false }, { "type": "modonomicon:text", diff --git a/src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_fruit.json b/src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_fruit_or_seed.json similarity index 64% rename from src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_fruit.json rename to src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_fruit_or_seed.json index d8ca0a06d..404e0fde9 100644 --- a/src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_fruit.json +++ b/src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_fruit_or_seed.json @@ -2,9 +2,14 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "p": { - "tag": "c:crops/datura" - } + "p": [ + { + "tag": "c:crops/datura" + }, + { + "tag": "c:seeds/datura" + } + ] }, "pattern": [ "ppp", diff --git a/src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_seeds.json b/src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_seeds.json deleted file mode 100644 index f6af1b173..000000000 --- a/src/generated/resources/data/occultism/recipe/crafting/demons_dream_essence_from_seeds.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "p": { - "tag": "c:seeds/datura" - } - }, - "pattern": [ - "ppp", - "ppp", - "ppp" - ], - "result": { - "count": 1, - "id": "occultism:demons_dream_essence" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/occultism/recipe/crushing/blaze_powder_from_rod.json b/src/generated/resources/data/occultism/recipe/crushing/blaze_powder_from_rod.json index cc66f7cac..6085bed31 100644 --- a/src/generated/resources/data/occultism/recipe/crushing/blaze_powder_from_rod.json +++ b/src/generated/resources/data/occultism/recipe/crushing/blaze_powder_from_rod.json @@ -4,8 +4,8 @@ "tag": "c:rods/blaze" }, "result": { - "type": "occultism:tag", - "count": 1, - "tag": "c:dusts/blaze" + "type": "occultism:item", + "count": 4, + "id": "minecraft:blaze_powder" } } \ No newline at end of file diff --git a/src/generated/resources/data/occultism/recipe/ritual/summon_foliot_crusher.json b/src/generated/resources/data/occultism/recipe/ritual/summon_foliot_crusher.json index 0c91ecfc6..5b25a88f6 100644 --- a/src/generated/resources/data/occultism/recipe/ritual/summon_foliot_crusher.json +++ b/src/generated/resources/data/occultism/recipe/ritual/summon_foliot_crusher.json @@ -7,16 +7,16 @@ "entity_to_summon": "occultism:foliot", "ingredients": [ { - "tag": "c:dusts/iron" + "tag": "c:raw_materials/iron" }, { - "tag": "c:dusts/gold" + "tag": "c:raw_materials/gold" }, { - "tag": "c:dusts/copper" + "tag": "c:raw_materials/copper" }, { - "tag": "c:dusts/silver" + "tag": "c:raw_materials/silver" } ], "pentacle_id": "occultism:summon_foliot", diff --git a/src/main/java/com/klikli_dev/occultism/datagen/OccultismBookProvider.java b/src/main/java/com/klikli_dev/occultism/datagen/OccultismBookProvider.java index 6e94bcdf4..3aaba51c8 100644 --- a/src/main/java/com/klikli_dev/occultism/datagen/OccultismBookProvider.java +++ b/src/main/java/com/klikli_dev/occultism/datagen/OccultismBookProvider.java @@ -1,7 +1,6 @@ package com.klikli_dev.occultism.datagen; import com.klikli_dev.modonomicon.api.ModonomiconAPI; -import com.klikli_dev.modonomicon.api.datagen.BookProvider; import com.klikli_dev.modonomicon.api.datagen.CategoryEntryMap; import com.klikli_dev.modonomicon.api.datagen.ModonomiconLanguageProvider; import com.klikli_dev.modonomicon.api.datagen.SingleBookSubProvider; @@ -22,15 +21,11 @@ import com.klikli_dev.occultism.registry.OccultismBlocks; import com.klikli_dev.occultism.registry.OccultismItems; import com.klikli_dev.theurgy.registry.ItemRegistry; -import net.minecraft.core.HolderLookup; -import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.block.Blocks; -import java.util.concurrent.CompletableFuture; - public class OccultismBookProvider extends SingleBookSubProvider { public static final String COLOR_PURPLE = "ad03fc"; @@ -365,9 +360,14 @@ private BookEntryModel makeDemonsDreamEntry(CategoryEntryMap entryMap, char icon this.context().page("recipe_essence"); var recipeEssence = BookCraftingRecipePageModel.create() - .withRecipeId1(this.modLoc("crafting/demons_dream_essence_from_fruit")) - .withRecipeId2(this.modLoc("crafting/demons_dream_essence_from_seeds")); + .withRecipeId1(this.modLoc("crafting/demons_dream_essence_from_fruit_or_seed")) + .withText(this.context().pageText()); //no text + this.lang().add(this.context().pageText(), + """ + Fruit and seeds can be mixed freely to create the essence. + """ + ); this.context().page("spotlight3"); var spotlight3 = BookSpotlightPageModel.create() diff --git a/src/main/java/com/klikli_dev/occultism/datagen/recipe/OccultismRecipeProvider.java b/src/main/java/com/klikli_dev/occultism/datagen/recipe/OccultismRecipeProvider.java index 4301899e7..e191f0d2f 100644 --- a/src/main/java/com/klikli_dev/occultism/datagen/recipe/OccultismRecipeProvider.java +++ b/src/main/java/com/klikli_dev/occultism/datagen/recipe/OccultismRecipeProvider.java @@ -20,6 +20,7 @@ import net.neoforged.neoforge.common.Tags; import java.util.concurrent.CompletableFuture; +import java.util.stream.Stream; public class OccultismRecipeProvider extends RecipeProvider { public OccultismRecipeProvider(PackOutput p_248933_, CompletableFuture lookupProvider) { @@ -285,10 +286,10 @@ private void crushingRecipes(RecipeOutput pRecipeOutput) { this.crushingGemRecipe("topaz", pRecipeOutput); this.crushingGemRecipe("arcane_crystal", pRecipeOutput); - CrushingRecipeBuilder.crushingRecipe(Tags.Items.RODS_BLAZE, OccultismTags.Items.BLAZE_DUST, 200) + CrushingRecipeBuilder.crushingRecipe(Tags.Items.RODS_BLAZE, Items.BLAZE_POWDER, 200) .allowEmpty() + .setResultAmount(4) .unlockedBy("has_blaze_rod", has(Tags.Items.RODS_BLAZE)) - .save(pRecipeOutput, ResourceLocation.fromNamespaceAndPath(Occultism.MODID, "crushing/blaze_powder_from_rod")); CrushingRecipeBuilder.crushingRecipe(Tags.Items.OBSIDIANS, OccultismTags.Items.OBSIDIAN_DUST, 200) @@ -551,16 +552,15 @@ private void craftingRecipes(RecipeOutput pRecipeOutput) { .pattern("ppp") .pattern("ppp") .pattern("ppp") - .define('p', OccultismTags.Items.DATURA_CROP) + .define('p', + Ingredient.fromValues(Stream.of( + new Ingredient.TagValue(OccultismTags.Items.DATURA_CROP), + new Ingredient.TagValue(OccultismTags.Items.DATURA_SEEDS) + ) + ) + ) .unlockedBy("has_datura", has(OccultismTags.Items.DATURA_CROP)) - .save(pRecipeOutput, ResourceLocation.fromNamespaceAndPath(Occultism.MODID, "crafting/demons_dream_essence_from_fruit")); - ShapedRecipeBuilder.shaped(RecipeCategory.FOOD, OccultismItems.DEMONS_DREAM_ESSENCE.get()) - .pattern("ppp") - .pattern("ppp") - .pattern("ppp") - .define('p', OccultismTags.Items.DATURA_SEEDS) - .unlockedBy("has_datura", has(OccultismTags.Items.DATURA_SEEDS)) - .save(pRecipeOutput, ResourceLocation.fromNamespaceAndPath(Occultism.MODID, "crafting/demons_dream_essence_from_seeds")); + .save(pRecipeOutput, ResourceLocation.fromNamespaceAndPath(Occultism.MODID, "crafting/demons_dream_essence_from_fruit_or_seed")); ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, OccultismItems.DICTIONARY_OF_SPIRITS.get()) .requires(OccultismTags.Items.DATURA_SEEDS) .requires(OccultismTags.Items.BOOKS) diff --git a/src/main/java/com/klikli_dev/occultism/datagen/recipe/RitualRecipes.java b/src/main/java/com/klikli_dev/occultism/datagen/recipe/RitualRecipes.java index e213c903e..5e80d7c65 100644 --- a/src/main/java/com/klikli_dev/occultism/datagen/recipe/RitualRecipes.java +++ b/src/main/java/com/klikli_dev/occultism/datagen/recipe/RitualRecipes.java @@ -285,10 +285,10 @@ private static void summonRituals(RecipeOutput recipeOutput) { 60, RITUAL_SUMMON_JOB, PENTACLE_SUMMON_FOLIOT, - Ingredient.of(OccultismTags.Items.IRON_DUST), - Ingredient.of(OccultismTags.Items.GOLD_DUST), - Ingredient.of(OccultismTags.Items.COPPER_DUST), - Ingredient.of(OccultismTags.Items.SILVER_DUST)) + Ingredient.of(Tags.Items.RAW_MATERIALS_IRON), + Ingredient.of(Tags.Items.RAW_MATERIALS_GOLD), + Ingredient.of(Tags.Items.RAW_MATERIALS_COPPER), + Ingredient.of(OccultismTags.Items.RAW_MATERIALS_SILVER)) .unlockedBy("has_bound_foliot", has(OccultismItems.BOOK_OF_BINDING_BOUND_FOLIOT.get())) .spiritMaxAge(-1) .spiritJobType(ResourceLocation.fromNamespaceAndPath(Occultism.MODID, "crush_tier1")) diff --git a/src/main/java/com/klikli_dev/occultism/datagen/recipe/builders/CrushingRecipeBuilder.java b/src/main/java/com/klikli_dev/occultism/datagen/recipe/builders/CrushingRecipeBuilder.java index 801beb040..62194fe24 100644 --- a/src/main/java/com/klikli_dev/occultism/datagen/recipe/builders/CrushingRecipeBuilder.java +++ b/src/main/java/com/klikli_dev/occultism/datagen/recipe/builders/CrushingRecipeBuilder.java @@ -55,6 +55,10 @@ public CrushingRecipeBuilder(Ingredient ingredient, RecipeResult result, int cru this.maxTier = -1; } + public static CrushingRecipeBuilder crushingRecipe(TagKey ingredient, ItemLike result, int crushingTime) { + return crushingRecipe(Ingredient.of(ingredient), result, crushingTime); + } + public static CrushingRecipeBuilder crushingRecipe(Ingredient ingredient, ItemLike result, int crushingTime) { return new CrushingRecipeBuilder(ingredient, RecipeResult.of(new ItemStack(result)), crushingTime); } diff --git a/src/main/java/com/klikli_dev/occultism/registry/OccultismCreativeModeTabs.java b/src/main/java/com/klikli_dev/occultism/registry/OccultismCreativeModeTabs.java index 2214cd9f0..1387334cc 100644 --- a/src/main/java/com/klikli_dev/occultism/registry/OccultismCreativeModeTabs.java +++ b/src/main/java/com/klikli_dev/occultism/registry/OccultismCreativeModeTabs.java @@ -5,6 +5,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.CreativeModeTabs; +import net.minecraft.world.item.ItemStack; import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredRegister; @@ -20,10 +21,20 @@ public class OccultismCreativeModeTabs { .displayItems((parameters, output) -> { OccultismItems.ITEMS.getEntries().forEach(i -> { - if (!OccultismItems.shouldSkipCreativeModTab(i.get())) { - output.accept(i.get()); + + if (OccultismItems.shouldSkipCreativeModTab(i.get())) + return; + + var stack = new ItemStack(i.get()); + + if (OccultismItems.shouldPregenerateSpiritName(i.get())) { + stack.set(OccultismDataComponents.SPIRIT_NAME, "(Not yet known)"); } + + output.accept(stack); + }); + output.accept(OccultismItems.DICTIONARY_OF_SPIRITS.get().getCreativeModeTabDisplayStack()); }).build()); diff --git a/src/main/java/com/klikli_dev/occultism/registry/OccultismItems.java b/src/main/java/com/klikli_dev/occultism/registry/OccultismItems.java index fe58b0bb3..2fdc1768a 100644 --- a/src/main/java/com/klikli_dev/occultism/registry/OccultismItems.java +++ b/src/main/java/com/klikli_dev/occultism/registry/OccultismItems.java @@ -483,4 +483,19 @@ public static boolean shouldSkipCreativeModTab(Item item) { } return false; } + + public static boolean shouldPregenerateSpiritName(Item item) { + return item == BOOK_OF_BINDING_BOUND_FOLIOT.get() + || item == BOOK_OF_BINDING_BOUND_DJINNI.get() + || item == BOOK_OF_BINDING_BOUND_AFRIT.get() + || item == BOOK_OF_BINDING_BOUND_MARID.get() + || item == BOOK_OF_CALLING_FOLIOT_LUMBERJACK.get() + || item == BOOK_OF_CALLING_FOLIOT_TRANSPORT_ITEMS.get() + || item == BOOK_OF_CALLING_FOLIOT_CLEANER.get() + || item == BOOK_OF_CALLING_DJINNI_MANAGE_MACHINE.get() + || item == DIMENSIONAL_MATRIX.get() + || item == SATCHEL.get() + || item == FAMILIAR_RING.get() + || item == INFUSED_PICKAXE.get(); + } } diff --git a/src/main/java/com/klikli_dev/occultism/registry/OccultismTags.java b/src/main/java/com/klikli_dev/occultism/registry/OccultismTags.java index 744f6637e..16d5a3fa5 100644 --- a/src/main/java/com/klikli_dev/occultism/registry/OccultismTags.java +++ b/src/main/java/com/klikli_dev/occultism/registry/OccultismTags.java @@ -75,6 +75,7 @@ public static class Items { public static final TagKey IRON_DUST=makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "dusts/iron")); public static final TagKey IESNIUM_DUST=makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "dusts/iesnium")); public static final TagKey SILVER_DUST=makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "dusts/silver")); + public static final TagKey RAW_MATERIALS_SILVER =makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "raw_materials/silver")); public static final TagKey OBSIDIAN_DUST=makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "dusts/obsidian")); public static final TagKey BLAZE_DUST = makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "dusts/blaze"));