3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00

Pre size legacy hash tables

Dieser Commit ist enthalten in:
md_5 2018-08-02 09:07:01 +10:00
Ursprung 8e87d03145
Commit ab5599e8f3

Datei anzeigen

@ -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("");
}
}