Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add XYZ Offsets and Tilt Controls for Held Item & Bare Hand
Summary
Adds full positional offset (X, Y, Z) and tilt (Pitch, Roll) controls for both the held item model and the bare hand (empty-handed arm) in first-person view. Item and arm transforms are now independent of each other. Also fixes a slider display bug where negative values were clamped to 0.10 on the track label, and fixes edit box truncation for values longer than 4 characters.
Changes
ItemTweaksConfig.javaHELD_ITEM_OFFSET_X/Y/Z— positional offsets for the held item (range -1.0 to 1.0)ITEM_TILT_PITCH/ITEM_TILT_ROLL— X and Z rotation for the held item (range -90 to 90°)ARM_OFFSET_X/Y/Z— separate positional offsets for the bare arm (range -1.0 to 1.0)ARM_TILT_PITCH/ARM_TILT_ROLL— X and Z rotation for the bare arm (range -90 to 90°)TILT_MIN,TILT_MAX,DEFAULT_TILTconstants andclampTilt()methodconfig/swing.jsonand reset via the Reset buttonItemInHandRendererMixin.javaAxis.XPandAxis.ZPfromcom.mojang.math.AxisItemInHandRendererArmMixin.javaHELD_ITEM_OFFSET_*to the new separateARM_OFFSET_*fieldsARM_TILT_PITCHandARM_TILT_ROLLrotations to bothrenderRightHandandrenderLeftHandAPPLY_HAND_SCALE(no effect while holding an item)SwingSettingsScreen.javaFloatSliderlabel rendering now usesMth.clamp(toFloat(), min, max)instead ofItemTweaksConfig.clamp(), so negative offset and tilt values display correctly on the trackmaxLengthincreased from 4 to 6 to accommodate values like-1.00and-45.00FloatSlidernow accepts explicitmin/maxso offset and tilt sliders use their own rangeTesting
./gradlew buildsucceeds with no errorsconfig/swing.jsonUI Changes