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