Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing knockback with one-shot feature #85

Open
SpinKnight opened this issue Mar 18, 2021 · 35 comments
Open

Fixing knockback with one-shot feature #85

SpinKnight opened this issue Mar 18, 2021 · 35 comments
Assignees
Labels
✔️ Confirmed Confirmed bugs that can be replicated 💡 No known solution There's currently no known solution for the bug/feature.

Comments

@SpinKnight
Copy link

SpinKnight commented Mar 18, 2021

The one-shot feature has been very nice. But it would be lovely to see a fix for the mobs taking knockback, if you hit them too fast.

A potential fix would be waiting 1 tick, then setting their velocity to 0:
https://bukkit.org/threads/remove-knock-back.145054/

Issue:
https://gyazo.com/084cba0b6a038943cfe643daec429076

@OmerBenGera
Copy link
Member

Latest dev build already fixes it, and if it doesn't - then it might be an issue with the spigot jar you're using.
Setting the velocity to 0 isn't really a good fix.

@OmerBenGera OmerBenGera added ❌ Unconfirmed Bugs that were reported but yet to be replicatable Needs investigation labels Mar 18, 2021
@OmerBenGera OmerBenGera self-assigned this Mar 18, 2021
@YouSeeMeRunning2
Copy link

I've tested the latest developer build with tunity 1.16 and I didn't see any change

@SpinKnight
Copy link
Author

I've tested the latest developer build with tunity 1.16 and I didn't see any change

Same. The clip in the video was on the latest dev build and with regular paper 1.8.8.

@SpinKnight
Copy link
Author

SpinKnight commented Mar 19, 2021

Latest dev build already fixes it, and if it doesn't - then it might be an issue with the spigot jar you're using.
Setting the velocity to 0 isn't really a good fix.

Fair enough, if you don't think it's a "good fix". Is it because of performance?
Anyway, there is a fix for it, clearly, so it would be lovely to get this problem fixed.

@OmerBenGera
Copy link
Member

Send me your entire config file please, so I can try and replicate the issue.

@SpinKnight
Copy link
Author

Keep in mind, it's if you hit "too fast". So try and click like a decent 8+ CPS to replicate it.

WildStacker.zip

@OmerBenGera
Copy link
Member

Upload the config contents to pastebin.

@YouSeeMeRunning2
Copy link

@SpinKnight
Copy link
Author

@OmerBenGera
Copy link
Member

https://pastebin.com/gX8rggJx

You have one shot disabled, therefore 50%+ of the hits don't kill the entities, therefore they take knockback.

https://pastebin.com/s3H0s27b

Gonna check the issue on 1.8 using your config

@OmerBenGera
Copy link
Member

@SpinKnight Seems to only occurred when killing fast enough, therefore I implemented the velocity patch.
Let me know if fixes the issue for you as well :)

@OmerBenGera OmerBenGera added 🔧 Potential fix A potential fix was already submitted and removed Lacks information labels Mar 19, 2021
@SpinKnight
Copy link
Author

@SpinKnight Seems to only occurred when killing fast enough, therefore I implemented the velocity patch.
Let me know if fixes the issue for you as well :)

Thanks. Will test now and let you know.

@SpinKnight
Copy link
Author

It does not seem to work as intended with just WildStacker. Although when implementing my own listener that does the following:
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> event.getEntity().setVelocity(new Vector()),1L); in the EntityDamageEvent, it seems to work just fine.

WildStacker 3.5.1 b92:
https://gyazo.com/bc41d117158f469c1fa3021c010f101f

@OmerBenGera
Copy link
Member

It does not seem to work as intended with just WildStacker. Although when implementing my own listener that does the following:
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> event.getEntity().setVelocity(new Vector()),1L); in the EntityDamageEvent, it seems to work just fine.

WildStacker 3.5.1 b92:
https://gyazo.com/bc41d117158f469c1fa3021c010f101f

Already done that...

@SpinKnight
Copy link
Author

SpinKnight commented Mar 19, 2021

It does not seem to work as intended with just WildStacker. Although when implementing my own listener that does the following:
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> event.getEntity().setVelocity(new Vector()),1L); in the EntityDamageEvent, it seems to work just fine.
WildStacker 3.5.1 b92:
https://gyazo.com/bc41d117158f469c1fa3021c010f101f

Already done that...

Well no idea man. I can only give you my test results. Which is why I'm saying, if I do it myself, it does work -- because you told me you already implemented it, which seems odd.

@OmerBenGera
Copy link
Member

It does not seem to work as intended with just WildStacker. Although when implementing my own listener that does the following:
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> event.getEntity().setVelocity(new Vector()),1L); in the EntityDamageEvent, it seems to work just fine.
WildStacker 3.5.1 b92:
https://gyazo.com/bc41d117158f469c1fa3021c010f101f

Already done that...

Well no idea man. I can only give you my test results.

I will test it again, as for me the jar fixed the issue...

@OmerBenGera
Copy link
Member

Btw I am using an auto clicker so I can easily get 10cps, might be due to that

@SpinKnight
Copy link
Author

SpinKnight commented Mar 19, 2021

Btw I am using an auto clicker so I can easily get 10cps, might be due to that

I, too, was using an auto clicker in that clip. Getting around around 40-50 cps, but also tried with regular jitter-clicking (11 cps), where it also did not seem to work

@OmerBenGera
Copy link
Member

I will try to increase the delay, maybe it helps... idk
Btw, does it work for you if you listen to EntityDamageByEntityEvent?

@OmerBenGera
Copy link
Member

Btw, I cancel the event which in theory should already fix the knockback, I am not sure why it doesnt in first place...

@SpinKnight
Copy link
Author

Btw, does it work for you if you listen to EntityDamageByEntityEvent?

Yeah, it does.

@SpinKnight
Copy link
Author

Btw, I cancel the event which in theory should already fix the knockback, I am not sure why it doesnt in first place...

Idk. Perhaps since if it's if you do it too fast, maybe it's because you're hitting it before some properties are set or smth? No idea.

@SpinKnight
Copy link
Author

I did a little more testing. It seems to be a problem with TacoSpigot. Unless you plan on supporting Taco, I guess you can close this issue, since it works flawlessly on Spigot/Paper 1.8.8.

@OmerBenGera
Copy link
Member

I did a little more testing. It seems to be a problem with TacoSpigot. Unless you plan on supporting Taco, I guess you can close this issue, since it works flawlessly on Spigot/Paper 1.8.8.

Weird, I used taco for 1.8.8 lol

@SpinKnight
Copy link
Author

SpinKnight commented Mar 19, 2021

Huh, weird, works fine for me on Paper

@OmerBenGera
Copy link
Member

This whole situation is just weird.
However, because most of the 1.8.8 forks are based on Taco and not on Paper, I am keeping this opened until we find a fix

@SpinKnight
Copy link
Author

SpinKnight commented Mar 19, 2021

Alright. Sounds good. I also tested the above with no plugins, but WildStacker & Taco and it still seems to be an issue.

@OmerBenGera
Copy link
Member

Alright. Sounds good. I also tested the above with no plugins, but WildStacker & Taco and it still seems to be an issue.

Maybe increasing the delay to 2 or will fix the issue, who knows

@OmerBenGera
Copy link
Member

Try disabling corpses for a moment, I think it fixes the issue.

@SpinKnight
Copy link
Author

Same behaviour for me.

@OmerBenGera
Copy link
Member

Make sure you're not using build 93, but 92

@OmerBenGera
Copy link
Member

It seems to be something with how laggy the server is in my opinion.
When I see lag spikes, the mob has more chance to get knockback, but when the TPS is solid 20, it doesn't move at all

@SpinKnight
Copy link
Author

I did not even notice there was a build 93, so I'm still on 92. My TPS is also straight up 20.0

@OmerBenGera OmerBenGera added 💡 No known solution There's currently no known solution for the bug/feature. and removed 🔧 Potential fix A potential fix was already submitted labels Mar 19, 2021
@OmerBenGera
Copy link
Member

As of now, I am marking this issue with "No known solution", as I can't seem to find the cause for it.
I could replicate the issue, but I really don't know why it doesn't work..

@SpinKnight
Copy link
Author

Alright. Yeah, it's quite a weird issue.

@OmerBenGera OmerBenGera added ✔️ Confirmed Confirmed bugs that can be replicated and removed ❌ Unconfirmed Bugs that were reported but yet to be replicatable labels Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✔️ Confirmed Confirmed bugs that can be replicated 💡 No known solution There's currently no known solution for the bug/feature.
Projects
None yet
Development

No branches or pull requests

3 participants