mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
fix lots of levels
This commit is contained in:
@@ -18,7 +18,7 @@ index c2dec99102fa4c64c3c874f725cdc65845cd98d2..90828993a9dffdc27dbdbcb9fcf2fa86
|
||||
// tested and confirmed via System.nanoTime()
|
||||
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> playersInRange = reducedRange ? playerchunk.playersInMobSpawnRange : playerchunk.playersInChunkTickRange;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
|
||||
index 95dc62687d10e5c6f54baadda4a725094c52c07f..2b600546990a1d564a218f3c1290e42a62175f7f 100644
|
||||
index 95dc62687d10e5c6f54baadda4a725094c52c07f..84a7fb84ce97f582a898dab4982ff8e317f40e82 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
|
||||
@@ -31,6 +31,12 @@ public class EatBlockGoal extends Goal {
|
||||
@@ -26,8 +26,8 @@ index 95dc62687d10e5c6f54baadda4a725094c52c07f..2b600546990a1d564a218f3c1290e42a
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
+ // Purpur start
|
||||
+ net.minecraft.world.level.chunk.LevelChunk chunk = this.mob.level.getChunkIfLoaded(this.mob.blockPosition());
|
||||
+ if (chunk == null || chunk.playerChunk == null || !((net.minecraft.server.level.ServerLevel) this.mob.level).getChunkSource().chunkMap.anyPlayerCloseEnoughForSpawning(chunk.playerChunk, this.mob.chunkPosition(), false)) {
|
||||
+ net.minecraft.world.level.chunk.LevelChunk chunk = this.mob.level().getChunkIfLoaded(this.mob.blockPosition());
|
||||
+ if (chunk == null || chunk.playerChunk == null || !((net.minecraft.server.level.ServerLevel) this.mob.level()).getChunkSource().chunkMap.anyPlayerCloseEnoughForSpawning(chunk.playerChunk, this.mob.chunkPosition(), false)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
|
||||
Reference in New Issue
Block a user