It now gets to the main menu without ic2 :) o/ Next I need to fix the powered items.
This commit is contained in:
parent
496151fcae
commit
8725c5932d
12 changed files with 1183 additions and 1299 deletions
|
@ -1,35 +1,30 @@
|
|||
package techreborn.items;
|
||||
|
||||
import ic2.core.Ic2Items;
|
||||
import ic2.core.item.ItemFluidCell;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.util.LogHelper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemCells extends ItemTR {
|
||||
|
||||
//TODO recode this only using the ic2 api
|
||||
public static ItemStack getCellByName(String name, int count)
|
||||
{
|
||||
ItemFluidCell itemFluidCell = (ItemFluidCell) Ic2Items.FluidCell.getItem();
|
||||
Fluid fluid = FluidRegistry.getFluid("fluid" + name.toLowerCase());
|
||||
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!");
|
||||
}
|
||||
// ItemFluidCell itemFluidCell = (ItemFluidCell) Ic2Items.FluidCell.getItem();
|
||||
// Fluid fluid = FluidRegistry.getFluid("fluid" + name.toLowerCase());
|
||||
// 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!");
|
||||
// }
|
||||
int index = -1;
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equals(name)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue