diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java index ebd47a1e6..d465c877f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java @@ -330,13 +330,15 @@ public final void assertVecInRange(Vec3 vec) throws MishapBadLocation { } public final void assertPosInRange(BlockPos vec) throws MishapBadLocation { - this.assertVecInRange(new Vec3(vec.getX(), vec.getY(), vec.getZ())); + Vec3 centered = Vec3.atCenterOf(vec); + this.assertVecInRange(centered); } public final void assertPosInRangeForEditing(BlockPos vec) throws MishapBadLocation { - this.assertVecInRange(new Vec3(vec.getX(), vec.getY(), vec.getZ())); + Vec3 centered = Vec3.atCenterOf(vec); + this.assertVecInRange(centered); if (!this.canEditBlockAt(vec)) - throw new MishapBadLocation(Vec3.atCenterOf(vec), "forbidden"); + throw new MishapBadLocation(centered, "forbidden"); } public final boolean canEditBlockAt(BlockPos vec) {