mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-06 02:42:14 +01:00
Pre size legacy hash tables
This commit is contained in:
parent
8e87d03145
commit
ab5599e8f3
@ -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("");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user