Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

Add vanilla knockback Control (PlayerVelocityEvent)

Open TrixxTraxx opened this issue 3 years ago • 5 comments

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

TrixxTraxx avatar May 29 '22 20:05 TrixxTraxx

Yeah it would be cool to allow the bots to sprint for better knockback.

LaserSlime avatar Jun 05 '22 17:06 LaserSlime

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

JeffLegendPower avatar Aug 11 '22 18:08 JeffLegendPower

Controlling the knockback of giving an attack is easy... controlling the knockback of receiving an attack is weirdly difficult.

mcmonkey4eva avatar Aug 11 '22 22:08 mcmonkey4eva

There is a default Knockback in sentinel, so there needs to be a kb Vector somewhere and I just need to control that...

TrixxTraxx avatar Aug 11 '22 22:08 TrixxTraxx

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.

mcmonkey4eva avatar Aug 11 '22 22:08 mcmonkey4eva

Added the event

fullwall avatar Nov 13 '22 15:11 fullwall