Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
36f34f01c0
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: da9ef3c5 #496: Add methods to get/set ItemStacks in EquipmentSlots 3abebc9f #492: Let Tameable extend Animals rather than Entity 941111a0 #495: Expose ItemStack and hand used in PlayerShearEntityEvent 4fe19cae #494: InventoryView - Add missing Brewing FUEL_TIME CraftBukkit Changes:933e9094
#664: Add methods to get/set ItemStacks in EquipmentSlots18722312
#662: Expose ItemStack and hand used in PlayerShearEntityEvent
21 Zeilen
1.3 KiB
Diff
21 Zeilen
1.3 KiB
Diff
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
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BehaviorSleep.java b/src/main/java/net/minecraft/server/BehaviorSleep.java
|
|
index fa575dde1924d840b966791aab8553108a877be4..dfe0f66500ab2ea733fd5ef84d7d80f32e2dfaab 100644
|
|
--- 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);
|
|
}
|