Class MultipartBalloonNode

java.lang.Object
net.jeqo.bloons.balloon.multipart.nodes.MultipartBalloonNode

public class MultipartBalloonNode extends Object
Handles the movement and functionality of a single node, model, or armor stand in a multipart balloon
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The child node of the current node
    The parent node of the current node
    The front most point of the segment/node
    The back most point of the segment/node
  • Constructor Summary

    Constructors
    Constructor
    Description
    MultipartBalloonNode(float x, float y, float z, float length, int index, MultipartBalloonType balloonType, org.bukkit.entity.Player balloonOwner, double maxNodeJointAngle, double yAxisInterpolation, double turningSplineInterpolation)
    Builder for creating lead segment.
    MultipartBalloonNode(MultipartBalloonNode parent, float length, int index, MultipartBalloonType balloonType, org.bukkit.entity.Player balloonOwner, double maxNodeJointAngle, double yAxisInterpolation, double turningSplineInterpolation)
    Builder for following segments.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.util.EulerAngle
    calculateHeadPose(org.bukkit.util.Vector pointA, org.bukkit.util.Vector pointB)
    Calculates the head pose of the armor stand.
    void
    Destroys the armor stand and removes it from the world
    void
    Sets the correct position and item in the armor stand.
    void
    Follows to the child's, also known as the previous nodes, point A location.
    void
    follow(float targetX, float targetY, float targetZ)
    Makes point A follow to the desired location.
    float
    Gets the heading of two node vectors
    void
    initializeArmorStand(double x, double y, double z)
    Initializes the armor stand with the correct settings for a balloon node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MultipartBalloonNode

      public MultipartBalloonNode(float x, float y, float z, float length, int index, MultipartBalloonType balloonType, org.bukkit.entity.Player balloonOwner, double maxNodeJointAngle, double yAxisInterpolation, double turningSplineInterpolation)
      Builder for creating lead segment.
      Parameters:
      x - X-axis position, type float
      y - Y-axis position, type float
      z - Z-axis position, type float
      length - Length of segment in blocks, type float
      index - Index number of segment, type int
      balloonType - Type of balloon, type net.jeqo.bloons.balloon.multipart.MultipartBalloonType
      balloonOwner - Owner of the balloon, type org.bukkit.entity.Player
    • MultipartBalloonNode

      public MultipartBalloonNode(MultipartBalloonNode parent, float length, int index, MultipartBalloonType balloonType, org.bukkit.entity.Player balloonOwner, double maxNodeJointAngle, double yAxisInterpolation, double turningSplineInterpolation)
      Builder for following segments.
      Parameters:
      parent - Leading segment, type net.jeqo.bloons.balloon.multipart.nodes.ModelNode
      length - Length of segment in blocks, type float
      index - Index number in the balloon, type int
  • Method Details

    • initializeArmorStand

      public void initializeArmorStand(double x, double y, double z)
      Initializes the armor stand with the correct settings for a balloon node.
      Parameters:
      x - X-axis position, type double
      y - Y-axis position, type double
      z - Z-axis position, type double
    • follow

      public void follow()
      Follows to the child's, also known as the previous nodes, point A location.
    • follow

      public void follow(float targetX, float targetY, float targetZ)
      Makes point A follow to the desired location.
      Parameters:
      targetX - Target X-axis, type float
      targetY - Target Y axis, type float
      targetZ - Target Z axis, type float
    • heading

      public float heading()
      Gets the heading of two node vectors
      Returns:
      The heading of the two node vectors, type float
    • calculateHeadPose

      public org.bukkit.util.EulerAngle calculateHeadPose(org.bukkit.util.Vector pointA, org.bukkit.util.Vector pointB)
      Calculates the head pose of the armor stand.
      Parameters:
      pointA - The first point, type org.bukkit.util.Vector
      pointB - The second point, type org.bukkit.util.Vector
      Returns:
      The Euler angle of the armor stand, type org.bukkit.util.EulerAngle
    • display

      public void display()
      Sets the correct position and item in the armor stand.
    • destroy

      public void destroy()
      Destroys the armor stand and removes it from the world