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

Paper Changes:
9b0a0d8 Add the default tick rate of the sensor to the timings (#6242)
e905eb1 Add fireball to default max load config (#6252)
2f1f1b7 Add config option to specify timings url (#6256)
efd7e51 Move "use-display-name-in-quit-message" to settings namespace (#6257)
b32a3b1 Call EntityKnockbackByEntityEvent for RamTarget Behavior (#6273)
2021-07-26 21:42:01 -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 94df8ba1b38fb5df039d5ddcb0374d0147d9b3ed..54f5e11b636649d1fb5a1b5cc05427b81341e10f 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 97dba790a02fe54da4278c7e913dbbcf8a25d126..60412d24201bbd61162662b3a2270eecab39fa3d 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -407,6 +407,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);
@@ -425,6 +426,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;