mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 18:05:10 +00:00
Added IProjectile and its events.
This commit is contained in:
1 parent
19e14983aa
commit
46d668f44c
8 files changed
+192
-5
No files matched your search
@@ -0,0 +1,37 @@
|
||||
package noppes.npcs.scripted.event;
|
||||
|
||||
import noppes.npcs.api.entity.IProjectile;
|
||||
|
||||
public class ProjectileEvent extends CustomNPCsEvent {
|
||||
public IProjectile projectile;
|
||||
|
||||
public ProjectileEvent(IProjectile projectile) {
|
||||
this.projectile = projectile;
|
||||
}
|
||||
|
||||
/**
|
||||
* projectileTick
|
||||
*/
|
||||
public static class UpdateEvent extends ProjectileEvent {
|
||||
public UpdateEvent(IProjectile projectile) {
|
||||
super(projectile);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* projectileImpact
|
||||
*/
|
||||
public static class ImpactEvent extends ProjectileEvent {
|
||||
/**
|
||||
* 0:entity, 1:block
|
||||
*/
|
||||
public final int type;
|
||||
public final Object target;
|
||||
|
||||
public ImpactEvent(IProjectile projectile, int type, Object target) {
|
||||
super(projectile);
|
||||
this.type = type;
|
||||
this.target = target;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user