mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 06:24:06 +01:00
28 lines
1003 B
Diff
28 lines
1003 B
Diff
From c84eb9a263bf5bf86b6ed453989bce78ef18670f Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Tue, 5 Jun 2018 00:32:22 -0400
|
|
Subject: [PATCH] Don't load chunks for villager door checks
|
|
|
|
This avoids villages spam loading chunks sync
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java
|
|
index dfcabb83a..22fe23e8e 100644
|
|
--- a/src/main/java/net/minecraft/server/Village.java
|
|
+++ b/src/main/java/net/minecraft/server/Village.java
|
|
@@ -313,6 +313,12 @@ public class Village {
|
|
|
|
private boolean g(BlockPosition blockposition) {
|
|
IBlockData iblockdata = this.a.getType(blockposition);
|
|
+ // Paper start
|
|
+ if (!this.a.isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4, true )) {
|
|
+ return false;
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
Block block = iblockdata.getBlock();
|
|
|
|
return block instanceof BlockDoor ? iblockdata.getMaterial() == Material.WOOD : false;
|
|
--
|
|
2.18.0
|
|
|