Class MultipartBalloonNode
java.lang.Object
net.jeqo.bloons.balloon.multipart.nodes.MultipartBalloonNode
Handles the movement and functionality of a single node, model, or armor stand in a multipart balloon
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe child node of the current nodeThe parent node of the current nodeThe front most point of the segment/nodeThe back most point of the segment/node -
Constructor Summary
ConstructorsConstructorDescriptionMultipartBalloonNode
(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 TypeMethodDescriptionorg.bukkit.util.EulerAngle
calculateHeadPose
(org.bukkit.util.Vector pointA, org.bukkit.util.Vector pointB) Calculates the head pose of the armor stand.void
destroy()
Destroys the armor stand and removes it from the worldvoid
display()
Sets the correct position and item in the armor stand.void
follow()
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
heading()
Gets the heading of two node vectorsvoid
initializeArmorStand
(double x, double y, double z) Initializes the armor stand with the correct settings for a balloon node.
-
Field Details
-
pointA
The front most point of the segment/node -
pointB
The back most point of the segment/node -
parent
The parent node of the current node -
child
The child node of the current node
-
-
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 floaty
- Y-axis position, type floatz
- Z-axis position, type floatlength
- Length of segment in blocks, type floatindex
- Index number of segment, type intballoonType
- Type of balloon, type net.jeqo.bloons.balloon.multipart.MultipartBalloonTypeballoonOwner
- 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.ModelNodelength
- Length of segment in blocks, type floatindex
- 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 doubley
- Y-axis position, type doublez
- 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 floattargetY
- Target Y axis, type floattargetZ
- 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.VectorpointB
- 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
-