DREAMFIRE Docs ← Back to site
Loading...
Searching...
No Matches
ArmorStandAnimationFrameData.java
Go to the documentation of this file.
1/*
2 * MIT License
3 *
4 * Copyright (c) 2025 Dreamfire Studio
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24package com.dreamfirestudios.dreamcore.DreamArmorStand;
25
26import org.bukkit.util.EulerAngle;
27
36 private final EulerAngle headStart;
37 private final EulerAngle headEnd;
38 private final EulerAngle bodyStart;
39 private final EulerAngle bodyEnd;
40 private final EulerAngle leftArmStart;
41 private final EulerAngle leftArmEnd;
42 private final EulerAngle rightArmStart;
43 private final EulerAngle rightArmEnd;
44 private final EulerAngle leftLegStart;
45 private final EulerAngle leftLegEnd;
46 private final EulerAngle rightLegStart;
47 private final EulerAngle rightLegEnd;
48 private final long durationTicks;
49
69 public ArmorStandAnimationFrameData(long durationTicks,
70 EulerAngle headStart, EulerAngle headEnd,
71 EulerAngle bodyStart, EulerAngle bodyEnd,
72 EulerAngle leftArmStart, EulerAngle leftArmEnd,
73 EulerAngle rightArmStart, EulerAngle rightArmEnd,
74 EulerAngle leftLegStart, EulerAngle leftLegEnd,
75 EulerAngle rightLegStart, EulerAngle rightLegEnd) {
76 if (durationTicks <= 0)
77 throw new IllegalArgumentException("durationTicks must be > 0");
78 this.durationTicks = durationTicks;
79 this.headStart = headStart;
80 this.headEnd = headEnd;
81 this.bodyStart = bodyStart;
82 this.bodyEnd = bodyEnd;
83 this.leftArmStart = leftArmStart;
84 this.leftArmEnd = leftArmEnd;
85 this.rightArmStart = rightArmStart;
86 this.rightArmEnd = rightArmEnd;
87 this.leftLegStart = leftLegStart;
88 this.leftLegEnd = leftLegEnd;
89 this.rightLegStart = rightLegStart;
90 this.rightLegEnd = rightLegEnd;
91 }
92
96 public long getDurationTicks() {
97 return durationTicks;
98 }
99
101 public EulerAngle getHeadStart() { return headStart; }
102
104 public EulerAngle getHeadEnd() { return headEnd; }
105
107 public EulerAngle getBodyStart() { return bodyStart; }
108
110 public EulerAngle getBodyEnd() { return bodyEnd; }
111
113 public EulerAngle getLeftArmStart() { return leftArmStart; }
114
116 public EulerAngle getLeftArmEnd() { return leftArmEnd; }
117
119 public EulerAngle getRightArmStart() { return rightArmStart; }
120
122 public EulerAngle getRightArmEnd() { return rightArmEnd; }
123
125 public EulerAngle getLeftLegStart() { return leftLegStart; }
126
128 public EulerAngle getLeftLegEnd() { return leftLegEnd; }
129
131 public EulerAngle getRightLegStart() { return rightLegStart; }
132
134 public EulerAngle getRightLegEnd() { return rightLegEnd; }
135}
Represents a single animation frame for an armor stand, defining start and end angles for each body p...
ArmorStandAnimationFrameData(long durationTicks, EulerAngle headStart, EulerAngle headEnd, EulerAngle bodyStart, EulerAngle bodyEnd, EulerAngle leftArmStart, EulerAngle leftArmEnd, EulerAngle rightArmStart, EulerAngle rightArmEnd, EulerAngle leftLegStart, EulerAngle leftLegEnd, EulerAngle rightLegStart, EulerAngle rightLegEnd)
Constructs a new animation frame for an armor stand.