diff --git a/patches/minecraft/net/minecraft/Util.java.patch b/patches/minecraft/net/minecraft/Util.java.patch index 703501f8af..b6f4bf720c 100644 --- a/patches/minecraft/net/minecraft/Util.java.patch +++ b/patches/minecraft/net/minecraft/Util.java.patch @@ -21,3 +21,13 @@ if (SharedConstants.f_136183_) { throw illegalargumentexception; } +@@ -692,7 +_,8 @@ + + public static Function m_143827_(final Function p_143828_) { + return new Function() { +- private final Map f_211548_ = Maps.newHashMap(); ++ // FORGE: Allow using memoized functions from multiple threads. ++ private final Map f_211548_ = Maps.newConcurrentMap(); + + public R apply(T p_214691_) { + return this.f_211548_.computeIfAbsent(p_214691_, p_143828_);