Added IProjectile and its events.

This commit is contained in:
Luis C.M committed 2023-03-16 02:51:40 -05:00
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;
}
}
}