Mojira Archive
MC-79925

null hitResult when no entity or block is in focus while looking through blocks without the ray trace intersecting the blocks themselves

Game Output

[16:57:52] [Client thread/ERROR]: Null returned as 'hitResult', this shouldn't happen!
[16:57:52] [Client thread/WARN]: Null returned as 'hitResult', this shouldn't happen!

How to reproduce

  • Go to a wall which has at least 6 (+1 where you should stand) ladders below or above you
  • Click the mouse
  • Observe that the item in your hand is not swung, and that a warning is printed in the log

Affects all blocks that allow you to stand in them and punch without hitting them, including:

  • Ladders
  • Vines
  • Iron bars
  • Glass panes
  • Portal blocks
  • ...

Not restricted to only the vertical axis - can also happen when looking sideways.

Code analysis

Code analysis by Marcono1234 can be found in this comment.