File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Common/src/main/java/at/petrak/hexcasting/api/casting/eval Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -330,13 +330,15 @@ public final void assertVecInRange(Vec3 vec) throws MishapBadLocation {
330330 }
331331
332332 public final void assertPosInRange (BlockPos vec ) throws MishapBadLocation {
333- this .assertVecInRange (new Vec3 (vec .getX (), vec .getY (), vec .getZ ()));
333+ Vec3 centered = Vec3 .atCenterOf (vec );
334+ this .assertVecInRange (centered );
334335 }
335336
336337 public final void assertPosInRangeForEditing (BlockPos vec ) throws MishapBadLocation {
337- this .assertVecInRange (new Vec3 (vec .getX (), vec .getY (), vec .getZ ()));
338+ Vec3 centered = Vec3 .atCenterOf (vec );
339+ this .assertVecInRange (centered );
338340 if (!this .canEditBlockAt (vec ))
339- throw new MishapBadLocation (Vec3 . atCenterOf ( vec ) , "forbidden" );
341+ throw new MishapBadLocation (centered , "forbidden" );
340342 }
341343
342344 public final boolean canEditBlockAt (BlockPos vec ) {
You can’t perform that action at this time.
0 commit comments