diff options
author | Shane Freeder <[email protected]> | 2021-07-12 12:35:52 +0100 |
---|---|---|
committer | Shane Freeder <[email protected]> | 2021-07-12 12:35:52 +0100 |
commit | cfbab5ca9f7387e830e8856611ea28ddf08a9ecf (patch) | |
tree | cef694cee0b3ede8d033ee140579dbf7e2a0639c | |
parent | 4e01b5a9c778f14258025cf3877d826001608b2a (diff) | |
download | Paper-cfbab5ca9f7387e830e8856611ea28ddf08a9ecf.tar.gz Paper-cfbab5ca9f7387e830e8856611ea28ddf08a9ecf.zip |
Use a CHM for StructureTemplate.Pallete cache
-rw-r--r-- | Spigot-Server-Patches/0761-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0761-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/Spigot-Server-Patches/0761-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch new file mode 100644 index 0000000000..b5c3e252be --- /dev/null +++ b/Spigot-Server-Patches/0761-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder <[email protected]> +Date: Mon, 12 Jul 2021 12:28:29 +0100 +Subject: [PATCH] Use a CHM for StructureTemplate.Pallete cache + +fixes a CME due to this collection being shared across threads + +diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java +index 9b82ff37faaafc3a799413f6949fb88a993aa9a0..866b01255e9dce8a45a3224a73becab7abd7eb1f 100644 +--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java ++++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java +@@ -837,7 +837,7 @@ public class DefinedStructure { + private final Map<Block, List<DefinedStructure.BlockInfo>> b; + + private a(List<DefinedStructure.BlockInfo> list) { +- this.b = Maps.newHashMap(); ++ this.b = Maps.newConcurrentMap(); // Paper - Use CHM + this.a = list; + } + |