mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 02:15:11 +00:00
Added hurt functions to ScriptLivingBase
This commit is contained in:
1 parent
6fcf566ef7
commit
1478841098
2 files changed
+20
No files matched your search
@@ -25,6 +25,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
@@ -201,6 +202,10 @@ public class WrapperNpcAPI extends NpcAPI {
|
||||
return new ScriptDamageSource(damagesource);
|
||||
}
|
||||
|
||||
public IDamageSource getIDamageSource(IEntity entity) {
|
||||
return new ScriptDamageSource(new EntityDamageSource(entity.getTypeName(),entity.getMCEntity()));
|
||||
}
|
||||
|
||||
public void executeCommand(IWorld world, String command) {
|
||||
//if(!world.getMCWorld().isRemote)
|
||||
NoppesUtilServer.runCommand(world.getMCWorld(), "API", command);
|
||||
|
||||
Reference in new issue
Block a user