Skip to content

Commit

Permalink
Fix error translate block entity position & code cleanup;
Browse files Browse the repository at this point in the history
  • Loading branch information
HarvelsX committed Apr 14, 2022
1 parent b421c08 commit af6c433
Show file tree
Hide file tree
Showing 9 changed files with 850 additions and 874 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.warp</groupId>
<artifactId>CoordinatesObfuscator</artifactId>
<version>1.4.3</version>
<version>1.4.4</version>
<name>CoordinatesObfuscator</name>
<build>
<resources>
Expand Down Expand Up @@ -52,13 +52,13 @@
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>4.7.0</version>
<version>5.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<version>1.18.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
21 changes: 0 additions & 21 deletions src/fake_respawn_code.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public void validate() {
if ((int) (Math.round(z / 16f) * 16) != z) {
throw new IllegalArgumentException("z is not aligned with the chunks!");
}
double reconvertedX = (double) ((int) x);
double reconvertedX = (int) x;
if (reconvertedX != x) {
throw new IllegalArgumentException("x is not safe to convert between double and int");
}
double reconvertedZ = (double) ((int) z);
double reconvertedZ = (int) z;
if (reconvertedZ != z) {
throw new IllegalArgumentException("z is not safe to convert between double and int");
}
Expand Down Expand Up @@ -151,10 +151,7 @@ public boolean equals(final Object o) {
if (Double.compare(this.getX(), other.getX()) != 0) {
return false;
}
if (Double.compare(this.getZ(), other.getZ()) != 0) {
return false;
}
return true;
return Double.compare(this.getZ(), other.getZ()) == 0;
}

public int hashCode() {
Expand Down
Loading

0 comments on commit af6c433

Please sign in to comment.