summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-30 16:33:02 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2014-11-30 16:33:45 +0000
commitc81db390ac63b5a93ce0af9104e4db38d77d86e1 (patch)
tree5482af4bf3d7d33952539708ffb51adee7b503f3 /nms-patches
parent8b94fad772977bb3c5f367bccaf3a2a1f0edc3b1 (diff)
downloadcraftbukkit-c81db390ac63b5a93ce0af9104e4db38d77d86e1.tar
craftbukkit-c81db390ac63b5a93ce0af9104e4db38d77d86e1.tar.gz
craftbukkit-c81db390ac63b5a93ce0af9104e4db38d77d86e1.tar.lz
craftbukkit-c81db390ac63b5a93ce0af9104e4db38d77d86e1.tar.xz
craftbukkit-c81db390ac63b5a93ce0af9104e4db38d77d86e1.zip
Force chunk loading in EntityHuman.getBed, Fixes SPIGOT-64
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/EntityHuman.patch16
1 files changed, 12 insertions, 4 deletions
diff --git a/nms-patches/EntityHuman.patch b/nms-patches/EntityHuman.patch
index 34cabe67..7156d7f0 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() {