Skip to content

Commit

Permalink
Fix statistics for vehicles not working (#1744)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt authored Dec 6, 2024
1 parent adc8974 commit e59a37f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
this.send(ClientboundMoveVehiclePacket.fromEntity(entity));
return;
}
@@ -455,6 +_,7 @@
entity.setOnGroundWithMovement(p_9876_.onGround(), vec3);
entity.doCheckFallDamage(vec3.x, vec3.y, vec3.z, p_9876_.onGround());
this.player.checkMovementStatistics(vec3.x, vec3.y, vec3.z);
+ this.player.checkRidingStatistics(vec3.x, vec3.y, vec3.z); // Neo: check riding stats too as vanilla checks them in rideTick based on the assumption that Entity#rideTick will move the entity, which we break
this.clientVehicleIsFloating = d11 >= -0.03125
&& !flag1
&& !this.server.isFlightAllowed()
@@ -467,6 +_,23 @@
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/META-INF/accesstransformer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public net.minecraft.server.MinecraftServer$ReloadableResources <init>(Lnet/mine
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ServerChunkCache level # level
public net.minecraft.server.level.ServerLevel getEntities()Lnet/minecraft/world/level/entity/LevelEntityGetter; # getEntities
public net.minecraft.server.level.ServerPlayer checkRidingStatistics(DDD)V # checkRidingStatistics
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle <init>(Lnet/minecraft/world/phys/Vec3;F)V
public net.minecraft.server.packs.FilePackResources <init>(Lnet/minecraft/server/packs/PackLocationInfo;Lnet/minecraft/server/packs/FilePackResources$SharedZipFileAccess;Ljava/lang/String;)V # constructor
Expand Down

0 comments on commit e59a37f

Please sign in to comment.