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:
Ursprung
5d8084986f
Commit
f408a5d4c6
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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["))
|
||||||
|
@ -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 */
|
||||||
|
@ -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
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren