Skip to content

Commit

Permalink
Fix WorldBorder#isInBounds(int x, int z) checking the wrong var (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
uRyanxD authored Oct 25, 2024
1 parent 1fbe959 commit 3e7d6e8
Showing 1 changed file with 19 additions and 0 deletions.
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) {

0 comments on commit 3e7d6e8

Please sign in to comment.