Flipping values
Dieser Commit ist enthalten in:
Ursprung
abd9815de9
Commit
08f0ff3bb1
@ -13,12 +13,12 @@ class IDConverter {
|
|||||||
static Map<String, BlockTypeID> getMap(){
|
static Map<String, BlockTypeID> getMap(){
|
||||||
Map<String, BlockTypeID> ids = new HashMap<>();
|
Map<String, BlockTypeID> ids = new HashMap<>();
|
||||||
YamlConfiguration legacy = YamlConfiguration.loadConfiguration(new InputStreamReader(Objects.requireNonNull(IDConverter.class.getClassLoader().getResourceAsStream("legacy.yml"))));
|
YamlConfiguration legacy = YamlConfiguration.loadConfiguration(new InputStreamReader(Objects.requireNonNull(IDConverter.class.getClassLoader().getResourceAsStream("legacy.yml"))));
|
||||||
for(String blockNum : legacy.getKeys(false)){
|
for(String blockString : legacy.getKeys(false)){
|
||||||
|
String blockNum = legacy.getString(blockString);
|
||||||
String[] block = blockNum.split(":");
|
String[] block = blockNum.split(":");
|
||||||
String blockString = legacy.getString(blockNum);
|
|
||||||
ids.put(blockString, new BlockTypeID(Integer.parseInt(block[0]), Byte.parseByte(block[1])));
|
ids.put(blockString, new BlockTypeID(Integer.parseInt(block[0]), Byte.parseByte(block[1])));
|
||||||
if(blockString.contains("["))
|
if(blockString.contains("["))
|
||||||
ids.put(blockString.split("\\[")[0], new BlockTypeID(Integer.parseInt(block[0]), (byte)0));
|
ids.putIfAbsent(blockString.split("\\[")[0], new BlockTypeID(Integer.parseInt(block[0]), (byte)0));
|
||||||
}
|
}
|
||||||
return ids;
|
return ids;
|
||||||
}
|
}
|
||||||
|
@ -149,8 +149,8 @@ class Schematic_8 {
|
|||||||
|
|
||||||
int id;
|
int id;
|
||||||
BaseBlock state;
|
BaseBlock state;
|
||||||
for(Iterator iterator = paletteObject.keySet().iterator(); iterator.hasNext(); palette.put(id, state)) {
|
for(Iterator<String> iterator = paletteObject.keySet().iterator(); iterator.hasNext(); palette.put(id, state)) {
|
||||||
String palettePart = (String)iterator.next();
|
String palettePart = iterator.next();
|
||||||
id = requireTag(paletteObject, palettePart, IntTag.class).getValue();
|
id = requireTag(paletteObject, palettePart, IntTag.class).getValue();
|
||||||
|
|
||||||
IDConverter.BlockTypeID blockID = ids.get(palettePart);
|
IDConverter.BlockTypeID blockID = ids.get(palettePart);
|
||||||
|
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
In neuem Issue referenzieren
Einen Benutzer sperren