Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
Fix line of sight distance check
Dieser Commit ist enthalten in:
Ursprung
fb06829845
Commit
517f8fbbac
@ -5,7 +5,7 @@ Subject: [PATCH] Line Of Sight Changes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index c0c864bcad6ba6466d7a6453ce920a3603f6066a..ad613b0d6c430a52ee706064c8638a643c2c5ffa 100644
|
||||
index c0c864bcad6ba6466d7a6453ce920a3603f6066a..4246122a794018b526e1619dcd066c2c88f4786c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3548,7 +3548,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@ -14,7 +14,7 @@ index c0c864bcad6ba6466d7a6453ce920a3603f6066a..ad613b0d6c430a52ee706064c8638a64
|
||||
|
||||
- return vec3d1.distanceTo(vec3d) > 128.0D ? false : this.level().clipDirect(vec3d, vec3d1, net.minecraft.world.phys.shapes.CollisionContext.of(this)) == HitResult.Type.MISS; // Paper
|
||||
+ // Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists
|
||||
+ return vec3d1.distanceToSqr(vec3d) > 128.0D ? false : this.level().clipDirect(vec3d, vec3d1, net.minecraft.world.phys.shapes.CollisionContext.of(this)) == HitResult.Type.MISS; // Paper
|
||||
+ return vec3d1.distanceToSqr(vec3d) > 128.0D * 128.0D ? false : this.level().clipDirect(vec3d, vec3d1, net.minecraft.world.phys.shapes.CollisionContext.of(this)) == HitResult.Type.MISS; // Paper
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren