Skip to content

Commit c7e2a66

Browse files
committed
patch: only calculate server-side interactions for attacks
For right-clicks, it's better to use the entity the client requested.
1 parent 79b060b commit c7e2a66

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Spigot-Server-Patches/0235-Extend-hit-recalculation-to-intangible-entities.patch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ index 1aa0d226..b6c35462 100644
2121
if (entity != null) {
2222
- // KigPaper start - allow hitting the vehicle when hitboxes collide / allow the player to hit others if they are being ridden by something
2323
+ // KigPaper start - recalculate hit when hitboxes collide
24-
if(PaperSpigotConfig.betterVehicleHitboxes) {
24+
- if(PaperSpigotConfig.betterVehicleHitboxes) {
25+
+ if (PaperSpigotConfig.betterVehicleHitboxes && packetplayinuseentity.a() == PacketPlayInUseEntity.EnumEntityUseAction.ATTACK) {
2526
- if (entity instanceof EntityPlayer && entity.vehicle != null && !((EntityPlayer) entity).collidesWithEntities) {
2627
+ Predicate<? super Entity> recalcHitPredicate = null;
2728
+ if (entity == player.passenger) {

0 commit comments

Comments
 (0)