Removed fluid tank from IndustrialElectrolyzer closes #58
This commit is contained in:
parent
b7a9824cd3
commit
26eff9bcbf
7 changed files with 14 additions and 186 deletions
|
@ -2,6 +2,7 @@ package techreborn.compat.nei.recipes;
|
|||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import ic2.core.util.DrawUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
|
@ -12,6 +13,7 @@ import techreborn.api.recipe.machines.IndustrialElectrolyzerRecipe;
|
|||
import techreborn.client.gui.GuiIndustrialElectrolyzer;
|
||||
import techreborn.util.ItemUtils;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.List;
|
||||
|
||||
public class IndustrialElectrolyzerRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
|
@ -68,25 +70,9 @@ public class IndustrialElectrolyzerRecipeHandler extends GenericRecipeHander imp
|
|||
}
|
||||
|
||||
@Override
|
||||
public void drawBackground(int recipeIndex) {
|
||||
super.drawBackground(recipeIndex);
|
||||
CachedRecipe recipe = arecipes.get(recipeIndex);
|
||||
if (recipe instanceof CachedGenericRecipe) {
|
||||
if (((CachedGenericRecipe) recipe).recipie instanceof IndustrialElectrolyzerRecipe) {
|
||||
IndustrialElectrolyzerRecipe grinderRecipe = (IndustrialElectrolyzerRecipe) ((CachedGenericRecipe) recipe).recipie;
|
||||
if (grinderRecipe.fluidStack != null) {
|
||||
IIcon fluidIcon = grinderRecipe.fluidStack.getFluid().getIcon();
|
||||
if (fluidIcon != null) {
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||
int liquidHeight = grinderRecipe.fluidStack.amount * 100 / 16000;
|
||||
DrawUtil.drawRepeated(fluidIcon, 7, 22 + 47 - liquidHeight, 14.0D, liquidHeight, GuiDraw.gui.getZLevel());
|
||||
|
||||
}
|
||||
GuiDraw.drawString(grinderRecipe.fluidStack.amount + "mb of " + grinderRecipe.fluidStack.getLocalizedName(), 14, 135, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(80, 20, 15, 15), getNeiBaseRecipe().getRecipeName(), new Object[0]));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue