diff --git a/src/xyz/soper/arty/event/Listener/MortarInteract.java b/src/xyz/soper/arty/event/Listener/MortarInteract.java index 6806843..b5bbff6 100644 --- a/src/xyz/soper/arty/event/Listener/MortarInteract.java +++ b/src/xyz/soper/arty/event/Listener/MortarInteract.java @@ -16,6 +16,7 @@ import org.bukkit.util.Vector; import xyz.soper.arty.item.Mortar; import xyz.soper.arty.item.MortarTuner; import xyz.soper.arty.item.Shell; +import xyz.soper.arty.util.ArtyMath; import xyz.soper.arty.util.MortarHandler; public class MortarInteract implements Listener { @@ -80,9 +81,11 @@ public class MortarInteract implements Listener { Mortar.setMortarDirection(linkedMortar, horizonVector); player.sendMessage(ChatColor.GOLD + "Mortar is now pointing towards " + horizonVector.getX() + ", " + horizonVector.getZ()); - - player.sendMessage("DEBUG: Angle is " + (180*horizonVector.angle(new Vector(1,0,0))/Math.PI)); + //Using new methods to test: + player.sendMessage("DEBUG: Angle with new basic trig method is " + ArtyMath.calculateDirectionBASICTRIG(playerDirection)); + + player.sendMessage("DEBUG: Angle with new dot product method is " + ArtyMath.calculateDirectionDOTPRODUCT(playerDirection)); } else if(event.getAction() == Action.RIGHT_CLICK_AIR){ Vector verticalVector = new Vector(0, playerDirection.getY(), 0); diff --git a/src/xyz/soper/arty/item/Mortar.java b/src/xyz/soper/arty/item/Mortar.java index b7768fc..409d118 100644 --- a/src/xyz/soper/arty/item/Mortar.java +++ b/src/xyz/soper/arty/item/Mortar.java @@ -204,7 +204,7 @@ public class Mortar { * Adjusts a block's directional metadata. * @param block Block that represents a mortar. * @param direction Directional vector. - * @deprecated This function has been deprecated in favor of the angle-based setElevation and setDirection angles. + * @deprecated This function has been deprecated in favor of the angle-based setElevation and setDirection methods. */ @Deprecated public static void setMortarDirection(Block block, Vector direction){