Skip to content

Commit

Permalink
Fixed forge block reach being too small
Browse files Browse the repository at this point in the history
  • Loading branch information
StewStrong committed Jan 1, 2024
1 parent 151ecf5 commit a8a4822
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ public interface MixinIForgePlayer {
@Shadow
Player self();

@Shadow
double getBlockReach();

/**
* Include ships in server-side distance check when player interacts with a block.
*/
@Overwrite(remap = false)
default boolean canReach(final BlockPos pos, final double padding) {
if (VSGameConfig.SERVER.getEnableInteractDistanceChecks()) {
final double reach = this.self().getEntityReach() + padding;
final double reach = this.getBlockReach() + padding;
final Vec3 eyes = this.self().getEyePosition();
return VSGameUtilsKt.squaredDistanceBetweenInclShips(this.self().level(),
pos.getX() + 0.5,
Expand Down

0 comments on commit a8a4822

Please sign in to comment.