mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 22:04:49 +00:00
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:
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;
|
||||
|
||||
Reference in new issue
Block a user