Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
Fix another case where villages load chunks
Dieser Commit ist enthalten in:
Ursprung
9b1e9b43ff
Commit
f0cb089a24
@ -1,4 +1,4 @@
|
||||
From 8159283895fa3fc65c9d1ab0d3e1ad67a1c9fe9c Mon Sep 17 00:00:00 2001
|
||||
From 9b8e555364e4a6273adc5c2c22f8f98a6fbf087e 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
|
||||
@ -22,6 +22,24 @@ index 01f7cee38..a3aa9f82e 100644
|
||||
+ // Paper end
|
||||
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
|
||||
@@ -327,7 +327,12 @@ 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;
|
||||
--
|
||||
2.17.1
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren