From c81db390ac63b5a93ce0af9104e4db38d77d86e1 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Sun, 30 Nov 2014 16:33:02 +0000 Subject: [PATCH] Force chunk loading in EntityHuman.getBed, Fixes SPIGOT-64 --- nms-patches/EntityHuman.patch | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/nms-patches/EntityHuman.patch b/nms-patches/EntityHuman.patch index 34cabe67de..7156d7f0d0 100644 --- a/nms-patches/EntityHuman.patch +++ b/nms-patches/EntityHuman.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/EntityHuman.java 2014-11-28 17:43:43.105707435 +0000 -+++ src/main/java/net/minecraft/server/EntityHuman.java 2014-11-28 17:38:17.000000000 +0000 +--- ../work/decompile-8eb82bde//net/minecraft/server/EntityHuman.java 2014-11-30 16:32:54.472808010 +0000 ++++ src/main/java/net/minecraft/server/EntityHuman.java 2014-11-30 16:32:11.364808967 +0000 @@ -8,13 +8,25 @@ import java.util.List; import java.util.UUID; @@ -361,7 +361,15 @@ this.sleepTicks = flag ? 0 : 100; if (flag2) { -@@ -1128,9 +1285,11 @@ +@@ -1090,6 +1247,7 @@ + } + + public static BlockPosition getBed(World world, BlockPosition blockposition, boolean flag) { ++ ((ChunkProviderServer) world.chunkProvider).getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4); + if (world.getType(blockposition).getBlock() != Blocks.BED) { + if (!flag) { + return null; +@@ -1128,9 +1286,11 @@ if (blockposition != null) { this.c = blockposition; this.d = flag; @@ -373,7 +381,7 @@ } } -@@ -1477,6 +1636,7 @@ +@@ -1477,6 +1637,7 @@ } public IChatBaseComponent getScoreboardDisplayName() {