Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-26 00:00:33 +01:00
20w15a, minimize diffmappings
Dieser Commit ist enthalten in:
Ursprung
32c26a5539
Commit
b8dde25f3a
@ -4,9 +4,18 @@ import nl.matsv.viabackwards.ViaBackwards;
|
||||
import us.myles.ViaVersion.api.Via;
|
||||
import us.myles.ViaVersion.api.data.MappingDataLoader;
|
||||
import us.myles.ViaVersion.util.GsonUtil;
|
||||
import us.myles.viaversion.libs.gson.*;
|
||||
import us.myles.viaversion.libs.gson.JsonArray;
|
||||
import us.myles.viaversion.libs.gson.JsonElement;
|
||||
import us.myles.viaversion.libs.gson.JsonIOException;
|
||||
import us.myles.viaversion.libs.gson.JsonObject;
|
||||
import us.myles.viaversion.libs.gson.JsonPrimitive;
|
||||
import us.myles.viaversion.libs.gson.JsonSyntaxException;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.Map;
|
||||
|
||||
public class VBMappingDataLoader {
|
||||
@ -52,27 +61,36 @@ public class VBMappingDataLoader {
|
||||
String key = entry.getValue().getAsString();
|
||||
Map.Entry<String, JsonElement> value = MappingDataLoader.findValue(newIdentifiers, key);
|
||||
if (value == null) {
|
||||
// Search in diff mappings
|
||||
if (diffIdentifiers != null) {
|
||||
JsonPrimitive diffValue = diffIdentifiers.getAsJsonPrimitive(key);
|
||||
if (diffValue == null && key.contains("[")) {
|
||||
diffValue = diffIdentifiers.getAsJsonPrimitive(key.substring(0, key.indexOf('[')));
|
||||
// Search in diff mappings
|
||||
JsonPrimitive diffValueJson = diffIdentifiers.getAsJsonPrimitive(key);
|
||||
String diffValue = diffValueJson != null ? diffValueJson.getAsString() : null;
|
||||
|
||||
int dataIndex;
|
||||
if (diffValue == null && (dataIndex = key.indexOf('[')) != -1) {
|
||||
// Check for wildcard mappings
|
||||
diffValue = diffIdentifiers.getAsJsonPrimitive(key.substring(0, dataIndex)).getAsString();
|
||||
|
||||
// Keep original properties if value ends with [
|
||||
if (diffValue.endsWith("[")) {
|
||||
diffValue += key.substring(dataIndex + 1);
|
||||
}
|
||||
if (diffValue == null) {
|
||||
if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("No diff key for " + entry.getValue() + " :( ");
|
||||
}
|
||||
continue;
|
||||
|
||||
if (diffValue != null) {
|
||||
value = MappingDataLoader.findValue(newIdentifiers, diffValue);
|
||||
}
|
||||
value = MappingDataLoader.findValue(newIdentifiers, diffValue.getAsString());
|
||||
}
|
||||
|
||||
if (value == null) {
|
||||
// Nothing found :(
|
||||
if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("No key for " + entry.getValue() + " :( ");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
output[Integer.parseInt(entry.getKey())] = Short.parseShort(value.getKey());
|
||||
}
|
||||
}
|
||||
|
@ -136,6 +136,7 @@ public class BlockItemPackets1_16 extends nl.matsv.viabackwards.api.rewriters.It
|
||||
case 170: // new nether biomes
|
||||
case 171:
|
||||
case 172:
|
||||
case 173:
|
||||
newId = 8;
|
||||
break;
|
||||
}
|
||||
|
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
@ -3,6 +3,10 @@
|
||||
"selectWorld.locked": "Locked by another running instance of Minecraft",
|
||||
"selectWorld.access_failure": "Failed to access level",
|
||||
"selectWorld.delete_failure": "Failed to delete level",
|
||||
"chat.queue": "[+%s pending lines]",
|
||||
"options.chat.line_spacing": "Line Spacing",
|
||||
"options.chat.delay_none": "Chat Delay: None",
|
||||
"options.chat.delay": "Chat Delay: %s seconds",
|
||||
"block.minecraft.nether_gold_ore": "Nether Gold Ore",
|
||||
"block.minecraft.soul_fire_torch": "Soul Fire Torch",
|
||||
"block.minecraft.soul_fire_wall_torch": "Soul Fire Wall Torch",
|
||||
@ -62,15 +66,38 @@
|
||||
"block.minecraft.potted_warped_roots": "Potted Warped Roots",
|
||||
"block.minecraft.target": "Target",
|
||||
"block.minecraft.soul_fire_lantern": "Soul Fire Lantern",
|
||||
"block.minecraft.soul_campfire": "Soul Campfire",
|
||||
"block.minecraft.lodestone": "Lodestone",
|
||||
"block.minecraft.netherite_block": "Block of Netherite",
|
||||
"block.minecraft.ancient_debris": "Ancient Debris",
|
||||
"block.minecraft.crying_obsidian": "Crying Obsidian",
|
||||
"block.minecraft.blackstone": "Blackstone",
|
||||
"block.minecraft.blackstone_slab": "Blackstone Slab",
|
||||
"block.minecraft.blackstone_stairs": "Blackstone Stairs",
|
||||
"block.minecraft.blackstone_wall": "Blackstone Wall",
|
||||
"block.minecraft.polished_blackstone_bricks": "Polished Blackstone Bricks",
|
||||
"block.minecraft.polished_blackstone_brick_slab": "Polished Blackstone Brick Slab",
|
||||
"block.minecraft.polished_blackstone_brick_stairs": "Polished Blackstone Brick Stairs",
|
||||
"block.minecraft.polished_blackstone_brick_wall": "Polished Blackstone Brick Wall",
|
||||
"block.minecraft.chiseled_polished_blackstone": "Chiseled Polished Blackstone",
|
||||
"block.minecraft.cracked_polished_blackstone_bricks": "Cracked Polished Blackstone Bricks",
|
||||
"block.minecraft.gilded_blackstone": "Gilded Blackstone",
|
||||
"block.minecraft.polished_blackstone": "Polished Blackstone",
|
||||
"block.minecraft.polished_blackstone_wall": "Polished Blackstone Wall",
|
||||
"block.minecraft.polished_blackstone_slab": "Polished Blackstone Slab",
|
||||
"block.minecraft.polished_blackstone_stairs": "Polished Blackstone Stairs",
|
||||
"block.minecraft.polished_blackstone_pressure_plate": "Polished Blackstone Pressure Plate",
|
||||
"block.minecraft.polished_blackstone_button": "Polished Blackstone Button",
|
||||
"block.minecraft.cracked_nether_bricks": "Cracked Nether Bricks",
|
||||
"block.minecraft.chiseled_nether_bricks": "Chiseled Nether Bricks",
|
||||
"block.minecraft.quartz_bricks": "Quartz Bricks",
|
||||
"item.minecraft.hoglin_spawn_egg": "Hoglin Spawn Egg",
|
||||
"item.minecraft.piglin_spawn_egg": "Piglin Spawn Egg",
|
||||
"item.minecraft.strider_spawn_egg": "Strider Spawn Egg",
|
||||
"item.minecraft.zoglin_spawn_egg": "Zoglin Spawn Egg",
|
||||
"item.minecraft.zombified_piglin_spawn_egg": "Zombified Piglin Spawn Egg",
|
||||
"item.minecraft.piglin_banner_pattern": "Banner Pattern",
|
||||
"item.minecraft.piglin_banner_pattern.desc": "Piglin",
|
||||
"item.minecraft.lodestone_compass": "Lodestone Compass",
|
||||
"item.minecraft.netherite_scrap": "Netherite Scrap",
|
||||
"item.minecraft.netherite_ingot": "Netherite Ingot",
|
||||
@ -211,7 +238,8 @@
|
||||
"biome.minecraft.nether_wastes": "Nether Wastes",
|
||||
"biome.minecraft.soul_sand_valley": "Soul Sand Valley",
|
||||
"biome.minecraft.warped_forest": "Warped Forest",
|
||||
"biome.minecraft.crimson_forest": "Crimson Forest"
|
||||
"biome.minecraft.crimson_forest": "Crimson Forest",
|
||||
"biome.minecraft.basalt_deltas": "Basalt Deltas"
|
||||
},
|
||||
"1.15": {
|
||||
"narration.suggestion.tooltip": "Selected suggestion %d out of %d: %s (%s)",
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren