mirror of
https://github.com/PaperMC/Paper.git
synced 2025-04-28 06:39:20 +02:00
remove old diff
This commit is contained in:
parent
5999d669ac
commit
6b272a65e7
219 changed files with 22 additions and 60 deletions
patches/server
0237-Use-ConcurrentHashMap-in-JsonList.patch0802-fix-powder-snow-cauldrons-not-turning-to-water.patch0839-Add-NamespacedKey-biome-methods.patch0839-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch0840-Fix-plugin-loggers-on-server-shutdown.patch0841-Stop-large-look-changes-from-crashing-the-server.patch0842-Fire-EntityChangeBlockEvent-in-more-places.patch0843-Missing-eating-regain-reason.patch0844-Missing-effect-cause.patch0845-Added-byte-array-serialization-deserialization-for-P.patch0846-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch0847-Call-BlockPhysicsEvent-more-often.patch0848-Configurable-chat-thread-limit.patch0849-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch0850-fix-Jigsaw-block-kicking-user.patch0851-use-BlockFormEvent-for-mud-converting-into-clay.patch0852-Add-getDrops-to-BlockState.patch0853-Fix-a-bunch-of-vanilla-bugs.patch0854-Remove-unnecessary-onTrackingStart-during-navigation.patch0855-Fix-custom-piglin-loved-items.patch0856-EntityPickupItemEvent-fixes.patch0857-Correctly-handle-interactions-with-items-on-cooldown.patch0858-Add-PlayerInventorySlotChangeEvent.patch0859-Elder-Guardian-appearance-API.patch0860-Allow-changing-bed-s-occupied-property.patch0861-Add-entity-knockback-API.patch0862-Detect-headless-JREs.patch0863-fixed-entity-vehicle-collision-event-not-called.patch0864-optimized-dirt-and-snow-spreading.patch0865-Added-EntityToggleSitEvent.patch0866-Add-fire-tick-delay-option.patch0867-Add-Moving-Piston-API.patch0868-Ignore-impossible-spawn-tick.patch0869-Track-projectile-source-for-fireworks-from-dispenser.patch0870-Fix-EntityArgument-suggestion-permissions-to-align-w.patch0871-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch0872-Prevent-compass-from-loading-chunks.patch0873-Add-PrePlayerAttackEntityEvent.patch0874-ensure-reset-EnderDragon-boss-event-name.patch0875-fix-MC-252817-green-map-markers-do-not-disappear.patch0876-Add-Player-Warden-Warning-API.patch0877-More-vanilla-friendly-methods-to-update-trades.patch0878-Add-paper-dumplisteners-command.patch0879-check-global-player-list-where-appropriate.patch0880-Fix-async-entity-add-due-to-fungus-trees.patch0881-ItemStack-damage-API.patch0882-Friction-API.patch0883-Ability-to-control-player-s-insomnia-and-phantoms.patch0884-Fix-player-kick-on-shutdown.patch0885-Sync-offhand-slot-in-menus.patch0886-Player-Entity-Tracking-Events.patch0887-Limit-pet-look-distance.patch0888-Properly-resend-entities.patch0889-Fixes-and-additions-to-the-SpawnReason-API.patch0890-fix-Instruments.patch0891-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch0892-Fix-inconsistencies-in-dispense-events-regarding-sta.patch0893-Add-BlockLockCheckEvent.patch0894-Add-Sneaking-API-for-Entities.patch0895-Improve-logging-and-errors.patch0896-Improve-PortalEvents.patch0897-Add-config-option-for-spider-worldborder-climbing.patch0898-Add-missing-SpigotConfig-logCommands-check.patch0899-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch0900-Flying-Fall-Damage.patch0901-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch0902-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch0903-config-for-disabling-entity-tag-tags.patch0904-Use-single-player-info-update-packet-on-join.patch0905-Correctly-shrink-items-during-EntityResurrectEvent.patch0906-Win-Screen-API.patch0907-Remove-CraftItemStack-setAmount-null-assignment.patch0908-Fix-force-opening-enchantment-tables.patch0909-Add-Entity-Body-Yaw-API.patch0910-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch0911-Update-the-flag-when-a-captured-block-state-is-outda.patch0912-Add-EntityFertilizeEggEvent.patch0913-Fix-HumanEntity-drop-not-updating-the-client-inv.patch0914-Add-CompostItemEvent-and-EntityCompostItemEvent.patch0915-Correctly-handle-ArmorStand-invisibility.patch0916-Fix-advancement-triggers-for-entity-damage.patch0917-Fix-text-display-error-on-spawn.patch0918-Fix-certain-inventories-returning-null-Locations.patch0919-Add-Shearable-API.patch0920-Fix-SpawnEggMeta-get-setSpawnedType.patch0921-Optimize-Hoppers.patch0922-Fix-beehives-generating-from-using-bonemeal.patch0923-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch0924-Treat-sequence-violations-like-they-should-be.patch0925-remove-duplicate-animate-packet-for-records.patch0926-Prevent-causing-expired-keys-from-impacting-new-join.patch0927-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch0928-Use-array-for-gamerule-storage.patch0929-Fix-a-couple-of-upstream-bed-issues.patch0930-Fix-demo-flag-not-enabling-demo-mode.patch0931-Add-Mob-Experience-reward-API.patch0932-Break-redstone-on-top-of-trap-doors-early.patch0933-Fix-DamageCause-for-Falling-Blocks.patch0934-Avoid-Lazy-Initialization-for-Enum-Fields.patch0935-More-accurate-isInOpenWater-impl.patch
|
@ -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…
Add table
Reference in a new issue