2020-01-18 18:54:33 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorSleep.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorSleep.java
|
2020-05-06 11:48:49 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2021-03-16 08:19:45 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorSleep.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorSleep.java
|
2020-01-18 18:54:33 +01:00
|
|
|
@@ -0,0 +0,0 @@ public class BehaviorSleep extends Behavior<EntityLiving> {
|
2020-06-26 01:38:24 +02:00
|
|
|
}
|
2020-01-18 18:54:33 +01:00
|
|
|
}
|
2020-06-26 01:38:24 +02:00
|
|
|
|
|
|
|
- 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((Tag) TagsBlock.BEDS) && !(Boolean) iblockdata.get(BlockBed.OCCUPIED);
|
|
|
|
}
|