[ci skip] Add more patch identifying comments, merge related patches
This commit is contained in:
@@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
if (enderdragonbattle != null) {
|
||||
- enderdragonbattle.tryRespawn();
|
||||
+ enderdragonbattle.tryRespawn(aboveBlockPosition); // Paper - pass placed end crystal position to pre-check proximity to portal
|
||||
+ enderdragonbattle.tryRespawn(aboveBlockPosition); // Paper - Perf: Do crystal-portal proximity check before entity lookup
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,12 +41,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
public boolean tryRespawn() { // CraftBukkit - return boolean
|
||||
+ // Paper start - pass null (indicating no placed end crystal involved) by default
|
||||
+ // Paper start - Perf: Do crystal-portal proximity check before entity lookup
|
||||
+ return this.tryRespawn(null);
|
||||
+ }
|
||||
+
|
||||
+ public boolean tryRespawn(@Nullable BlockPos placedEndCrystalPos) { // placedEndCrystalPos is null if the tryRespawn() call was not caused by a placed end crystal
|
||||
+ // Paper end
|
||||
+ // Paper end - Perf: Do crystal-portal proximity check before entity lookup
|
||||
if (this.dragonKilled && this.respawnStage == null) {
|
||||
BlockPos blockposition = this.portalLocation;
|
||||
|
||||
@@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
blockposition = this.portalLocation;
|
||||
}
|
||||
|
||||
+ // Paper start - check placed end crystal to portal proximity before attempting to respawn dragon
|
||||
+ // Paper start - Perf: Do crystal-portal proximity check before entity lookup
|
||||
+ if (placedEndCrystalPos != null) {
|
||||
+ // The end crystal must be 0 or 1 higher than the portal origin
|
||||
+ int dy = placedEndCrystalPos.getY() - blockposition.getY();
|
||||
@@ -68,7 +68,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Perf: Do crystal-portal proximity check before entity lookup
|
||||
+
|
||||
List<EndCrystal> list = Lists.newArrayList();
|
||||
BlockPos blockposition1 = blockposition.above(1);
|
||||
|
||||
Reference in New Issue
Block a user