remove old diff
This commit is contained in:
parent
5999d669ac
commit
6b272a65e7
219 changed files with 22 additions and 60 deletions
|
@ -36,43 +36,19 @@ index 577d427defdb82f5c6c1d8f766c51653f7b6de52..b76024a8dce1ef79f6cbff7403daffd2
|
|||
|
||||
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason());
|
||||
diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
index 4d6f5e627d386f9ca2d7653b0f485c82a13557f5..09fc086548b9d0f97849f56f41e3a5be87f5091a 100644
|
||||
index 4d6f5e627d386f9ca2d7653b0f485c82a13557f5..665120a62525f56912263a3e1b6f12f6c3e15dec 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
@@ -14,6 +14,8 @@ 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;
|
||||
@@ -31,7 +33,22 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -31,7 +31,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private static final Gson GSON = (new GsonBuilder()).setPrettyPrinting().create();
|
||||
private final File file;
|
||||
- private final Map<String, V> map = Maps.newHashMap();
|
||||
+ // Paper - replace HashMap is ConcurrentHashMap
|
||||
+ private final Map<String, V> 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<String, V> map = Maps.newConcurrentMap(); // Paper - replace HashMap is ConcurrentHashMap
|
||||
|
||||
public StoredUserList(File file) {
|
||||
this.file = file;
|
||||
@@ -54,8 +71,13 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -54,8 +54,13 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
|
||||
@Nullable
|
||||
public V get(K key) {
|
||||
|
@ -88,7 +64,7 @@ index 4d6f5e627d386f9ca2d7653b0f485c82a13557f5..09fc086548b9d0f97849f56f41e3a5be
|
|||
}
|
||||
|
||||
public void remove(K key) {
|
||||
@@ -78,7 +100,8 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -78,7 +83,8 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
|
@ -98,7 +74,7 @@ index 4d6f5e627d386f9ca2d7653b0f485c82a13557f5..09fc086548b9d0f97849f56f41e3a5be
|
|||
}
|
||||
|
||||
protected String getKeyForUser(K profile) {
|
||||
@@ -90,14 +113,14 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -90,14 +96,14 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
}
|
||||
|
||||
private void removeExpired() {
|
||||
|
@ -116,7 +92,7 @@ index 4d6f5e627d386f9ca2d7653b0f485c82a13557f5..09fc086548b9d0f97849f56f41e3a5be
|
|||
}
|
||||
}
|
||||
|
||||
@@ -106,9 +129,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -106,9 +112,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
while (iterator.hasNext()) {
|
||||
K k0 = (K) iterator.next(); // CraftBukkit - decompile error
|
||||
|
||||
|
@ -130,7 +106,7 @@ index 4d6f5e627d386f9ca2d7653b0f485c82a13557f5..09fc086548b9d0f97849f56f41e3a5be
|
|||
}
|
||||
|
||||
protected abstract StoredUserEntry<K> createEntry(JsonObject json);
|
||||
@@ -118,6 +143,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -118,6 +126,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
}
|
||||
|
||||
public void save() throws IOException {
|
||||
|
|
|
@ -7,7 +7,7 @@ Powder snow cauldrons should turn to water when
|
|||
extinguishing an entity
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
index 7daf2ec30fd31023d326a6149661f38bfc1d646b..43a72941ab553c154633144d358fb204765257f5 100644
|
||||
index 7daf2ec30fd31023d326a6149661f38bfc1d646b..93f5e583635a2addeabf2adff9374dcec0b66ee4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
@@ -69,7 +69,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
|
@ -27,13 +27,17 @@ index 7daf2ec30fd31023d326a6149661f38bfc1d646b..43a72941ab553c154633144d358fb204
|
|||
private void handleEntityOnFireInside(BlockState state, Level world, BlockPos pos) {
|
||||
if (this.precipitationType == Biome.Precipitation.SNOW) {
|
||||
LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL)), world, pos);
|
||||
@@ -87,6 +88,11 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
@@ -87,6 +88,15 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
}
|
||||
|
||||
}
|
||||
+ // 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
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
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 83605748ca8cf68c0fc6d99c34f3091183c7a059..601691db6943ae78530d01468e581760f2331b43 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -52,6 +52,7 @@ 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;
|
|
@ -436,7 +436,7 @@ index 6e45582f8ea7dd2a46f58369c5581764538bff0d..3ecc92439fc85d224ff52f41c5e34079
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
index 43a72941ab553c154633144d358fb204765257f5..b5e4beb21e1669e5af4da4c3b55a56f83ec5db4f 100644
|
||||
index 93f5e583635a2addeabf2adff9374dcec0b66ee4..843926beb1edd897724b512ad915894fa4a2da6c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
@@ -68,7 +68,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue