Optimize WorldBorder collision checks and air

Port part of leafs changes from Tuinity, will worry about rest later with larger changes coming
This commit is contained in:
Spottedleaf
2020-05-10 22:49:58 -04:00
parent 02dcaa0af7
commit aff206ef81
2 changed files with 62 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start - ensure we don't load chunks
+ //int k2 = k1 >> 4;
+ //int l2 = i2 >> 4;
+ boolean far = entity != null && MCUtil.distanceSq(entity.locX(), y, entity.locZ(), x, y, z) > 8;
+ boolean far = entity != null && MCUtil.distanceSq(entity.locX(), y, entity.locZ(), x, y, z) > 14;
+ blockposition_mutableblockposition.setValues(x, y, z);
+
+ boolean isRegionLimited = ICollisionAccess.this instanceof RegionLimitedWorldAccess;