Skip to content

Commit bd9994e

Browse files
committed
Update FMFExporter.java
1 parent 0927a56 commit bd9994e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/net/fexcraft/app/fmt/porters/FMFExporter.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.util.ArrayList;
1111
import java.util.List;
1212
import java.util.Map;
13+
import java.util.Map.Entry;
1314

1415
import net.fexcraft.app.fmt.porters.PorterManager.ExImPorter;
1516
import net.fexcraft.app.fmt.utils.Animator.Animation;
@@ -175,6 +176,21 @@ public String exportModel(GroupCompound compound, File file, Map<String, Setting
175176
write(stream, 7, string);
176177
}
177178
}
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+
}
178194
//
179195
stream.write(0);
180196
/*stream.close();
@@ -209,7 +225,7 @@ private byte[] putInt(int value){
209225
}
210226

211227
private void write(FileOutputStream stream, int code, String string) throws IOException {
212-
stream.write(code);
228+
if(code > 0) stream.write(code);
213229
stream.write(string.getBytes(UTF_8));
214230
stream.write(0);
215231
}

0 commit comments

Comments
 (0)