|
10 | 10 | import java.util.ArrayList; |
11 | 11 | import java.util.List; |
12 | 12 | import java.util.Map; |
| 13 | +import java.util.Map.Entry; |
13 | 14 |
|
14 | 15 | import net.fexcraft.app.fmt.porters.PorterManager.ExImPorter; |
15 | 16 | import net.fexcraft.app.fmt.utils.Animator.Animation; |
@@ -175,6 +176,21 @@ public String exportModel(GroupCompound compound, File file, Map<String, Setting |
175 | 176 | write(stream, 7, string); |
176 | 177 | } |
177 | 178 | } |
| 179 | + if(compound.values.size() > 0){ |
| 180 | + for(Entry<String, String> entry : compound.values.entrySet()){ |
| 181 | + write(stream, 5, entry.getKey()); |
| 182 | + write(stream, 0, entry.getValue()); |
| 183 | + } |
| 184 | + } |
| 185 | + if(compound.arrvalues.size() > 0){ |
| 186 | + for(Entry<String, ArrayList<String>> entry : compound.arrvalues.entrySet()){ |
| 187 | + if(entry.getValue().size() == 0) continue; |
| 188 | + write(stream, 6, entry.getKey()); |
| 189 | + for(String string : entry.getValue()){ |
| 190 | + write(stream, 7, string); |
| 191 | + } |
| 192 | + } |
| 193 | + } |
178 | 194 | // |
179 | 195 | stream.write(0); |
180 | 196 | /*stream.close(); |
@@ -209,7 +225,7 @@ private byte[] putInt(int value){ |
209 | 225 | } |
210 | 226 |
|
211 | 227 | private void write(FileOutputStream stream, int code, String string) throws IOException { |
212 | | - stream.write(code); |
| 228 | + if(code > 0) stream.write(code); |
213 | 229 | stream.write(string.getBytes(UTF_8)); |
214 | 230 | stream.write(0); |
215 | 231 | } |
|
0 commit comments