File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
shreddedpaper-server/minecraft-patches/sources/net/minecraft/server/level Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 99 import net.minecraft.CrashReport;
1010 import net.minecraft.CrashReportCategory;
1111 import net.minecraft.ReportedException;
12+ @@ -70,9 +_,9 @@
13+ private void scheduleNext() {
14+ int i = this.nextCandidateIndex++;
15+ if (i < this.candidateCount) {
16+ - int i1 = (this.offset + this.coprime * i) % this.candidateCount;
17+ - int i2 = i1 % (this.radius * 2 + 1);
18+ - int i3 = i1 / (this.radius * 2 + 1);
19+ + long i1 = ((this.offset + this.coprime * i) % this.candidateCount) * ((this.radius * 2L + 1L) * (this.radius * 2L + 1L) / this.candidateCount); // ShreddedPaper - fix respawn_radius (MC-302446)
20+ + int i2 = (int) (i1 % (this.radius * 2L + 1L)); // ShreddedPaper - fix respawn_radius (MC-302446)
21+ + int i3 = (int) (i1 / (this.radius * 2L + 1L)); // ShreddedPaper - fix respawn_radius (MC-302446)
22+ int i4 = this.spawnSuggestion.getX() + i2 - this.radius;
23+ int i5 = this.spawnSuggestion.getZ() + i3 - this.radius;
24+ this.scheduleCandidate(
1225@@ -146,7 +_,7 @@
1326 crashReportCategory.setDetail("Progress", () -> index + " out of " + this.candidateCount);
1427 this.finishedFuture.completeExceptionally(new ReportedException(crashReport));
You can’t perform that action at this time.
0 commit comments