Skip to content

fix(agent): restore in-air block placement for drones (NEW-123)#56

Open
ximaks00-hue wants to merge 1 commit into
akki697222:dev-MC1.20from
ximaks00-hue:fix/new-123-agent-place-in-air
Open

fix(agent): restore in-air block placement for drones (NEW-123)#56
ximaks00-hue wants to merge 1 commit into
akki697222:dev-MC1.20from
ximaks00-hue:fix/new-123-agent-place-in-air

Conversation

@ximaks00-hue

Copy link
Copy Markdown
Contributor

Summary

  • Fixes CRITICAL parity bug NEW-123: drone angel placement (agent.place() in open air) was dead code after the 1.12→1.20 port.

Root cause

Original rayTraceBlocks returned null on a clear line of sight. MC 1.20 clip() always returns a HitResult with Type.MISS. The in-air branch matched Option(None), which is never produced.

Fix

Match HitResult.Type.MISS explicitly when canPlaceInAir is allowed, preserving replaceable-block and entity proximity guards from Original.

Test plan

  • Drone with angel upgrade places block in adjacent air
  • Robot block-on-solid placement unchanged

Made with Cursor

MC 1.12 rayTraceBlocks returned null on a clear line of sight; MC 1.20 clip() always returns a HitResult with Type.MISS instead. The angel-placement branch still matched Option(None), which is never produced, so drones could not place blocks in open air.

Match HitResult.Type.MISS explicitly, preserving the existing replaceable-block guard and entity proximity check from Original.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants