From 3d6c31c4795d4a7f15de35ebc8491cc57952566c Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 7 Oct 2021 12:37:07 +0200 Subject: [PATCH] Update FU load factor usage --- .../viaversion/viabackwards/api/data/VBMappingDataLoader.java | 2 +- .../viabackwards/api/rewriters/EntityRewriterBase.java | 2 +- .../protocol/protocol1_10to1_11/PotionSplashHandler.java | 2 +- .../protocol/protocol1_11_1to1_12/data/MapColorMapping.java | 2 +- .../block_entity_handlers/FlowerPotHandler.java | 2 +- .../protocol/protocol1_12_2to1_13/data/PaintingMapping.java | 2 +- gradle/libs.versions.toml | 4 ++-- settings.gradle.kts | 1 - 8 files changed, 8 insertions(+), 9 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/api/data/VBMappingDataLoader.java b/common/src/main/java/com/viaversion/viabackwards/api/data/VBMappingDataLoader.java index 4625d9b6..f27bfec8 100644 --- a/common/src/main/java/com/viaversion/viabackwards/api/data/VBMappingDataLoader.java +++ b/common/src/main/java/com/viaversion/viabackwards/api/data/VBMappingDataLoader.java @@ -134,7 +134,7 @@ public class VBMappingDataLoader { } public static Int2ObjectMap loadItemMappings(JsonObject oldMapping, JsonObject newMapping, JsonObject diffMapping, boolean warnOnMissing) { - Int2ObjectMap itemMapping = new Int2ObjectOpenHashMap<>(diffMapping.size(), 1F); + Int2ObjectMap itemMapping = new Int2ObjectOpenHashMap<>(diffMapping.size(), 0.99F); Object2IntMap newIdenfierMap = MappingDataLoader.indexedObjectToMap(newMapping); Object2IntMap oldIdenfierMap = MappingDataLoader.indexedObjectToMap(oldMapping); for (Map.Entry entry : diffMapping.entrySet()) { diff --git a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriterBase.java b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriterBase.java index 382e5f26..5b3f6df8 100644 --- a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriterBase.java +++ b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriterBase.java @@ -147,7 +147,7 @@ public abstract class EntityRewriterBase extends En @Override public & EntityType> void mapTypes(EntityType[] oldTypes, Class newTypeClass) { if (typeMappings == null) { - typeMappings = new Int2IntOpenHashMap(oldTypes.length, 1F); + typeMappings = new Int2IntOpenHashMap(oldTypes.length, 0.99F); typeMappings.defaultReturnValue(-1); } for (EntityType oldType : oldTypes) { diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_10to1_11/PotionSplashHandler.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_10to1_11/PotionSplashHandler.java index e3f61e4b..d738cf82 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_10to1_11/PotionSplashHandler.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_10to1_11/PotionSplashHandler.java @@ -22,7 +22,7 @@ import com.viaversion.viaversion.libs.fastutil.ints.Int2IntOpenHashMap; public class PotionSplashHandler { - private static final Int2IntMap DATA = new Int2IntOpenHashMap(14, 1F); + private static final Int2IntMap DATA = new Int2IntOpenHashMap(14, 0.99F); static { DATA.defaultReturnValue(-1); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11_1to1_12/data/MapColorMapping.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11_1to1_12/data/MapColorMapping.java index 0fe74e99..f05981a8 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11_1to1_12/data/MapColorMapping.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11_1to1_12/data/MapColorMapping.java @@ -21,7 +21,7 @@ import com.viaversion.viaversion.libs.fastutil.ints.Int2IntMap; import com.viaversion.viaversion.libs.fastutil.ints.Int2IntOpenHashMap; public class MapColorMapping { - private static final Int2IntMap MAPPING = new Int2IntOpenHashMap(64, 1F); + private static final Int2IntMap MAPPING = new Int2IntOpenHashMap(64, 0.99F); static { MAPPING.defaultReturnValue(-1); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/block_entity_handlers/FlowerPotHandler.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/block_entity_handlers/FlowerPotHandler.java index 08ed82b2..30bc8348 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/block_entity_handlers/FlowerPotHandler.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/block_entity_handlers/FlowerPotHandler.java @@ -29,7 +29,7 @@ import com.viaversion.viaversion.util.Pair; public class FlowerPotHandler implements BackwardsBlockEntityProvider.BackwardsBlockEntityHandler { - private static final Int2ObjectMap> FLOWERS = new Int2ObjectOpenHashMap<>(22, 1F); + private static final Int2ObjectMap> FLOWERS = new Int2ObjectOpenHashMap<>(22, 0.99F); private static final Pair AIR = new Pair<>("minecraft:air", (byte) 0); static { diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/data/PaintingMapping.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/data/PaintingMapping.java index 52fdb51a..5a3b2d68 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/data/PaintingMapping.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/data/PaintingMapping.java @@ -21,7 +21,7 @@ import com.viaversion.viaversion.libs.fastutil.ints.Int2ObjectMap; import com.viaversion.viaversion.libs.fastutil.ints.Int2ObjectOpenHashMap; public class PaintingMapping { - private static final Int2ObjectMap PAINTINGS = new Int2ObjectOpenHashMap<>(26, 1F); + private static final Int2ObjectMap PAINTINGS = new Int2ObjectOpenHashMap<>(26, 0.99F); public static void init() { add("Kebab"); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a45f4452..e20f6fcc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,14 +3,14 @@ metadata.format.version = "1.1" [versions] # ViaVersion -viaver = "4.0.1" +viaver = "4.0.2-SNAPSHOT" # Common provided netty = "4.0.20.Final" guava = "17.0" log4j = "2.8.1" -checkerQual = "3.14.0" +checkerQual = "3.18.0" # Platforms paper = "1.16.5-R0.1-SNAPSHOT" diff --git a/settings.gradle.kts b/settings.gradle.kts index c504fdac..9bd54f5a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,7 +5,6 @@ rootProject.name = "viabackwards-parent" dependencyResolutionManagement { repositories { - mavenLocal() maven("https://repo.viaversion.com") maven("https://papermc.io/repo/repository/maven-public/") maven("https://oss.sonatype.org/content/repositories/snapshots/")