testing new calculate direction candidates
parent
8b431e1166
commit
c23e74d43e
|
@ -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);
|
||||
|
|
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue