Writes a GameProfile to an NBTTagCompound. @param tagCompound The NBTTagCompound to write the GameProfile to. @param profile The game profile you are saving.
(NBTTagCompound tagCompound, GameProfile profile)
| 80 | * @param profile The game profile you are saving. |
| 81 | */ |
| 82 | public static NBTTagCompound writeGameProfile(NBTTagCompound tagCompound, GameProfile profile) |
| 83 | { |
| 84 | if (!StringUtils.isNullOrEmpty(profile.getName())) |
| 85 | { |
| 86 | tagCompound.setString("Name", profile.getName()); |
| 87 | } |
| 88 | |
| 89 | if (profile.getId() != null) |
| 90 | { |
| 91 | tagCompound.setString("Id", profile.getId().toString()); |
| 92 | } |
| 93 | |
| 94 | if (!profile.getProperties().isEmpty()) |
| 95 | { |
| 96 | NBTTagCompound nbttagcompound = new NBTTagCompound(); |
| 97 | |
| 98 | for (String s : profile.getProperties().keySet()) |
| 99 | { |
| 100 | NBTTagList nbttaglist = new NBTTagList(); |
| 101 | |
| 102 | for (Property property : profile.getProperties().get(s)) |
| 103 | { |
| 104 | NBTTagCompound nbttagcompound1 = new NBTTagCompound(); |
| 105 | nbttagcompound1.setString("Value", property.getValue()); |
| 106 | |
| 107 | if (property.hasSignature()) |
| 108 | { |
| 109 | nbttagcompound1.setString("Signature", property.getSignature()); |
| 110 | } |
| 111 | |
| 112 | nbttaglist.appendTag(nbttagcompound1); |
| 113 | } |
| 114 | |
| 115 | nbttagcompound.setTag(s, nbttaglist); |
| 116 | } |
| 117 | |
| 118 | tagCompound.setTag("Properties", nbttagcompound); |
| 119 | } |
| 120 | |
| 121 | return tagCompound; |
| 122 | } |
| 123 | |
| 124 | public static boolean func_181123_a(NBTBase p_181123_0_, NBTBase p_181123_1_, boolean p_181123_2_) |
| 125 | { |
no test coverage detected