Skip to content

Commit

Permalink
Fix #1048 visual issue with JEI Description recipes for FluidStacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Nov 19, 2017
1 parent 882449b commit 9029917
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/mezz/jei/plugins/jei/JEIInternalPlugin.java
Expand Up @@ -82,6 +82,8 @@ public void register(IModRegistry registry) {
"description.jei.wooden.door.3"
);

registry.addIngredientInfo(new FluidStack(FluidRegistry.WATER, Fluid.BUCKET_VOLUME), FluidStack.class, "water");

registry.addRecipes(Arrays.asList(
new DebugRecipe(),
new DebugRecipe()
Expand Down
Expand Up @@ -2,8 +2,12 @@

import javax.annotation.Nullable;

import com.google.common.collect.ImmutableList;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable;
import mezz.jei.api.gui.IGuiFluidStackGroup;
import mezz.jei.api.gui.IGuiIngredient;
import mezz.jei.api.gui.IGuiIngredientGroup;
import mezz.jei.api.gui.IGuiItemStackGroup;
import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
Expand All @@ -13,6 +17,8 @@
import mezz.jei.util.Translator;
import net.minecraft.util.ResourceLocation;

import java.util.List;

public class IngredientInfoRecipeCategory implements IRecipeCategory<IngredientInfoRecipe> {
public static final int recipeWidth = 160;
public static final int recipeHeight = 125;
Expand Down Expand Up @@ -63,5 +69,9 @@ public void setRecipe(IRecipeLayout recipeLayout, IngredientInfoRecipe recipeWra
guiItemStacks.init(0, true, xPos, 0);
guiItemStacks.setBackground(0, slotBackground);
guiItemStacks.set(ingredients);

IGuiFluidStackGroup guiFluidStackGroup = recipeLayout.getFluidStacks();
guiFluidStackGroup.init(0, true, xPos + 1, 1);
guiFluidStackGroup.set(ingredients);
}
}

0 comments on commit 9029917

Please sign in to comment.