Entity Attack filtering doesn't work
tmanfoo1 opened this issue ยท 2 comments
Describe the bug
Entity attack filtering doesnt work
How to reproduce the bug
Expected behavior
this should attack everyting except for players. instead it attacks nothing
Additional details
No response
Which Minecraft version are you using?
1.18
Which version of PneumaticCraft: Repressurized are you using?
pneumaticcraft-repressurized-1.18.2-3.4.0-124.ja
Crash log
No response
Did a bit of testing with this, and I put this program together: https://pastebin.com/FsV2uY7Z
It does seem to work as expected, feel free to try it out. One counter-intuitive thing I noticed is if the entity attack blacklist isn't exactly right, the drone can get itself quite confused (it can end up targeting something that it can't attack and get locked up, because targeting AI and actual attack AI are two different objects internally and filtering works differently).
For example, if the blacklist is drone
and @player
, it'll get confused if there are any drones around because drone
doesn't actually work to blacklist named drones when acquiring targets (use @drone
to match any drone). So your drone will target some other drone but won't be able to attack it.
You're probably better off using a whitelist if possible to minimise confusion. I will do a bit more debugging on this though and see if I can make the behaviour more intuitive. It is a bit weird right now.