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

Paper Changes:
6fd9275 Fix Bossbar updating (closes #6061) (#6076)

Tuinity Changes:
a4009b4 Apply paper's reobf mappings patch
a7dcd62 Make getHardCollidingEntities only return hard colliding entities
2021-07-03 19:55:11 -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 a4af10623511bfbbf9ef799d5727c6e1752a2fa5..75ea35574ad999fd7f6cce4b794017ebc9d0f218 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -895,6 +895,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 a81d328e209c8161446b94dd2e78197a4c6a891f..b70a59e80c4861f8be6fd34b326140a6d3f917ed 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -376,6 +376,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);
@@ -394,6 +395,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;