From 0b3736f6396a5abe42587ae0ef5f90a73fe0e7eb Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Fri, 26 Jun 2015 08:17:02 +0100 Subject: [PATCH] fixes #51 --- src/main/java/techreborn/items/ItemCells.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/techreborn/items/ItemCells.java b/src/main/java/techreborn/items/ItemCells.java index f13e45abf..159ed28a5 100644 --- a/src/main/java/techreborn/items/ItemCells.java +++ b/src/main/java/techreborn/items/ItemCells.java @@ -1,9 +1,7 @@ package techreborn.items; -import java.util.Iterator; import java.util.List; -import ic2.api.item.IC2Items; import ic2.core.Ic2Items; import ic2.core.item.ItemFluidCell; import net.minecraft.client.renderer.texture.IIconRegister; @@ -18,8 +16,8 @@ import techreborn.client.TechRebornCreativeTab; import techreborn.init.ModItems; import techreborn.util.LogHelper; -@Deprecated -public class ItemCells extends ItemTR { +public class ItemCells extends ItemTR { + public static ItemStack getCellByName(String name, int count) { ItemFluidCell itemFluidCell = (ItemFluidCell) Ic2Items.FluidCell.getItem(); @@ -27,6 +25,7 @@ public class ItemCells extends ItemTR { if(fluid != null){ ItemStack stack = Ic2Items.FluidCell.copy(); itemFluidCell.fill(stack, new FluidStack(fluid.getID(), 2147483647), true); + stack.stackSize = count; return stack; } else { LogHelper.error("Could not find " + "fluid" + name + " in the fluid registry!");