diff --git a/Spigot-Server-Patches/Fix-concurrency-issues-in-DataFixers.patch b/Spigot-Server-Patches/Fix-concurrency-issues-in-DataFixers.patch index 77728be3c9..054de2a80a 100644 --- a/Spigot-Server-Patches/Fix-concurrency-issues-in-DataFixers.patch +++ b/Spigot-Server-Patches/Fix-concurrency-issues-in-DataFixers.patch @@ -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 { + private Function, T> value; + + @SuppressWarnings("ConstantConditions") +- public Function, T> evalCached() { ++ public synchronized Function, 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 diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index b509f268ce..156bf3893b 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -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