Skip to content

Commit

Permalink
Fix typo in code (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
uRyanxD authored Oct 25, 2024
1 parent 3e7d6e8 commit cbb01df
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ 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
index 7ea40468e93e0026f5c39dc41f9c27d7c59d5fc1..3d5fb36b04121d34dad0b14811fbc9c4d6c8c909 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
+ 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) {

0 comments on commit cbb01df

Please sign in to comment.