Add new BauGuiImportExport.exportGui
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
3b8d7f1316
Commit
7e40e4ab63
@ -36,19 +36,14 @@ public class BauGuiImportExport {
|
||||
append(st, Integer.toBinaryString(mapping.getSize() / 9), 3); // Menu Size
|
||||
|
||||
Map<Integer, Integer> map = new HashMap<>();
|
||||
mapping.getMapping().forEach((integer, integer2) -> {
|
||||
map.put(integer2, integer);
|
||||
});
|
||||
mapping.getMapping().forEach((integer, integer2) -> map.put(integer2, integer));
|
||||
|
||||
List<Integer> integerList = map.keySet().stream().sorted().collect(Collectors.toList());
|
||||
for (int i = 0; i < integerList.size(); i++) {
|
||||
int current = integerList.get(i);
|
||||
int last = 0;
|
||||
if (i != 0) {
|
||||
last = integerList.get(i - 1);
|
||||
}
|
||||
int last = i == 0 ? 0 : integerList.get(i - 1);
|
||||
if (current - last > 1) {
|
||||
binaryConvert(st, Integer.toBinaryString(current - last), 3, '0');
|
||||
binaryConvert(st, Integer.toBinaryString(current - last - 1), 3, '0');
|
||||
}
|
||||
binaryConvert(st, Integer.toBinaryString(map.get(current)), 4, '1');
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren