Tracking Range Improvements

Sets tracking range of watermobs to animals instead of misc and simplifies code

Also ignores Enderdragon, defaulting it to Mojang's setting
This commit is contained in:
kickash32
2019-12-21 15:22:09 -05:00
parent 7b1d3d673a
commit c7b38e2bc7
2 changed files with 23 additions and 16 deletions

View File

@@ -386,3 +386,11 @@
if (flag) {
if (this.seenBy.add(player.connection)) {
this.serverEntity.addPairing(player);
@@ -1506,6 +1592,7 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
int j = entity.getType().clientTrackingRange() * 16;
+ j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper
if (j > i) {
i = j;