How to make Slimes invisible

Hello guys i need to make Slimes invisible but also keep them activ so i can hit them. If i offer the INVISIBLE key to true it dosn’t change anything if i use the Vanish key it disapears but also can’t get hit anymore

So the INVISABLE key is for something else I believe. As for VANISH, this stops the entity being renders on the client side and because the client doesn’t know its there, it can not send the packet for EntityHitEvent to be fired.

The only way I can think of getting the desired result you want is to set the slime as vanished and then listen for the InteractEvent with the root of a Player, then get the rayTracking and check if the ray tracking is within the area the vanished slime is, then damage the slime based on the players current weapon.

I could be (and do hope to be) wrong about the option above being the only way, and even could be wrong about the vanish thing. But this is a modified way I solved damage with a old plugin of mine (Entity Disguise - modified because I was attempting to deal with damage dealt to the entity the player was disguised as)

INVISIBLE is for armor stands. Keys in general are for dedicated NBT tags, with the exception of VANISH which simply stops sending any packets about that entity. If you want it to be invisible but still act like an entity, then apply the invisibility potion effect to it with no particles.

1 Like