diff options
author | md_5 <git@md-5.net> | 2018-08-02 09:07:01 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-08-02 09:07:01 +1000 |
commit | ab5599e8f305163757fae22626969e1a7cd2bfa6 (patch) | |
tree | 14f9c0b9dc637e628cedb10e6836b57947f8c7a4 /src/main/java/org | |
parent | 8e87d031457095700bf0426e70f216d534ee9c2d (diff) | |
download | craftbukkit-ab5599e8f305163757fae22626969e1a7cd2bfa6.tar craftbukkit-ab5599e8f305163757fae22626969e1a7cd2bfa6.tar.gz craftbukkit-ab5599e8f305163757fae22626969e1a7cd2bfa6.tar.lz craftbukkit-ab5599e8f305163757fae22626969e1a7cd2bfa6.tar.xz craftbukkit-ab5599e8f305163757fae22626969e1a7cd2bfa6.zip |
Pre size legacy hash tables
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java index 781fd65b..3a92ac94 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java @@ -42,12 +42,12 @@ public class CraftLegacy { private static final Map<Byte, Material> SPAWN_EGGS = new HashMap<>(); private static final Set<String> whitelistedStates = new HashSet<>(Arrays.asList("explode", "check_decay", "decayable")); - private static final Map<MaterialData, Item> materialToItem = new HashMap<>(); - private static final Map<Item, MaterialData> itemToMaterial = new HashMap<>(); - private static final Map<MaterialData, IBlockData> materialToData = new HashMap<>(); - private static final Map<IBlockData, MaterialData> dataToMaterial = new HashMap<>(); - private static final Map<MaterialData, Block> materialToBlock = new HashMap<>(); - private static final Map<Block, MaterialData> blockToMaterial = new HashMap<>(); + private static final Map<MaterialData, Item> materialToItem = new HashMap<>(16384); + private static final Map<Item, MaterialData> itemToMaterial = new HashMap<>(1024); + private static final Map<MaterialData, IBlockData> materialToData = new HashMap<>(4096); + private static final Map<IBlockData, MaterialData> dataToMaterial = new HashMap<>(4096); + private static final Map<MaterialData, Block> materialToBlock = new HashMap<>(4096); + private static final Map<Block, MaterialData> blockToMaterial = new HashMap<>(1024); public static Material toLegacy(Material material) { if (material == null || material.isLegacy()) { @@ -400,4 +400,8 @@ public class CraftLegacy { } } } + + public static void main(String[] args) { + System.err.println(""); + } } |