Readd 0414 use distance map to optimise entity tracker (#9868)

This commit is contained in:
TomTom
2023-11-03 15:05:57 +01:00
parent 0d2a5216f6
commit 913522cb6b
3 changed files with 348 additions and 7 deletions

View File

@@ -15,9 +15,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public boolean updatingSectionStatus = false;
// Paper end
// Paper start - optimise entity tracking
final org.spigotmc.TrackingRange.TrackingRangeType trackingRangeType = org.spigotmc.TrackingRange.getTrackingRangeType(this);
+ // Paper start - make end portalling safe
+ public BlockPos portalBlock;
+ public ServerLevel portalWorld;
@@ -49,8 +49,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // Paper end - make end portalling safe
public Entity(EntityType<?> type, Level world) {
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
public boolean isLegacyTrackingEntity = false;
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}