Skip to content

Commit

Permalink
unify a check
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnoksio committed Sep 20, 2023
1 parent f0619a5 commit 83cdbfa
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions nPaper-Server/src/main/java/net/minecraft/server/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -596,24 +596,25 @@ public void move(double d0, double d1, double d2) {
}

this.boundingBox.d(0.0D, 0.0D, d2);
if (!this.J && d8 != d2) {
d2 = 0.0D;
d1 = 0.0D;
d0 = 0.0D;
}

if (!this.J && d7 != d1) {
d2 = 0.0D;
d1 = 0.0D;
d0 = 0.0D;
} else {
d1 = (double) (-this.W);
if (!this.J) {
if (d8 != d2) {
d2 = 0.0D;
d1 = 0.0D;
d0 = 0.0D;
}
if (d7 != d1) {
d2 = 0.0D;
d1 = 0.0D;
d0 = 0.0D;
} else {
d1 = (double) (-this.W);

for (k = 0; k < list.size(); ++k) {
d1 = ((AxisAlignedBB) list.get(k)).b(this.boundingBox, d1);
}
for (k = 0; k < list.size(); ++k) {
d1 = ((AxisAlignedBB) list.get(k)).b(this.boundingBox, d1);
}

this.boundingBox.d(0.0D, d1, 0.0D);
this.boundingBox.d(0.0D, d1, 0.0D);
}
}

if (d10 * d10 + d12 * d12 >= d0 * d0 + d2 * d2) {
Expand Down

0 comments on commit 83cdbfa

Please sign in to comment.