-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix WorldBorder#isInBounds(int x, int z) checking the wrong var (#250)
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
patches/server/0102-Fix-WorldBorder.isInBounds-checking-the-wrong-var.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: uRyanxD <[email protected]> | ||
Date: Fri, 25 Oct 2024 18:08:23 -0300 | ||
Subject: [PATCH] Fix WorldBorder.isInBounds checking the wrong var | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java | ||
index 7ea40468e93e0026f5c39dc41f9c27d7c59d5fc1..a81a0dafb46f48a77df3b25144155b85ffb12df1 100644 | ||
--- a/src/main/java/net/minecraft/server/WorldBorder.java | ||
+++ b/src/main/java/net/minecraft/server/WorldBorder.java | ||
@@ -45,7 +45,7 @@ public class WorldBorder { | ||
|
||
// Inlined the getters from ChunkCoordIntPair | ||
public boolean isInBounds(int x, int z) { | ||
- return (double) ((x << 4) + 15) > this.b() && (double) (x << 4) < this.d() && (double) ((z << 4) + 15) > this.c() && (double) (x << 4) < this.e(); | ||
+ return (double) ((x << 4) + 15) > this.b() && (double) (x << 4) < this.d() && (double) (((z << 4) + 15)) > this.c() && (double) (z << 4) < this.e(); // PandaSpigot - Fix isInBounds(int x, int z) checking the wrong variable | ||
} | ||
|
||
public boolean a(AxisAlignedBB axisalignedbb) { |