mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 871f30038 fixed kick event leave message (#4766) 0aa0a1d97 Updated Upstream (CraftBukkit) d770f71f4 Add PlayerArmSwingEvent (#5353) 23d887b2a Swapped out Vec3#distanceTo call with a Vec3#distanceToSqr call to remove calls to Math.sqrt 5ff90b938 Fix collisions during world generation (#6129) 20ff0b058 [ci skip] Add a test plugin (#6133) 416ec9898 [ci skip] Remove extra newlines at EOF (#6127) 79d7dfbbe Ensure shulker bounding box is updated (#6010) d8ad276b7 [ci skip] More badges and things to README.md (#5338) bb44da842 Fix cancelling EntityPickupItemEvent for villagers (#6091) 351a2c38b Drop no longer needed patch (#6115) 648f6078d Route sign run_command click events through normal chat logic (#6109) dafc06460 Fix MobEffectArgument#getEffect reobf 4aef0354d [ci skip] Use Java toolchain for run tasks (#6108) 144e5f7ac Add option for logging named entity deaths (#6107) b5be382d0 Add methods to `ProtoWorld` for working with `BlockState`s (#5929)
39 lines
2.3 KiB
Diff
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;
|