Skip to content

Commit

Permalink
Fix rounding error
Browse files Browse the repository at this point in the history
  • Loading branch information
TheidenHD committed Sep 4, 2024
1 parent 57ef068 commit 4325a77
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/main/java/vazkii/psi/api/internal/Vector3.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Vec3i;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.phys.AABB;
Expand Down Expand Up @@ -250,12 +249,8 @@ public Vec3 toVec3D() {
return new Vec3(x, y, z);
}

public Vec3i toVec3i() {
return new Vec3i((int) x, (int) y, (int) z);
}

public BlockPos toBlockPos() {
return new BlockPos(toVec3i());
return BlockPos.containing(x, y, z);
}

public double angle(Vector3 vec) {
Expand Down

0 comments on commit 4325a77

Please sign in to comment.