From 23ee0a8a889f352889907369b58c361a1b19f7ac Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 9 Apr 2020 23:02:05 -0400 Subject: [PATCH] Fix issue with 0,0 chunks causing crash --- ...d-up-processing-of-chunk-loads-and-generation.patch | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Spigot-Server-Patches/0462-Speed-up-processing-of-chunk-loads-and-generation.patch b/Spigot-Server-Patches/0462-Speed-up-processing-of-chunk-loads-and-generation.patch index bb5af760e..2c0a6c89d 100644 --- a/Spigot-Server-Patches/0462-Speed-up-processing-of-chunk-loads-and-generation.patch +++ b/Spigot-Server-Patches/0462-Speed-up-processing-of-chunk-loads-and-generation.patch @@ -1,4 +1,4 @@ -From ae2e2e396fefd177b43f3c44db54bceafaf07eb1 Mon Sep 17 00:00:00 2001 +From e245683a13582175b68dbfa9babb6bef2b3d2fd5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 9 Apr 2020 00:09:26 -0400 Subject: [PATCH] Speed up processing of chunk loads and generation @@ -46,10 +46,10 @@ index 69e26a8267..434833d50e 100644 public static final Timing connectionTimer = Timings.ofSafe("Connection Handler"); diff --git a/src/main/java/com/destroystokyo/paper/util/map/Long2ObjectLinkedOpenHashMapFastCopy.java b/src/main/java/com/destroystokyo/paper/util/map/Long2ObjectLinkedOpenHashMapFastCopy.java new file mode 100644 -index 0000000000..99e2041bd9 +index 0000000000..e0ad725b2e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/util/map/Long2ObjectLinkedOpenHashMapFastCopy.java -@@ -0,0 +1,34 @@ +@@ -0,0 +1,32 @@ +package com.destroystokyo.paper.util.map; + +import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap; @@ -79,9 +79,7 @@ index 0000000000..99e2041bd9 + this.last = map.last; + this.n = map.n; + this.maxFill = map.maxFill; -+ if (map.containsKey(null)) { -+ this.put(null, map.get(null)); -+ } ++ this.containsNullKey = map.containsNullKey; + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java