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

Paper Changes:
d985976 Add config for mobs immune to default effects (#4835)

Tuinity Changes:
ea43797 Fix portalling from the overworld above y 255
2021-07-10 11:22:56 -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 5fdbdc2d3deb09da018d0db1b495d9fb52e39b44..b984f3fdadd5d44e8e2c1fa12a531a26210cbeed 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -902,6 +902,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 a9675c496dd5f1abc695370a822b8a3e025f8f83..0d77130d4fbd12dbed5cce84a041a41db41351dd 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -378,6 +378,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);
@@ -396,6 +397,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;