mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 19:54:26 +00:00
Implemented global Forge events. Reorganized NPC API files.
This commit is contained in:
1 parent
c5ed7497c8
commit
72f2c3c60a
72 files changed
+321
-395
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package noppes.npcs.scripted.event;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.scripted.entity.ScriptLivingBase;
|
||||
|
||||
public class ScriptEventTarget extends ScriptEvent{
|
||||
|
||||
private ScriptLivingBase target;
|
||||
|
||||
public ScriptEventTarget(EntityLivingBase target){
|
||||
if(target != null)
|
||||
this.target = (ScriptLivingBase)ScriptController.Instance.getScriptForEntity(target);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return The source of the damage
|
||||
*/
|
||||
public ScriptLivingBase getTarget(){
|
||||
return target;
|
||||
}
|
||||
|
||||
public void setTarget(ScriptLivingBase target){
|
||||
this.target = target;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user