Skip to content

draw the offhand item in first person - #761

Merged
Purdze merged 4 commits into
masterfrom
offhand-first-person
Oct 25, 2026
Merged

Purdze merged 4 commits into
masterfrom
offhand-first-person

Conversation

@Purdze

@Purdze Purdze commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / code cleanup
  • Performance improvement
  • Chore / tooling
  • Documentation

summary

first person now draws the offhand item in the off arm, mirroring the main hand. the held item pipeline draws a list of hands, each with its side, swing and use animation; the arm, swing and eat transforms take invert like the game's, and the left hand uses firstperson_lefthand (falling back to the same model's right hand) with the left-hand mirror. the bare arm still draws only for an empty main hand, and an empty offhand draws nothing. second of three offhand prs, stacked on #760; the offhand's own swing and use animations come with two-hand use.

reference

net/minecraft/client/renderer/ItemInHandRenderer.java (submitHandsWithItems, submitArmWithItem, applyItemArmTransform, swingArm, applyEatTransform), ItemTransform.apply, ItemTransforms

testing

just client-pre-pr. new tests/ingame/player/offhand_hand.toml holds a totem in the offhand and stone in the main hand and screenshots both.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 24, 2026
@Purdze
Purdze added this pull request to stack #762 October 24, 2026 10:14
Base automatically changed from offhand-hud to master October 25, 2026 09:08
@Purdze
Purdze force-pushed the offhand-first-person branch from 53e4760 to 0f4322b Compare October 25, 2026 09:08
@Purdze
Purdze merged commit bb957ae into master Oct 25, 2026
15 checks passed
@Purdze
Purdze deleted the offhand-first-person branch October 25, 2026 10:53
@Purdze Purdze mentioned this pull request Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant