From 7466082302c393d7fbc365dbed1e98ec860058af Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 28 Aug 2018 22:12:27 -0400
Subject: [PATCH] Optimize Chunk Height Maps

Use an EnumMap for fast key access
---
 ...Use-an-EnumMap-for-Chunk-Height-Maps.patch | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Spigot-Server-Patches/Use-an-EnumMap-for-Chunk-Height-Maps.patch

diff --git a/Spigot-Server-Patches/Use-an-EnumMap-for-Chunk-Height-Maps.patch b/Spigot-Server-Patches/Use-an-EnumMap-for-Chunk-Height-Maps.patch
new file mode 100644
index 0000000000..8032092d2f
--- /dev/null
+++ b/Spigot-Server-Patches/Use-an-EnumMap-for-Chunk-Height-Maps.patch
@@ -0,0 +1,20 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Aikar <aikar@aikar.co>
+Date: Tue, 28 Aug 2018 22:11:13 -0400
+Subject: [PATCH] Use an EnumMap for Chunk Height Maps
+
+
+diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
+index ed6d0dce33..1d301dcb70 100644
+--- a/src/main/java/net/minecraft/server/Chunk.java
++++ b/src/main/java/net/minecraft/server/Chunk.java
+@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
+         this.sections = new ChunkSection[16];
+         this.g = new boolean[256];
+         this.h = Maps.newHashMap();
+-        this.heightMap = Maps.newHashMap();
++        this.heightMap = new java.util.EnumMap<>(HeightMap.Type.class); // PAper
+         this.tileEntities = new TileEntityHashMap(); // Paper
+         this.p = Maps.newHashMap();
+         this.q = Maps.newHashMap();
+--
\ No newline at end of file