A big load of work on the new upgrade GUI

This commit is contained in:
Aidan C. Brady committed 2014-07-22 20:37:53 -04:00
1 parent 99482d8fd0
commit 6470f69569
6 files changed
+157 -5

No files matched your search

@@ -5,6 +5,7 @@ import java.util.Map;
import mekanism.api.EnumColor;
import mekanism.common.util.MekanismUtils;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.common.util.Constants.NBT;
@@ -51,6 +52,19 @@ public enum Upgrade
return getMax() > 1;
}
public ItemStack getStack()
{
switch(this)
{
case SPEED:
return new ItemStack(Mekanism.SpeedUpgrade);
case ENERGY:
return new ItemStack(Mekanism.EnergyUpgrade);
}
return null;
}
public static Map<Upgrade, Integer> buildMap(NBTTagCompound nbtTags)
{
Map<Upgrade, Integer> upgrades = new HashMap<Upgrade, Integer>();