Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading