Skip to content

Commit

Permalink
feat: add EMI info for fluid buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Aug 18, 2024
1 parent e3481a0 commit 2216ee5
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21.1 2024-08-18T10:41:15.7442084 Languages: en_us
d67b1f89833eb055603451d2e220cbf9b0e9c7bc assets/theurgy/lang/en_us.json
// 1.21.1 2024-08-18T11:12:57.321193 Languages: en_us
d4bf9645b2f50d984c242c57413b237136206f89 assets/theurgy/lang/en_us.json
4 changes: 4 additions & 0 deletions src/generated/resources/assets/theurgy/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2648,6 +2648,10 @@
"theurgy.configuration.renderSulfurSourceItem": "Render Sulfur Source Items",
"theurgy.configuration.rendering": "Rendering Settings",
"theurgy.configuration.sulfurSourceToBlockMapping": "Sulfur Source to Block Mapping",
"theurgy.emi.header": "Theurgy",
"theurgy.emi.info.lava_bucket": "In Theurgy, Water Buckets can be obtained by inserting Crystallized Water into a Sal Ammoniac Accumulator placed on top of a Sal Ammoniac Tank. The tank fills with Water slowly, which can then be extracted by clicking it with an Empty Bucket.",
"theurgy.emi.info.sal_ammoniac_bucket": "In Theurgy, Sal Ammoniac Buckets can be obtained by inserting either just Water or Water and Sal Ammoniac Crystals into a Sal Ammoniac Accumulator placed on top of a Sal Ammoniac Tank. The tank fills with Sal Ammoniac slowly, which can then be extracted by clicking it with an Empty Bucket.",
"theurgy.emi.info.water_bucket": "In Theurgy, Lava Buckets can be obtained by inserting Crystallized Lava into a Sal Ammoniac Accumulator placed on top of a Sal Ammoniac Tank. The tank fills with Lava slowly, which can then be extracted by clicking it with an Empty Bucket.",
"theurgy.gui.attribute_filter.accept_list_and_button.tooltip": "Allow-List (All)",
"theurgy.gui.attribute_filter.accept_list_and_button.tooltip.shift": "Items pass if they have ALL of the selected attributes.",
"theurgy.gui.attribute_filter.accept_list_or_button.tooltip": "Allow-List (Any)",
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/klikli_dev/theurgy/TheurgyConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ public static class JEI {
public static final String TARGET_SULFUR_TOOLTIP = PREFIX + "misc.source_sulfur.tooltip";
}

public static class EMI {
public static final String PREFIX = Theurgy.MODID + ".emi.";
public static final String HEADER = PREFIX + "header";
public static final String INFO_LAVA_BUCKET = PREFIX + "info.lava_bucket";
public static final String INFO_WATER_BUCKET = PREFIX + "info.water_bucket";
public static final String INFO_SAL_AMMONIAC_BUCKET = PREFIX + "info.sal_ammoniac_bucket";
}

public static class Misc {
public static final String PREFIX = Theurgy.MODID + ".misc.";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ private void addIntegrations() {
this.add("emi.category.theurgy.liquefaction", "Liquefaction");
this.add("emi.category.theurgy.reformation", "Reformation");

this.add(TheurgyConstants.I18n.EMI.HEADER, "Theurgy");
this.add(TheurgyConstants.I18n.EMI.INFO_WATER_BUCKET, "In Theurgy, Lava Buckets can be obtained by inserting Crystallized Lava into a Sal Ammoniac Accumulator placed on top of a Sal Ammoniac Tank. The tank fills with Lava slowly, which can then be extracted by clicking it with an Empty Bucket.");
this.add(TheurgyConstants.I18n.EMI.INFO_LAVA_BUCKET, "In Theurgy, Water Buckets can be obtained by inserting Crystallized Water into a Sal Ammoniac Accumulator placed on top of a Sal Ammoniac Tank. The tank fills with Water slowly, which can then be extracted by clicking it with an Empty Bucket.");
this.add(TheurgyConstants.I18n.EMI.INFO_SAL_AMMONIAC_BUCKET, "In Theurgy, Sal Ammoniac Buckets can be obtained by inserting either just Water or Water and Sal Ammoniac Crystals into a Sal Ammoniac Accumulator placed on top of a Sal Ammoniac Tank. The tank fills with Sal Ammoniac slowly, which can then be extracted by clicking it with an Empty Bucket.");

this.add(TheurgyConstants.I18n.Gui.SMELTING_TIME_SECONDS, "%ss");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,33 @@

package com.klikli_dev.theurgy.integration.emi;

import com.klikli_dev.theurgy.Theurgy;
import com.klikli_dev.theurgy.TheurgyConstants;
import com.klikli_dev.theurgy.content.item.sulfur.AlchemicalSulfurItem;
import com.klikli_dev.theurgy.registry.ItemRegistry;
import com.klikli_dev.theurgy.registry.RecipeTypeRegistry;
import com.klikli_dev.theurgy.registry.SulfurRegistry;
import dev.emi.emi.api.EmiEntrypoint;
import dev.emi.emi.api.EmiInitRegistry;
import dev.emi.emi.api.EmiRegistry;
import dev.emi.emi.api.recipe.EmiInfoRecipe;
import dev.emi.emi.api.recipe.EmiRecipeCategory;
import dev.emi.emi.api.stack.EmiStack;
import mezz.jei.api.constants.VanillaTypes;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.core.RegistryAccess;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.RecipeManager;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.fml.loading.FMLEnvironment;
import net.neoforged.neoforge.registries.DeferredHolder;
import org.apache.logging.log4j.core.tools.picocli.CommandLine;

import java.util.List;
import java.util.stream.Collectors;

@EmiEntrypoint
Expand Down Expand Up @@ -100,6 +109,37 @@ public void register(EmiRegistry registry) {
for (var recipe : registry.getRecipeManager().getAllRecipesFor(RecipeTypeRegistry.REFORMATION.get())) {
registry.addRecipe(new ReformationEmiRecipe(recipe));
}

registry.addRecipe(new EmiInfoRecipe(
List.of(EmiStack.of(Items.LAVA_BUCKET)),
List.of(
Component.translatable(TheurgyConstants.I18n.EMI.HEADER).withStyle(ChatFormatting.BOLD),
Component.translatable(TheurgyConstants.I18n.EMI.INFO_LAVA_BUCKET)
),
Theurgy.loc("emi/laval_bucket")
)
);

registry.addRecipe(new EmiInfoRecipe(
List.of(EmiStack.of(Items.WATER_BUCKET)),
List.of(
Component.translatable(TheurgyConstants.I18n.EMI.HEADER).withStyle(ChatFormatting.BOLD),
Component.translatable(TheurgyConstants.I18n.EMI.INFO_WATER_BUCKET)
),
Theurgy.loc("emi/water_bucket")
)
);

registry.addRecipe(new EmiInfoRecipe(
List.of(EmiStack.of(ItemRegistry.SAL_AMMONIAC_BUCKET)),
List.of(
Component.translatable(TheurgyConstants.I18n.EMI.HEADER).withStyle(ChatFormatting.BOLD),
Component.translatable(TheurgyConstants.I18n.EMI.INFO_SAL_AMMONIAC_BUCKET)
),
Theurgy.loc("emi/sal_ammoniac_bucket")
)
);

}

@Override
Expand Down

0 comments on commit 2216ee5

Please sign in to comment.