Skip to content

Commit

Permalink
patch: only calculate server-side interactions for attacks
Browse files Browse the repository at this point in the history
For right-clicks, it's better to use the entity the client requested.
  • Loading branch information
roccodev committed Nov 8, 2024
1 parent 79b060b commit c7e2a66
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ index 1aa0d226..b6c35462 100644
if (entity != null) {
- // KigPaper start - allow hitting the vehicle when hitboxes collide / allow the player to hit others if they are being ridden by something
+ // KigPaper start - recalculate hit when hitboxes collide
if(PaperSpigotConfig.betterVehicleHitboxes) {
- if(PaperSpigotConfig.betterVehicleHitboxes) {
+ if (PaperSpigotConfig.betterVehicleHitboxes && packetplayinuseentity.a() == PacketPlayInUseEntity.EnumEntityUseAction.ATTACK) {
- if (entity instanceof EntityPlayer && entity.vehicle != null && !((EntityPlayer) entity).collidesWithEntities) {
+ Predicate<? super Entity> recalcHitPredicate = null;
+ if (entity == player.passenger) {
Expand Down

0 comments on commit c7e2a66

Please sign in to comment.