function projectileHitEntityHook(projectile, targetEntity)
All functions that are targeted at targetEntity refuse to be executed. It gives me no error, but simply acts like the line doesn't exist(with one exception; there may be others that I have not found yet).
Entity.remove(targetEntity); -Nothing happens.
Entity.addEffect(targetEntity, int, int, int, boolean, boolean); -Error message:addEffect only works on mobs.
Entity.getUniqueId(targetEntity); -Same as clientMessage.
clientMessage(targetEntity); -Returns an int, presumably the entity id.
Entity.getNameTag(targetEntity); -Obviously nothing happens, it just gets the name, but after clientMessage'ing it, it returned null.
Entity.setHealth(targetEntity, int); -Nothing happens.
var varName=targetEntity; -When clientMessage'ing the varName, I get null.
Is this just for me, or does this happen on everyone's devices and this function just hasn't been used that much?
On a side note, for some reason arrows are not considered projectiles by this hook, and fails to pick them up. After a couple of hours, I decided to switch from arrows to snowballs for a cosmetic change. To my surprise, when testing it, the function's projectile variable only picks up snowballs and eggs. I might he missing something big like that with this.
I had to create my own entityHitProjectile hook, which is a lot more clunky than this one, and takes up a lot of space. If someonr can figure out how this thing works, please tell me. If its a bug, please tell me.
function projectileHitEntityHook(projectile, targetEntity)
All functions that are targeted at targetEntity refuse to be executed. It gives me no error, but simply acts like the line doesn't exist(with one exception; there may be others that I have not found yet).
Entity.remove(targetEntity); -Nothing happens.
Entity.addEffect(targetEntity, int, int, int, boolean, boolean); -Error message:addEffect only works on mobs.
Entity.getUniqueId(targetEntity); -Same as clientMessage.
clientMessage(targetEntity); -Returns an int, presumably the entity id.
Entity.getNameTag(targetEntity); -Obviously nothing happens, it just gets the name, but after clientMessage'ing it, it returned null.
Entity.setHealth(targetEntity, int); -Nothing happens.
var varName=targetEntity; -When clientMessage'ing the varName, I get null.
Is this just for me, or does this happen on everyone's devices and this function just hasn't been used that much?
On a side note, for some reason arrows are not considered projectiles by this hook, and fails to pick them up. After a couple of hours, I decided to switch from arrows to snowballs for a cosmetic change. To my surprise, when testing it, the function's projectile variable only picks up snowballs and eggs. I might he missing something big like that with this.
I had to create my own entityHitProjectile hook, which is a lot more clunky than this one, and takes up a lot of space. If someonr can figure out how this thing works, please tell me. If its a bug, please tell me.
I have nothing to say...