Optimize entity tracker passenger checks

This commit is contained in:
Andrew Steinborn 2021-08-08 00:52:54 -04:00
parent 70262052bd
commit ac0d44684a

View file

@ -22,7 +22,13 @@
public class ServerEntity {
private static final Logger LOGGER = LogUtils.getLogger();
@@ -74,13 +80,17 @@
@@ -69,18 +75,22 @@
private Vec3 lastSentMovement;
private int tickCount;
private int teleportDelay;
- private List<Entity> lastPassengers = Collections.emptyList();
+ private List<Entity> lastPassengers = com.google.common.collect.ImmutableList.of(); // Paper - optimize passenger checks
private boolean wasRiding;
private boolean wasOnGround;
@Nullable
private List<SynchedEntityData.DataValue<?>> trackedDataValues;