Fixed shoot pattern overrides not working in mods
This commit is contained in:
@@ -35,7 +35,7 @@ public class ShootMulti extends ShootPattern{
|
|||||||
if(move != null) move.move(b);
|
if(move != null) move.move(b);
|
||||||
if(mover != null) mover.move(b);
|
if(mover != null) mover.move(b);
|
||||||
});
|
});
|
||||||
});
|
}, null);
|
||||||
}
|
}
|
||||||
}, barrelIncrementer);
|
}, barrelIncrementer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,14 +14,15 @@ public class ShootPattern implements Cloneable{
|
|||||||
|
|
||||||
/** Called on a single "trigger pull". This function should call the handler with any bullets that result. */
|
/** Called on a single "trigger pull". This function should call the handler with any bullets that result. */
|
||||||
public void shoot(int totalShots, BulletHandler handler, @Nullable Runnable barrelIncrementer){
|
public void shoot(int totalShots, BulletHandler handler, @Nullable Runnable barrelIncrementer){
|
||||||
for(int i = 0; i < shots; i++){
|
//the default implementation calls the "soft deprecated" variant for mod compatibility, so overrides from older mods can function properly
|
||||||
handler.shoot(0, 0, 0, firstShotDelay + shotDelay * i);
|
shoot(totalShots, handler);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called on a single "trigger pull". This function should call the handler with any bullets that result. */
|
/** Called on a single "trigger pull". This function should call the handler with any bullets that result. */
|
||||||
public void shoot(int totalShots, BulletHandler handler){
|
public void shoot(int totalShots, BulletHandler handler){
|
||||||
shoot(totalShots, handler, null);
|
for(int i = 0; i < shots; i++){
|
||||||
|
handler.shoot(0, 0, 0, firstShotDelay + shotDelay * i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Subclasses should override this to flip its sides. */
|
/** Subclasses should override this to flip its sides. */
|
||||||
|
|||||||
Reference in New Issue
Block a user