mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
parent
aa8483ea7e
commit
1019a87c2c
1 changed files with 5 additions and 5 deletions
|
@ -1,11 +1,11 @@
|
|||
From 80e349f4e9b616dee129420da8566157c7955e1f Mon Sep 17 00:00:00 2001
|
||||
From 0426fd13dc4dcdc742494adaefc1d9358600dc41 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 10 Sep 2018 23:56:36 -0400
|
||||
Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
index 4199c154eb..31c4412012 100644
|
||||
index 4199c154..31c44120 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
@@ -12,11 +12,13 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
|
||||
|
@ -53,14 +53,14 @@ index 4199c154eb..31c4412012 100644
|
|||
return block == this.g && iworldreader.getType(blockposition.up()).isAir() && iworldreader.getType(blockposition.up(2)).isAir();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RandomPositionGenerator.java b/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
index dd6a8fe3dd..8ba69380b7 100644
|
||||
index dd6a8fe3..ddbb71b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
@@ -99,6 +99,7 @@ public class RandomPositionGenerator {
|
||||
}
|
||||
|
||||
blockposition2 = new BlockPosition((double) l + entitycreature.locX, (double) i1 + entitycreature.locY, (double) j1 + entitycreature.locZ);
|
||||
+ if (!entitycreature.world.isLoaded(blockposition1)) continue; // Paper
|
||||
+ if (!entitycreature.world.isLoaded(blockposition2)) continue; // Paper
|
||||
if ((!flag1 || entitycreature.a(blockposition2)) && navigationabstract.a(blockposition2)) {
|
||||
if (!flag) {
|
||||
blockposition2 = a(blockposition2, entitycreature);
|
||||
|
@ -74,5 +74,5 @@ index dd6a8fe3dd..8ba69380b7 100644
|
|||
}
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.20.1
|
||||
|
||||
|
|
Loading…
Reference in a new issue