Files
Purpur/patches/server/0226-SPIGOT-5988-Fix-bed-respawn-location-not-resetting.patch
William Blake Galbreath 31306b4b0e Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
b79bc31 Fix MerchantOffer BuyB Only AssertionError (#6206)
d6c81c8 Don't apply cramming damage to players (#5903)
12942dc Add rate options and timings for sensors and behaviors (#6027)
fc47872 Use mapped names for sensor and behavior timings/config (#6228)
c75a837 Don't expose ASM in API (#6229)
c225bf9 Fix book title and author being improperly serialized as components (#6190)
f25facb Update email & name (DenWav)
44516b1 [ci skip] Put mappings util in a separate class to the stacktrace deobfuscator
2021-07-21 10:49:20 -05:00

39 lines
2.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 3 Jul 2021 16:57:27 -0500
Subject: [PATCH] SPIGOT-5988 Fix bed respawn location not resetting
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 5c9cb6fa72fef151b6c9038e2536a4fdf330375e..bea7b50888462b89c82da756d0a72226a0cdb3fc 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -903,6 +903,7 @@ public abstract class PlayerList {
location = new Location(worldserver1.getWorld(), vec3d.x, vec3d.y, vec3d.z, f1, 0.0F);
} else if (blockposition != null) {
entityplayer1.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));
+ if (net.pl3x.purpur.PurpurConfig.fixBedRespawns) entityplayer1.setRespawnPosition(worldserver1.dimension(), null, 0.0F, false, false); // Purpur - fix SPIGOT-5988
}
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 808d763e767fd4f727c5f0a735c3e5d4ac17a47e..0fada677e0aa6ffa4b654d7eae307863d8fc6e59 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -400,6 +400,7 @@ public class PurpurConfig {
public static int beeInsideBeeHive = 3;
public static boolean anvilCumulativeCost = true;
public static int lightningRodRange = 128;
+ public static boolean fixBedRespawns = false;
private static void blockSettings() {
if (version < 3) {
boolean oldValue = getBoolean("settings.barrel.packed-barrels", true);
@@ -418,6 +419,7 @@ public class PurpurConfig {
beeInsideBeeHive = getInt("settings.blocks.beehive.max-bees-inside", beeInsideBeeHive);
anvilCumulativeCost = getBoolean("settings.blocks.anvil.cumulative-cost", anvilCumulativeCost);
lightningRodRange = getInt("settings.blocks.lightning_rod.range", lightningRodRange);
+ fixBedRespawns = getBoolean("settings.blocks.bed.fix-spigot-5988", fixBedRespawns);
}
public static boolean allowInfinityMending = false;