From fc727a05cd67685f26f9b0c0f864f1c0f5135703 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Wed, 6 Dec 2023 19:26:53 +0100 Subject: [PATCH] remove old diff --- .../Use-ConcurrentHashMap-in-JsonList.patch | 26 +------------------ ...random-in-ServerLoginPacketListenerI.patch | 18 ------------- ...-snow-cauldrons-not-turning-to-water.patch | 6 ++++- 3 files changed, 6 insertions(+), 44 deletions(-) delete mode 100644 patches/server/Use-thread-safe-random-in-ServerLoginPacketListenerI.patch diff --git a/patches/server/Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/Use-ConcurrentHashMap-in-JsonList.patch index 1ee09412f2..e95288f2ec 100644 --- a/patches/server/Use-ConcurrentHashMap-in-JsonList.patch +++ b/patches/server/Use-ConcurrentHashMap-in-JsonList.patch @@ -39,36 +39,12 @@ diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/sr index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/players/StoredUserList.java +++ b/src/main/java/net/minecraft/server/players/StoredUserList.java -@@ -0,0 +0,0 @@ import java.io.BufferedReader; - import java.io.BufferedWriter; - import java.io.File; - import java.io.IOException; -+import java.lang.reflect.ParameterizedType; // Paper -+import java.lang.reflect.Type; // Paper - import java.nio.charset.StandardCharsets; - import java.util.Collection; - import java.util.Iterator; @@ -0,0 +0,0 @@ public abstract class StoredUserList> { private static final Logger LOGGER = LogUtils.getLogger(); private static final Gson GSON = (new GsonBuilder()).setPrettyPrinting().create(); private final File file; - private final Map map = Maps.newHashMap(); -+ // Paper - replace HashMap is ConcurrentHashMap -+ private final Map map = Maps.newConcurrentMap(); -+ private boolean e = true; -+ private static final ParameterizedType f = new ParameterizedType() { -+ public Type[] getActualTypeArguments() { -+ return new Type[]{StoredUserEntry.class}; -+ } -+ -+ public Type getRawType() { -+ return List.class; -+ } -+ -+ public Type getOwnerType() { -+ return null; -+ } -+ }; ++ private final Map map = Maps.newConcurrentMap(); // Paper - replace HashMap is ConcurrentHashMap public StoredUserList(File file) { this.file = file; diff --git a/patches/server/Use-thread-safe-random-in-ServerLoginPacketListenerI.patch b/patches/server/Use-thread-safe-random-in-ServerLoginPacketListenerI.patch deleted file mode 100644 index 670d9bf9f1..0000000000 --- a/patches/server/Use-thread-safe-random-in-ServerLoginPacketListenerI.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Thu, 11 Aug 2022 14:37:33 +0100 -Subject: [PATCH] Use thread safe random in ServerLoginPacketListenerImpl - - -diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, - private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads - private static final int MAX_TICKS_BEFORE_LOGIN = 600; - private static final Component DISCONNECT_UNEXPECTED_QUERY = Component.translatable("multiplayer.disconnect.unexpected_query_response"); -+ private static final RandomSource RANDOM = new org.bukkit.craftbukkit.util.RandomSourceWrapper(new java.util.Random()); // Paper - This is called across threads, make safe - private final byte[] challenge; - final MinecraftServer server; - public final Connection connection; diff --git a/patches/server/fix-powder-snow-cauldrons-not-turning-to-water.patch b/patches/server/fix-powder-snow-cauldrons-not-turning-to-water.patch index b09bf388a0..9f8c4e58b1 100644 --- a/patches/server/fix-powder-snow-cauldrons-not-turning-to-water.patch +++ b/patches/server/fix-powder-snow-cauldrons-not-turning-to-water.patch @@ -33,7 +33,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + // Paper start + protected boolean handleEntityOnFireInsideWithEvent(BlockState state, Level world, BlockPos pos, Entity entity) { -+ return LayeredCauldronBlock.lowerFillLevel(state, world, pos, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH); ++ if (this.precipitationType == Biome.Precipitation.SNOW) { ++ return LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL)), world, pos, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH); ++ } else { ++ return LayeredCauldronBlock.lowerFillLevel(state, world, pos, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH); ++ } + } + // Paper end