mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-21 12:32:13 +00:00
A few fixes
This commit is contained in:
1 parent
076c5f7377
commit
25cf5236ea
14 files changed
+15
-38
No files matched your search
@@ -54,14 +54,18 @@ public enum Upgrade
|
||||
public static Map<Upgrade, Integer> buildMap(NBTTagCompound nbtTags)
|
||||
{
|
||||
Map<Upgrade, Integer> upgrades = new HashMap<Upgrade, Integer>();
|
||||
NBTTagList list = nbtTags.getTagList("upgrades", NBT.TAG_COMPOUND);
|
||||
|
||||
for(int tagCount = 0; tagCount < list.tagCount(); tagCount++)
|
||||
if(nbtTags.hasKey("upgrades"))
|
||||
{
|
||||
NBTTagCompound compound = (NBTTagCompound)list.getCompoundTagAt(tagCount);
|
||||
NBTTagList list = nbtTags.getTagList("upgrades", NBT.TAG_COMPOUND);
|
||||
|
||||
Upgrade upgrade = Upgrade.values()[compound.getInteger("type")];
|
||||
upgrades.put(upgrade, compound.getInteger("amount"));
|
||||
for(int tagCount = 0; tagCount < list.tagCount(); tagCount++)
|
||||
{
|
||||
NBTTagCompound compound = (NBTTagCompound)list.getCompoundTagAt(tagCount);
|
||||
|
||||
Upgrade upgrade = Upgrade.values()[compound.getInteger("type")];
|
||||
upgrades.put(upgrade, compound.getInteger("amount"));
|
||||
}
|
||||
}
|
||||
|
||||
return upgrades;
|
||||
|
||||
Reference in new issue
Block a user