2023-10-21 21:53:33 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Brokkonaut <hannos17@gmx.de>
|
|
|
|
Date: Sat, 21 Oct 2023 20:52:57 +0100
|
|
|
|
Subject: [PATCH] Don't check if we can see non-visible entities
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
2023-12-25 23:51:56 +01:00
|
|
|
index 69549b501e8a72ce535091f1b20f07a1c000ea45..d9cd497bc1b654030ff1a597f038b6a881df9f6b 100644
|
2023-10-21 21:53:33 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
2023-12-25 23:51:56 +01:00
|
|
|
@@ -1435,7 +1435,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
2023-10-21 21:53:33 +02:00
|
|
|
// Paper end - check Y
|
|
|
|
|
|
|
|
// CraftBukkit start - respect vanish API
|
|
|
|
- if (!player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) {
|
|
|
|
+ if (flag && !player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) { // Paper - only consider hits
|
|
|
|
flag = false;
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|