From 4325a772f1bd9c6444f2574f8a4a9602406b0694 Mon Sep 17 00:00:00 2001 From: TheidenHD Date: Wed, 4 Sep 2024 21:23:19 +0200 Subject: [PATCH] Fix rounding error --- src/main/java/vazkii/psi/api/internal/Vector3.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/vazkii/psi/api/internal/Vector3.java b/src/main/java/vazkii/psi/api/internal/Vector3.java index 405cef07..788d4477 100644 --- a/src/main/java/vazkii/psi/api/internal/Vector3.java +++ b/src/main/java/vazkii/psi/api/internal/Vector3.java @@ -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; @@ -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) {