aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches
diff options
context:
space:
mode:
authorchickeneer <[email protected]>2016-01-04 00:24:36 -0600
committerZach Brown <[email protected]>2016-01-04 00:24:44 -0600
commit06ada7cc6d2e748b29928d31b97aface901ca427 (patch)
tree113b4aa56345e4c58eff728fb0fe3d1ddcb29b7e /Spigot-Server-Patches
parentd02fb4e971d00981f25622dbf0feb76cd7345b67 (diff)
downloadPaper-06ada7cc6d2e748b29928d31b97aface901ca427.tar.gz
Paper-06ada7cc6d2e748b29928d31b97aface901ca427.zip
Resolve bed issues on unloaded chunks
Diffstat (limited to 'Spigot-Server-Patches')
-rw-r--r--Spigot-Server-Patches/0079-SPIGOT-1387-Resolve-bed-issues-on-unloaded-chunks.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0079-SPIGOT-1387-Resolve-bed-issues-on-unloaded-chunks.patch b/Spigot-Server-Patches/0079-SPIGOT-1387-Resolve-bed-issues-on-unloaded-chunks.patch
new file mode 100644
index 0000000000..777f7f8eed
--- /dev/null
+++ b/Spigot-Server-Patches/0079-SPIGOT-1387-Resolve-bed-issues-on-unloaded-chunks.patch
@@ -0,0 +1,31 @@
+From 8acb6dbd2a55f6f8552315497030911a10e71284 Mon Sep 17 00:00:00 2001
+From: chickeneer <[email protected]>
+Date: Mon, 4 Jan 2016 00:19:32 -0600
+Subject: [PATCH] SPIGOT-1387: Resolve bed issues on unloaded chunks
+
+
+diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
+index cc1e33c..0ad4edb 100644
+--- a/src/main/java/net/minecraft/server/EntityHuman.java
++++ b/src/main/java/net/minecraft/server/EntityHuman.java
+@@ -1271,7 +1271,17 @@ public abstract class EntityHuman extends EntityLiving {
+ return this.world.getType(this.bx).getBlock() == Blocks.BED;
+ }
+
++ // PaperSpigot start - SPIGOT-1387: Resolve bed issues on unloaded chunks
+ public static BlockPosition getBed(World world, BlockPosition blockposition, boolean flag) {
++ boolean before = ((WorldServer) world).chunkProviderServer.forceChunkLoad;
++ ((WorldServer) world).chunkProviderServer.forceChunkLoad = true;
++ final BlockPosition result = getBed0(world, blockposition, flag);
++ ((WorldServer) world).chunkProviderServer.forceChunkLoad = before;
++ return result;
++ }
++
++ private static BlockPosition getBed0(World world, BlockPosition blockposition, boolean flag) {
++ // PaperSpigot end
+ ((ChunkProviderServer) world.chunkProvider).getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4); // CraftBukkit
+ Block block = world.getType(blockposition).getBlock();
+
+--
+2.6.4
+