Citizens2
Citizens2 copied to clipboard
Add vanilla knockback Control (PlayerVelocityEvent)
I confirm that I have ...
- [X] ...tried the latest Development Build to make sure my feature doesn't exist already.
- [X] ...checked the Wiki for any possible information about my feature.
- [X] ...checked other existing issues for my feature request.
Description
this should be added so you can make a proper 1.8 pvp bot implementation with Sentinel. its currently not possible to make a proper pvp bot implementation with Citizens and Sentinel because the kb is so scuffed! I would really appreciate it, thanks!
Code Example
No response
Yeah it would be cool to allow the bots to sprint for better knockback.
The EntityHuman class in 1.8 nms (not sure about other versions) has an attack method with conforms to any custom knockback settings if you have any and checks for the item in hand and accounts for attributes to calculate the damage for you
Controlling the knockback of giving an attack is easy... controlling the knockback of receiving an attack is weirdly difficult.
There is a default Knockback in sentinel, so there needs to be a kb Vector somewhere and I just need to control that...
The knockback received by a Sentinel NPC is applied by vanilla attack logic of the attacker. Sentinel's method of controlling it is to reset the NPC velocity 1 tick later, which sorta-mostly works but is sloppy and it does move for the 1 tick.
Added the event