44public class Projectile {
47 public static final int[]
MAGIC_DELAYS = { 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
50 public static final int[]
RANGED_DELAYS = { 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4 };
55 private int startHeight;
56 private int endHeight;
62 public Projectile(
int id,
int delay,
int duration,
int startHeight,
int endHeight,
int curve,
int distance,
int offsetX,
int offsetY) {
65 setDuration(duration);
66 setStartHeight(startHeight);
67 setEndHeight(endHeight);
69 setDistance(distance);
74 public Projectile(
int id,
int delay,
int duration,
int startHeight,
int endHeight,
int curve,
int distance) {
75 this(id, delay, duration, startHeight, endHeight, curve, distance, 0, 0);
78 public Projectile(
int id,
int delay,
int duration,
int startHeight,
int endHeight,
int curve) {
79 this(id, delay, duration, startHeight, endHeight, curve, 64);
82 public Projectile(
int id,
int delay,
int duration,
int startHeight,
int endHeight) {
83 this(id, delay, duration, startHeight, endHeight, 16);
86 public Projectile(
int id) {
87 this(id, 51, 68, 43, 31);
90 public void send(Mob source, Mob target) {
91 World.sendProjectile(source, target,
this);
94 public void send(Mob source, Position target) {
95 World.sendProjectile(source, target,
this);
102 public void setId(
int id) {
106 public int getDelay() {
110 public void setDelay(
int delay) {
114 public int getDuration() {
118 public void setDuration(
int duration) {
119 this.duration = duration;
122 public int getStartHeight() {
126 public void setStartHeight(
int startHeight) {
127 this.startHeight = startHeight;
130 public int getEndHeight() {
134 public void setEndHeight(
int endHeight) {
135 this.endHeight = endHeight;
138 public int getCurve() {
142 public void setCurve(
int curve) {
146 public int getDistance() {
150 public void setDistance(
int distance) {
151 this.distance = distance;
154 public int getOffsetX() {
158 public void setOffsetX(
int offsetX) {
159 this.offsetX = offsetX;
162 public int getOffsetY() {
166 public void setOffsetY(
int offsetY) {
167 this.offsetY = offsetY;
170 public Projectile copy() {
171 return new Projectile(
id, delay, duration, startHeight, endHeight, curve, distance, offsetX, offsetY);
174 public int getClientTicks() {
175 return getDuration();