Add Mekanism Shaped and Mekanism Shapeless recipe handlers, use ItemDataUtils to consolidate non-subtype-based NBT data into a single compound

This commit is contained in:
aidancbrady committed 2016-05-19 18:48:59 -04:00
1 parent 2f61ea103f
commit be863a4289
53 files changed
+679 -789

No files matched your search

@@ -237,7 +237,7 @@ public class RecipeUtils
if(itemstack != null && BlockStateMachine.MachineType.get(itemstack) != null && BlockStateMachine.MachineType.get(itemstack).supportsUpgrades)
{
Map<Upgrade, Integer> stackMap = Upgrade.buildMap(itemstack.getTagCompound());
Map<Upgrade, Integer> stackMap = Upgrade.buildMap(ItemDataUtils.getDataMap(itemstack));
for(Map.Entry<Upgrade, Integer> entry : stackMap.entrySet())
{
@@ -251,12 +251,7 @@ public class RecipeUtils
}
}
if(toReturn.getTagCompound() == null)
{
toReturn.setTagCompound(new NBTTagCompound());
}
Upgrade.saveMap(upgrades, toReturn.getTagCompound());
Upgrade.saveMap(upgrades, ItemDataUtils.getDataMap(toReturn));
}
return toReturn;