Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/Spigot-Server-Patches/0078-SPIGOT-1387-Resolve-bed-issues-on-unloaded-chunks.patch

32 Zeilen
1.5 KiB
Diff

2016-02-05 11:12:16 +01:00
From a18b77ffab781c98e48ceea4c21cf68acab350ee Mon Sep 17 00:00:00 2001
2016-01-04 07:24:36 +01:00
From: chickeneer <emcchickeneer@gmail.com>
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();
--
2016-02-05 11:12:16 +01:00
2.7.0.windows.2
2016-01-04 07:24:36 +01:00