Fuses two NBT Compounds together with the Priority lying on the content of the first NBT
(NBTTagCompound aNBT1, NBTTagCompound aNBT2)
| 1865 | |
| 1866 | /** Fuses two NBT Compounds together with the Priority lying on the content of the first NBT */ |
| 1867 | public static NBTTagCompound fuse(NBTTagCompound aNBT1, NBTTagCompound aNBT2) { |
| 1868 | if (aNBT1 == null) return aNBT2==null?make():(NBTTagCompound)aNBT2.copy(); |
| 1869 | NBTTagCompound rNBT = (NBTTagCompound)aNBT1.copy(); |
| 1870 | if (aNBT2 == null) return rNBT; |
| 1871 | for (Object tKey : aNBT2.func_150296_c()) if (!rNBT.hasKey(tKey.toString())) rNBT.setTag(tKey.toString(), aNBT2.getTag(tKey.toString())); |
| 1872 | return rNBT; |
| 1873 | } |
| 1874 | |
| 1875 | public static NBTTagList makeInv(ItemStack... aStacks) { |
| 1876 | NBTTagList rInventory = new NBTTagList(); |
no test coverage detected