mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 20:07:41 +01:00
Fix yet another issue with concurrency with datafixers
This commit is contained in:
parent
e24d823e5f
commit
a1590d9769
@ -44,6 +44,19 @@ index fb2c380f8a..c8e7a8aa10 100644
|
||||
return rules.get(key);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/com/mojang/datafixers/functions/PointFree.java b/src/main/java/com/mojang/datafixers/functions/PointFree.java
|
||||
index 0d88490f77..028942b8ea 100644
|
||||
--- a/src/main/java/com/mojang/datafixers/functions/PointFree.java
|
||||
+++ b/src/main/java/com/mojang/datafixers/functions/PointFree.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PointFree<T> {
|
||||
private Function<DynamicOps<?>, T> value;
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
- public Function<DynamicOps<?>, T> evalCached() {
|
||||
+ public synchronized Function<DynamicOps<?>, T> evalCached() { // Paper
|
||||
if (!initialized) {
|
||||
initialized = true;
|
||||
value = eval();
|
||||
diff --git a/src/main/java/com/mojang/datafixers/schemas/Schema.java b/src/main/java/com/mojang/datafixers/schemas/Schema.java
|
||||
index 7c67d989e0..45f3ef5957 100644
|
||||
--- a/src/main/java/com/mojang/datafixers/schemas/Schema.java
|
||||
|
@ -83,23 +83,36 @@ for f in $files; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Import Libraries - these must always be mapped manually, no automatic stuff
|
||||
# group lib prefix files
|
||||
importLibrary com.mojang datafixerupper com/mojang/datafixers \
|
||||
schemas/Schema.java \
|
||||
DataFixerUpper.java \
|
||||
types/families/RecursiveTypeFamily.java
|
||||
|
||||
|
||||
########################################################
|
||||
########################################################
|
||||
########################################################
|
||||
# NMS IMPORTS
|
||||
# Temporarily add new NMS dev imports here before you run paper patch
|
||||
# but after you have paper rb'd your changes, remove the line from this file before committing.
|
||||
# we do not need any lines added to this file
|
||||
# we do not need any lines added to this file for NMS
|
||||
|
||||
# import FileName
|
||||
|
||||
|
||||
|
||||
########################################################
|
||||
########################################################
|
||||
########################################################
|
||||
# LIBRARY IMPORTS
|
||||
# These must always be mapped manually, no automatic stuff
|
||||
#
|
||||
# # group # lib # prefix # many files
|
||||
importLibrary com.mojang datafixerupper com/mojang/datafixers \
|
||||
schemas/Schema.java \
|
||||
DataFixerUpper.java \
|
||||
functions/PointFree.java \
|
||||
types/families/RecursiveTypeFamily.java
|
||||
|
||||
# dont forget \ at end of each line but last
|
||||
|
||||
########################################################
|
||||
########################################################
|
||||
########################################################
|
||||
set -e
|
||||
cd "$workdir/Spigot/Spigot-Server/"
|
||||
rm -rf nms-patches applyPatches.sh makePatches.sh >/dev/null 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user