-
Bug
-
Resolution: Invalid
-
None
-
1.18.2, 22w16b
-
None
-
Confirmed
-
(Unassigned)
In GameRenderer#pick, creative players have their entity pick distance set to 6.0, which should allow them to interact with an entity up to 6 blocks away from their current location.
Before this, a block pick has already been done based on the current reach distance (5.0 for creative players).
Next, a check is made to see if the distance of the block hit is higher than the max entity reach distance. This check is presumably done to ensure that if a block is hit, than any entities hit must be closer than this block.
However, only a null check is done, and thus empty (failed) hit results will truncate the entity pick distance to the reach distance. This is fixed by checking if the hit result is empty.
Original Check:
if (this.minecraft.hitResult != null) {
Proposed:
if (this.minecraft.hitResult != null && this.minecraft.hitResult.getType() != Type.MISS) {
This change ensures that the proper creative player entity reach distance is used, regardless of the block reach distance.