3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 08:30:10 +01:00

Move to proper FU usage

Dieser Commit ist enthalten in:
KennyTV 2020-06-09 08:13:52 +02:00
Ursprung 6de1ba9f30
Commit e3faa0d77d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 7 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -20,6 +20,8 @@ import us.myles.ViaVersion.api.data.MappingDataLoader;
import us.myles.ViaVersion.api.data.Mappings; import us.myles.ViaVersion.api.data.Mappings;
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.data.MappingData; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.data.MappingData;
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.data.StatisticMappings; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.data.StatisticMappings;
import us.myles.viaversion.libs.fastutil.ints.Int2ObjectMap;
import us.myles.viaversion.libs.fastutil.ints.Int2ObjectOpenHashMap;
import us.myles.viaversion.libs.gson.JsonElement; import us.myles.viaversion.libs.gson.JsonElement;
import us.myles.viaversion.libs.gson.JsonObject; import us.myles.viaversion.libs.gson.JsonObject;
import us.myles.viaversion.libs.gson.JsonPrimitive; import us.myles.viaversion.libs.gson.JsonPrimitive;
@ -29,7 +31,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class BackwardsMappings { public class BackwardsMappings {
public static final Map<Integer, String> statisticMappings = new HashMap<>(); public static final Int2ObjectMap<String> statisticMappings = new Int2ObjectOpenHashMap<>();
public static final Map<String, String> translateMappings = new HashMap<>(); public static final Map<String, String> translateMappings = new HashMap<>();
public static BlockMappingsShortArray blockMappings; public static BlockMappingsShortArray blockMappings;
public static VBSoundMappings soundMappings; public static VBSoundMappings soundMappings;
@ -48,7 +50,7 @@ public class BackwardsMappings {
enchantmentMappings = new VBMappings(mapping1_13.getAsJsonObject("enchantments"), mapping1_12.getAsJsonObject("enchantments"), false); enchantmentMappings = new VBMappings(mapping1_13.getAsJsonObject("enchantments"), mapping1_12.getAsJsonObject("enchantments"), false);
for (Map.Entry<String, Integer> entry : StatisticMappings.statistics.entrySet()) { for (Map.Entry<String, Integer> entry : StatisticMappings.statistics.entrySet()) {
statisticMappings.put(entry.getValue(), entry.getKey()); statisticMappings.put(entry.getValue().intValue(), entry.getKey());
} }
for (Map.Entry<String, String> entry : MappingData.translateMapping.entrySet()) { for (Map.Entry<String, String> entry : MappingData.translateMapping.entrySet()) {
translateMappings.put(entry.getValue(), entry.getKey()); translateMappings.put(entry.getValue(), entry.getKey());

Datei anzeigen

@ -1,10 +1,10 @@
package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.data; package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.data;
import java.util.HashMap; import us.myles.viaversion.libs.fastutil.ints.Int2ObjectMap;
import java.util.Map; import us.myles.viaversion.libs.fastutil.ints.Int2ObjectOpenHashMap;
public class PaintingMapping { public class PaintingMapping {
private static final Map<Integer, String> PAINTINGS = new HashMap<>(); private static final Int2ObjectMap<String> PAINTINGS = new Int2ObjectOpenHashMap<>(26, 1F);
public static void init() { public static void init() {
add("Kebab"); add("Kebab");