3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-08 17:20:24 +01:00

Add last load factors

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

Datei anzeigen

@ -137,7 +137,7 @@ public class ProtocolRegistry {
protocols.put(protocol.getClass(), protocol); protocols.put(protocol.getClass(), protocol);
for (int version : supported) { for (int version : supported) {
Int2ObjectMap<Protocol> protocolMap = registryMap.computeIfAbsent(version, s -> new Int2ObjectOpenHashMap<>(1)); Int2ObjectMap<Protocol> protocolMap = registryMap.computeIfAbsent(version, s -> new Int2ObjectOpenHashMap<>(2));
protocolMap.put(output, protocol); protocolMap.put(output, protocol);
} }

Datei anzeigen

@ -10,7 +10,7 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
public class BlockStorage extends StoredObject { public class BlockStorage extends StoredObject {
private static final IntSet WHITELIST = new IntOpenHashSet(46); private static final IntSet WHITELIST = new IntOpenHashSet(46, 1F);
private final Map<Position, ReplacementData> blocks = new ConcurrentHashMap<>(); private final Map<Position, ReplacementData> blocks = new ConcurrentHashMap<>();
static { static {

Datei anzeigen

@ -40,7 +40,7 @@ public class MappingData {
JsonObject heightMapData = MappingDataLoader.loadData("heightMapData-1.14.json"); JsonObject heightMapData = MappingDataLoader.loadData("heightMapData-1.14.json");
JsonArray motionBlocking = heightMapData.getAsJsonArray("MOTION_BLOCKING"); JsonArray motionBlocking = heightMapData.getAsJsonArray("MOTION_BLOCKING");
MappingData.motionBlocking = new IntOpenHashSet(motionBlocking.size()); MappingData.motionBlocking = new IntOpenHashSet(motionBlocking.size(), 1F);
for (JsonElement blockState : motionBlocking) { for (JsonElement blockState : motionBlocking) {
String key = blockState.getAsString(); String key = blockState.getAsString();
Integer id = blockStateMap.get(key); Integer id = blockStateMap.get(key);
@ -52,7 +52,7 @@ public class MappingData {
} }
if (Via.getConfig().isNonFullBlockLightFix()) { if (Via.getConfig().isNonFullBlockLightFix()) {
nonFullBlocks = new IntOpenHashSet(1611); nonFullBlocks = new IntOpenHashSet(1611, 1F);
for (Map.Entry<String, JsonElement> blockstates : mapping1_13_2.getAsJsonObject("blockstates").entrySet()) { for (Map.Entry<String, JsonElement> blockstates : mapping1_13_2.getAsJsonObject("blockstates").entrySet()) {
final String state = blockstates.getValue().getAsString(); final String state = blockstates.getValue().getAsString();
if (state.contains("_slab") || state.contains("_stairs") || state.contains("_wall[")) if (state.contains("_slab") || state.contains("_stairs") || state.contains("_wall["))

Datei anzeigen

@ -19,7 +19,7 @@ public class ItemRewriter {
private static final Map<String, Integer> POTION_NAME_TO_ID = new HashMap<>(); private static final Map<String, Integer> POTION_NAME_TO_ID = new HashMap<>();
private static final Map<Integer, String> POTION_ID_TO_NAME = new HashMap<>(); private static final Map<Integer, String> POTION_ID_TO_NAME = new HashMap<>();
private static final Int2IntMap POTION_INDEX = new Int2IntOpenHashMap(36); private static final Int2IntMap POTION_INDEX = new Int2IntOpenHashMap(36, 1F);
static { static {
/* Entities */ /* Entities */

Datei anzeigen

@ -5,7 +5,7 @@ import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
public class Effect { public class Effect {
private static final Int2IntMap EFFECTS = new Int2IntOpenHashMap(17); private static final Int2IntMap EFFECTS = new Int2IntOpenHashMap(17, 1F);
static { static {
addRewrite(1005, 1010); //Play music disc addRewrite(1005, 1010); //Play music disc