mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 09:09:08 +00:00
Fix IProjectile Events
Thank you @somehussar
This commit is contained in:
1 parent
782f21f1fe
commit
24d12e25a9
6 files changed
+57
-6
No files matched your search
@@ -262,6 +262,14 @@ public class EventHooks {
|
||||
script.run(EnumScriptType.PROJECTILE_TICK, event);
|
||||
}
|
||||
}
|
||||
|
||||
EntityLivingBase thrower = projectile.getThrower();
|
||||
if(thrower != null){
|
||||
if(thrower instanceof EntityNPCInterface){
|
||||
((EntityNPCInterface) thrower).script.callScript(EnumScriptType.PROJECTILE_TICK, event);
|
||||
}
|
||||
}
|
||||
|
||||
NpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
@@ -272,6 +280,14 @@ public class EventHooks {
|
||||
script.run(EnumScriptType.PROJECTILE_IMPACT, event);
|
||||
}
|
||||
}
|
||||
|
||||
EntityLivingBase thrower = projectile.getThrower();
|
||||
if(thrower != null){
|
||||
if(thrower instanceof EntityNPCInterface){
|
||||
((EntityNPCInterface) thrower).script.callScript(EnumScriptType.PROJECTILE_IMPACT, event);
|
||||
}
|
||||
}
|
||||
|
||||
NpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user