mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-16 07:35:35 +01:00
21 lines
1.1 KiB
Diff
21 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
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;
|
|
}
|
|
|