Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Smelting recipes being duplicated due to FURNACE_RECIPES #2306

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ public class GTRecipeTypes {
.setSlotOverlay(false, false, GuiTextures.FURNACE_OVERLAY_1)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, LEFT_TO_RIGHT)
.setSteamProgressBar(GuiTextures.PROGRESS_BAR_ARROW_STEAM, LEFT_TO_RIGHT)
.setSound(GTSoundEntries.FURNACE);
.setSound(GTSoundEntries.FURNACE)
.setXEIVisible(false);

public final static GTRecipeType ALLOY_SMELTER_RECIPES = register("alloy_smelter", ELECTRIC)
.setMaxIOSize(2, 1, 0, 0).setEUIO(IO.IN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.gregtechceu.gtceu.api.recipe.GTRecipeType;
import com.gregtechceu.gtceu.api.recipe.category.GTRecipeCategory;
import com.gregtechceu.gtceu.api.registry.GTRegistries;
import com.gregtechceu.gtceu.common.data.GTRecipeTypes;

import com.lowdragmc.lowdraglib.Platform;
import com.lowdragmc.lowdraglib.gui.texture.ResourceTexture;
Expand Down Expand Up @@ -63,6 +64,8 @@ public static EmiRenderable getDrawable(GTRecipeCategory category) {
public static void registerDisplays(EmiRegistry registry) {
for (RecipeType<?> recipeType : BuiltInRegistries.RECIPE_TYPE) {
if (recipeType instanceof GTRecipeType gtRecipeType) {
if (gtRecipeType == GTRecipeTypes.FURNACE_RECIPES)
continue;
if (Platform.isDevEnv() || gtRecipeType.getRecipeUI().isXEIVisible()) {
for (Map.Entry<GTRecipeCategory, List<GTRecipe>> entry : gtRecipeType.getRecipesByCategory()
.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.gregtechceu.gtceu.api.recipe.GTRecipeType;
import com.gregtechceu.gtceu.api.recipe.category.GTRecipeCategory;
import com.gregtechceu.gtceu.api.registry.GTRegistries;
import com.gregtechceu.gtceu.common.data.GTRecipeTypes;

import com.lowdragmc.lowdraglib.Platform;
import com.lowdragmc.lowdraglib.gui.texture.ResourceTexture;
Expand Down Expand Up @@ -89,6 +90,8 @@ public Component getTitle() {
public static void registerRecipes(IRecipeRegistration registration) {
for (net.minecraft.world.item.crafting.RecipeType<?> recipeType : BuiltInRegistries.RECIPE_TYPE) {
if (recipeType instanceof GTRecipeType gtRecipeType) {
if (gtRecipeType == GTRecipeTypes.FURNACE_RECIPES)
continue;
if (Platform.isDevEnv() || gtRecipeType.getRecipeUI().isXEIVisible()) {
for (Map.Entry<GTRecipeCategory, List<GTRecipe>> entry : gtRecipeType.getRecipesByCategory()
.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.gregtechceu.gtceu.api.recipe.GTRecipeType;
import com.gregtechceu.gtceu.api.recipe.category.GTRecipeCategory;
import com.gregtechceu.gtceu.api.registry.GTRegistries;
import com.gregtechceu.gtceu.common.data.GTRecipeTypes;

import com.lowdragmc.lowdraglib.Platform;
import com.lowdragmc.lowdraglib.gui.texture.ItemStackTexture;
Expand Down Expand Up @@ -93,6 +94,8 @@ public Component getTitle() {
public static void registerDisplays(DisplayRegistry registry) {
for (RecipeType<?> recipeType : BuiltInRegistries.RECIPE_TYPE) {
if (recipeType instanceof GTRecipeType gtRecipeType) {
if (gtRecipeType == GTRecipeTypes.FURNACE_RECIPES)
continue;
if (Platform.isDevEnv() || gtRecipeType.getRecipeUI().isXEIVisible()) {
for (Map.Entry<GTRecipeCategory, List<GTRecipe>> entry : gtRecipeType.getRecipesByCategory()
.entrySet()) {
Expand Down