Strip raytracing for EntityLiving#hasLineOfSight
Co-authored-by: Paul Sauve <paul@technove.co>
This commit is contained in:
parent
33bec7f20a
commit
72e87abc2d
959 changed files with 476 additions and 277 deletions
23
patches/server/0785-Fix-Entity-Position-Desync.patch
Normal file
23
patches/server/0785-Fix-Entity-Position-Desync.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
Date: Thu, 23 Dec 2021 23:59:12 -0500
|
||||
Subject: [PATCH] Fix Entity Position Desync
|
||||
|
||||
If entities were teleported in the first tick it would not be send to the client.
|
||||
|
||||
This excludes hanging entities, as this fix caused problematic behavior due to them having their own
|
||||
position field.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 31fa0f4fbf195d0db7a89a060b1cc4fd30dc5ab0..fe7aff356a9e7b4f41c3d5cb3bd5afbb0646c16a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -174,7 +174,7 @@ public class ServerEntity {
|
||||
boolean flag4 = false;
|
||||
boolean flag5 = false;
|
||||
|
||||
- if (this.tickCount > 0 || this.entity instanceof AbstractArrow) {
|
||||
+ if (!(this.entity instanceof net.minecraft.world.entity.decoration.HangingEntity) || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position
|
||||
long k = this.positionCodec.encodeX(vec3d);
|
||||
long l = this.positionCodec.encodeY(vec3d);
|
||||
long i1 = this.positionCodec.encodeZ(vec3d);
|
Loading…
Add table
Add a link
Reference in a new issue