From ab8ff3dcf8379e255b1bdc472644970521c3ddd4 Mon Sep 17 00:00:00 2001 From: thepigcat Date: Sun, 29 Sep 2024 12:05:27 +0200 Subject: [PATCH] jei and bug fixes --- .../entries/getting_started/laser_power.json | 11 +++++++++++ .../nautec/compat/jei/NTJeiPlugin.java | 4 +++- .../nautec_guide/getting_started/LaserPowerEntry.java | 7 +++++++ .../multiblock/controller/DrainBlockEntity.java | 1 + .../nautec/datagen/RecipesProvider.java | 10 ++++++---- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/generated/resources/data/nautec/modonomicon/books/nautec_guide/entries/getting_started/laser_power.json b/src/generated/resources/data/nautec/modonomicon/books/nautec_guide/entries/getting_started/laser_power.json index eeeb0e84..2be004d7 100644 --- a/src/generated/resources/data/nautec/modonomicon/books/nautec_guide/entries/getting_started/laser_power.json +++ b/src/generated/resources/data/nautec/modonomicon/books/nautec_guide/entries/getting_started/laser_power.json @@ -30,6 +30,17 @@ "text": "It can be accomplished by supplying the catalyst with fuel, like for\nexample Kelp and activating it with a Heart Of the Sea.\n\\\nAfter right-clicking the item on the catalyst, a laser beam will shoot\nout of the opposite side as long as it has a target.\n", "title1": "Aquatic Catalyst", "title2": "" + }, + { + "type": "modonomicon:text", + "anchor": "", + "condition": { + "type": "modonomicon:none" + }, + "show_title_separator": true, + "text": "By shooting a laser beam into a crystal, one can increase the lasers purity.\nThe lasers that are created by this shot (top and bottom) now have a purity of 3.0\nthis means they can be used for Item Transformation!\n", + "title": "Purity", + "use_markdown_in_title": false } ], "parents": [ diff --git a/src/main/java/com/portingdeadmods/nautec/compat/jei/NTJeiPlugin.java b/src/main/java/com/portingdeadmods/nautec/compat/jei/NTJeiPlugin.java index a68d8bca..8b73c2b7 100644 --- a/src/main/java/com/portingdeadmods/nautec/compat/jei/NTJeiPlugin.java +++ b/src/main/java/com/portingdeadmods/nautec/compat/jei/NTJeiPlugin.java @@ -31,7 +31,7 @@ public class NTJeiPlugin implements IModPlugin { @Override public @NotNull ResourceLocation getPluginUid() { - return ResourceLocation.fromNamespaceAndPath(Nautec.MODID,"jei_plugin"); + return ResourceLocation.fromNamespaceAndPath(Nautec.MODID, "jei_plugin"); } @Override @@ -85,6 +85,8 @@ public void registerRecipes(IRecipeRegistration registration) { registration.addIngredientInfo(NTItems.PRISMARINE_CRYSTAL_SHARD.toStack(), VanillaTypes.ITEM_STACK, Component.literal("Prismarine Crystal Shards are pristine crystals, capable of channeling power like no other material. They can be obtained by breaking a prismarine crystal using an Aquarine Steel Pickaxe with its ability enabled.")); + + registration.addIngredientInfo(List.of(NTItems.BROKEN_WHISK.toStack(), NTItems.BURNT_COIL.toStack(), NTItems.ANCIENT_VALVE.toStack(), NTItems.RUSTY_GEAR.toStack()), VanillaTypes.ITEM_STACK, Component.literal("These ancient machine components can be found in chests and are dropped by underwater mobs")); } @Override diff --git a/src/main/java/com/portingdeadmods/nautec/compat/modonomicon/datagen/book/nautec_guide/getting_started/LaserPowerEntry.java b/src/main/java/com/portingdeadmods/nautec/compat/modonomicon/datagen/book/nautec_guide/getting_started/LaserPowerEntry.java index 8302796b..3f14a725 100644 --- a/src/main/java/com/portingdeadmods/nautec/compat/modonomicon/datagen/book/nautec_guide/getting_started/LaserPowerEntry.java +++ b/src/main/java/com/portingdeadmods/nautec/compat/modonomicon/datagen/book/nautec_guide/getting_started/LaserPowerEntry.java @@ -39,6 +39,13 @@ protected void generatePages() { After right-clicking the item on the catalyst, a laser beam will shoot out of the opposite side as long as it has a target. """)); + this.page("purity", () -> BookTextPageModel.create() + .withTitle("Purity") + .withText(""" + By shooting a laser beam into a crystal, one can increase the lasers purity. + The lasers that are created by this shot (top and bottom) now have a purity of 3.0 + this means they can be used for Item Transformation! + """)); } @Override diff --git a/src/main/java/com/portingdeadmods/nautec/content/blockentities/multiblock/controller/DrainBlockEntity.java b/src/main/java/com/portingdeadmods/nautec/content/blockentities/multiblock/controller/DrainBlockEntity.java index 8d6cd19a..68a1c5a7 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/blockentities/multiblock/controller/DrainBlockEntity.java +++ b/src/main/java/com/portingdeadmods/nautec/content/blockentities/multiblock/controller/DrainBlockEntity.java @@ -27,6 +27,7 @@ import net.neoforged.neoforge.fluids.capability.IFluidHandler; import org.jetbrains.annotations.Nullable; +// TODO: Require power to work public class DrainBlockEntity extends ContainerBlockEntity implements MultiblockEntity { private MultiblockData multiblockData; diff --git a/src/main/java/com/portingdeadmods/nautec/datagen/RecipesProvider.java b/src/main/java/com/portingdeadmods/nautec/datagen/RecipesProvider.java index 21552a7f..f782715b 100644 --- a/src/main/java/com/portingdeadmods/nautec/datagen/RecipesProvider.java +++ b/src/main/java/com/portingdeadmods/nautec/datagen/RecipesProvider.java @@ -1,5 +1,6 @@ package com.portingdeadmods.nautec.datagen; +import com.portingdeadmods.nautec.Nautec; import com.portingdeadmods.nautec.content.recipes.utils.IngredientWithCount; import com.portingdeadmods.nautec.data.NTDataComponents; import com.portingdeadmods.nautec.datagen.recipeBuilder.*; @@ -12,6 +13,7 @@ import net.minecraft.core.component.DataComponents; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.*; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; @@ -92,14 +94,13 @@ protected void buildRecipes(@NotNull RecipeOutput pRecipeOutput) { augmentationStationRecipes(pRecipeOutput); - ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, NTItems.NAUTEC_GUIDE.get(), 1) .requires(Items.BOOK) .requires(NTItems.CAST_IRON_NUGGET.get(), 1) .unlockedBy("has_item", has(NTItems.CAST_IRON_NUGGET.get())) .save(pRecipeOutput); - SimpleCookingRecipeBuilder.blasting(Ingredient.of(Tags.Items.INGOTS_IRON), RecipeCategory.MISC, NTItems.CAST_IRON_INGOT.get(), 2, 10) + SimpleCookingRecipeBuilder.blasting(Ingredient.of(Tags.Items.INGOTS_IRON), RecipeCategory.MISC, NTItems.CAST_IRON_INGOT.get(), 0.2f, 100) .unlockedBy("has_item", has(Items.IRON_INGOT)) .save(pRecipeOutput, "cast_iron_ingot_blasting"); } @@ -114,7 +115,7 @@ private static void aquarineSteelRecipes(@NotNull RecipeOutput pRecipeOutput) { ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, NTBlocks.AQUARINE_STEEL_BLOCK.asItem(), 1) .requires(NTItems.AQUARINE_STEEL_INGOT, 9) .unlockedBy("has_item", has(NTItems.AQUARINE_STEEL_INGOT)) - .save(pRecipeOutput); + .save(pRecipeOutput, ResourceLocation.fromNamespaceAndPath(Nautec.MODID, "cast_iron_ingot_from_blasting")); } private static void augmentationStationRecipes(@NotNull RecipeOutput pRecipeOutput) { @@ -205,9 +206,10 @@ private static void laserDeviceRecipes(@NotNull RecipeOutput pRecipeOutput) { private static void machineRecipes(@NotNull RecipeOutput pRecipeOutput) { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, NTBlocks.MIXER.asItem()) - .pattern("D D") + .pattern("DGD") .pattern("PWP") .pattern("PAP") + .define('G', NTItems.GEAR) .define('D', NTBlocks.POLISHED_PRISMARINE) .define('P', NTBlocks.POLISHED_PRISMARINE) .define('W', NTItems.WHISK)