AlexiyOrlov / k-turrets

GNU General Public License v2.0
2 stars 5 forks source link

Turrets don't attack players on 1.16.5 #34

Open AlexiyOrlov opened 4 months ago

AlexiyOrlov commented 4 months ago

I need someone to help me fix this issue

Kaleidio commented 1 month ago

https://github.com/AlexiyOrlov/k-turrets/blob/d0f8286da8944627818afd7ac3325f45d6a5f8d9/src/main/java/dev/buildtool/kturrets/Turret.java#L88

Pretty sure the forge registry for this is at fault, for the lambda you are using is more than likely filtering out player entities.

I recommend just manually shoving players in after you've pulled that data, because you already expose a separate control for "targeting alien players" anyway, so really, people using turrets should not be expected to add minecraft:players to the list.

It should also be safe to just add the EntityType of player to that list by default anyway, since no mods ever change that id.

AlexiyOrlov commented 1 month ago

No, turns out it was a silly mistake in the code that caused inability to set turrets to target players. Fixed

Kaleidio commented 1 month ago

Definitely not fixed. My alt, CraftingGradius, cannot be attacked by this turret, made by KaleidioPlays, after I set it to defend from alien players, and reset its target list to all entities.

And yes, I did update to 0.1.34 2024-08-28_00 22 09

Kaleidio commented 1 month ago

I highly suggest reopening this issue and taking another look, as it is still definitely not fixed, no matter my testing.

I also suggest your testing include running a dedicated server (not opening to LAN) and use an alternate account.

AlexiyOrlov commented 1 month ago

The problem is it works for me

Kaleidio commented 1 month ago

I understand that, but I assure you, it's definitely not working. If you need, I will open a new issue for it and send video footage of the problem persisting.