2020-05-06 11:22:03 +02:00
|
|
|
From 2237a0b7aab90a43277efa7838da2ab4c2da5059 Mon Sep 17 00:00:00 2001
|
2020-01-18 18:54:33 +01:00
|
|
|
From: Callahan <mr.callahhh@gmail.com>
|
|
|
|
Date: Mon, 13 Jan 2020 23:47:28 -0600
|
|
|
|
Subject: [PATCH] Prevent sync chunk loads when villagers try to find beds
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BehaviorSleep.java b/src/main/java/net/minecraft/server/BehaviorSleep.java
|
2020-05-06 11:22:03 +02:00
|
|
|
index fa575dde192..dfe0f66500a 100644
|
2020-01-18 18:54:33 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/BehaviorSleep.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BehaviorSleep.java
|
|
|
|
@@ -31,7 +31,8 @@ public class BehaviorSleep extends Behavior<EntityLiving> {
|
|
|
|
if (optional.isPresent() && worldserver.getTime() - ((MinecraftSerializableLong) optional.get()).a() < 100L) {
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
- IBlockData iblockdata = worldserver.getType(globalpos.getBlockPosition());
|
|
|
|
+ IBlockData iblockdata = worldserver.getTypeIfLoaded(globalpos.getBlockPosition()); // Paper
|
|
|
|
+ if(iblockdata == null) return false; // Paper
|
|
|
|
|
|
|
|
return globalpos.getBlockPosition().a((IPosition) entityliving.getPositionVector(), 2.0D) && iblockdata.getBlock().a(TagsBlock.BEDS) && !(Boolean) iblockdata.get(BlockBed.OCCUPIED);
|
|
|
|
}
|
|
|
|
--
|
2020-05-02 00:03:47 +02:00
|
|
|
2.26.2
|
2020-01-18 18:54:33 +01:00
|
|
|
|