Gets rid of the rest of the modX and modY usages, and removes some unused code
This commit is contained in:
@ -7,7 +7,7 @@ import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* This class helps with direction-dependent (modX, modZ) calculations
|
||||
* This class helps with direction-dependent calculations
|
||||
*/
|
||||
public final class DirectionHelper {
|
||||
|
||||
@ -81,7 +81,7 @@ public final class DirectionHelper {
|
||||
} else if (yaw == 270) {
|
||||
return new Vector(1, 0, 0);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Invalid yaw given");
|
||||
throw new IllegalArgumentException(String.format("Invalid yaw %f given", yaw));
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,16 +97,6 @@ public final class DirectionHelper {
|
||||
return topLeft.getRelativeLocation(vector, yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the block at a relative block vector location
|
||||
*
|
||||
* @param vector <p>The relative block vector</p>
|
||||
* @return <p>The block at the given relative position</p>
|
||||
*/
|
||||
public static BlockLocation getBlockAt(BlockLocation topLeft, RelativeBlockVector vector, int modX, int modZ) {
|
||||
return topLeft.modRelative(vector.getRight(), vector.getDepth(), vector.getDistance(), modX, 1, modZ);
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves a location relatively
|
||||
*
|
||||
|
Reference in New Issue
Block a user