3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-26 16:12:43 +01:00

Fix npe in mapping loading

Dieser Commit ist enthalten in:
KennyTV 2020-04-09 16:40:46 +02:00
Ursprung b8dde25f3a
Commit 6ab2e2f0b2
2 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -67,9 +67,10 @@ public class VBMappingDataLoader {
String diffValue = diffValueJson != null ? diffValueJson.getAsString() : null;
int dataIndex;
if (diffValue == null && (dataIndex = key.indexOf('[')) != -1) {
if (diffValue == null && (dataIndex = key.indexOf('[')) != -1
&& (diffValueJson = diffIdentifiers.getAsJsonPrimitive(key.substring(0, dataIndex))) != null) {
// Check for wildcard mappings
diffValue = diffIdentifiers.getAsJsonPrimitive(key.substring(0, dataIndex)).getAsString();
diffValue = diffValueJson.getAsString();
// Keep original properties if value ends with [
if (diffValue.endsWith("[")) {

Datei anzeigen

@ -350,7 +350,8 @@
"minecraft:polished_andesite_slab": "minecraft:stone_brick_slab[",
"minecraft:diorite_slab": "minecraft:quartz_slab[",
"minecraft:brick_wall": "minecraft:cobblestone_wall[",
"minecraft:prismarine_wall": "minecraft:cobblestone_wall[",
"minecraft:prismarine_wall": "minecraft:cobblestone_wall[",
"minecraft:sandstone_wall": "minecraft:cobblestone_wall[",
"minecraft:red_sandstone_wall": "minecraft:cobblestone_wall[",
"minecraft:mossy_stone_brick_wall": "minecraft:mossy_cobblestone_wall[",
"minecraft:granite_wall": "minecraft:cobblestone_wall[",