Effects can be given to non-Living.php classes like: Items, Arrows, FallingSand and cause the Level to freeze
Only Living classes are actually _tickable_ by effects in vanilla (Mobs + Human)
tl;dr: entities are a confusing inconsistent mess. Same thing applies with attributes.
Shouldn't special arrows be able to have effects? or is it just the particles that follow them?
@jasonwynn10 no, tipped arrows have metadata for potion particles.
I don't know if this would be a valid fix but eh..
class Projectile extends Entity {
public function addEffect(Effect $effect){
throw new \Error("really...");
}
}
Or maybe just move the function from Entity to Living and everything will be alright.
Or maybe just move the function from Entity to Living and everything will be alright.
I think this is a valid fix, why check if the entity is living, just put it in the Living class and no extra checks need to be done.
Most helpful comment
I think this is a valid fix, why check if the entity is living, just put it in the Living class and no extra checks need to be done.