Skip to content

Bug: Girder strut and cable girder strut can be targeted and broken through solid blocks #138

Description

@Jerrycyx

Describe the bug
In Minecraft 1.21.1 with NeoForge and bits'n'bobs version 2.1.13 beta, girder strut and cable girder strut segments can be selected and destroyed through solid blocks. When a solid block completely obstructs the line of sight between the player and a girder/cable segment, aiming at the visible block face will instead highlight the strut behind it. Mining the block then breaks the strut through the wall, ignoring the intervening block.

To Reproduce
Steps to reproduce the behavior:

  1. Place two girder strut (or cable girder strut) endpoints a few blocks apart, creating a visible strut segment between them.
  2. Place a solid block (e.g., stone, dirt) directly in front of the player, between the player and the strut segment, so the strut is completely hidden by the block.
  3. Look at the visible face of the obstructing block and try to aim at it.
  4. Observe that the block selection outline does not appear; instead the girder strut behind is highlighted, and mining the block actually destroys the girder strut through the wall.

Expected behavior
The block that is directly in front and obstructing the view should be targeted and broken normally. The girder strut should only be selectable when there is a clear line of sight with no solid blocks between the player and the strut. The hitbox/selection of the girder strut should not penetrate through blocks.

Latest.log, screenshots and crash log

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions