mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-15 12:02:49 +01:00
Use a CHM for StructureTemplate.Pallete cache
This commit is contained in:
parent
4e01b5a9c7
commit
cfbab5ca9f
1 changed files with 20 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
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;
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue