mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 21:52:05 -07:00
Fix another case where villages load chunks
This commit is contained in:
@@ -22,5 +22,23 @@ index 01f7cee38..a3aa9f82e 100644
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
Block block = iblockdata.getBlock();
|
Block block = iblockdata.getBlock();
|
||||||
|
|
||||||
|
return block instanceof BlockDoor ? iblockdata.getMaterial() == Material.WOOD : false;
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java
|
||||||
|
index 2eb33a986..9f1867ddd 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/Village.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/Village.java
|
||||||
|
@@ -0,0 +0,0 @@ public class Village {
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean f(BlockPosition blockposition) {
|
||||||
|
- IBlockData iblockdata = this.a.getType(blockposition);
|
||||||
|
+ // Paper start
|
||||||
|
+ IBlockData iblockdata = this.a.getTypeIfLoaded(blockposition);
|
||||||
|
+ if (iblockdata == null) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
Block block = iblockdata.getBlock();
|
||||||
|
|
||||||
return block instanceof BlockDoor ? iblockdata.getMaterial() == Material.WOOD : false;
|
return block instanceof BlockDoor ? iblockdata.getMaterial() == Material.WOOD : false;
|
||||||
--
|
--
|
Reference in New Issue
Block a user