Open yutaoz opened 3 months ago
The updates span multiple files focusing on enhancing features, improving compatibility, and upgrading dependencies. New functionalities include viewing all or specific NBT fields for items and adjusting the AutoSwordHack
to support the MaceItem
. Build scripts and workflows have updated options and dependencies to ensure smooth integration and operation.
Files | Change Summary |
---|---|
src/.../ViewNbtCmd.java |
Enhanced to support new commands for viewing all or specific NBT fields. |
src/.../AutoSwordHack.java |
Added support for MaceItem in the getValue method. |
.github/workflows/gradle.yml |
Updated Gradle build command options to include --stacktrace and --warning-mode=fail . |
build.gradle |
Updated dependency versions for github-api and fabric-loom plugin. |
gradle.properties |
Updated versions for yarn_mappings and fabric_version . |
gradle/wrapper/gradle-wrapper.properties |
Changed distributionUrl from gradle-8.7 to gradle-8.8 . |
gradlew.bat |
Added a newline character at the end of the file after the label :omega . |
sequenceDiagram
participant User
participant ViewNbtCmd
participant NBTData
User->>ViewNbtCmd: .viewnbt all
ViewNbtCmd->>NBTData: Fetch all NBT fields
NBTData-->>ViewNbtCmd: All NBT fields
ViewNbtCmd-->>User: Display all NBT fields
User->>ViewNbtCmd: .viewnbt field <FIELD>
ViewNbtCmd->>NBTData: Fetch specific NBT field
NBTData-->>ViewNbtCmd: Specific NBT field
ViewNbtCmd-->>User: Display specific NBT field
sequenceDiagram
participant AutoSwordHack
participant ItemStack
participant MaceItem
AutoSwordHack->>ItemStack: Analyze item
ItemStack-->>AutoSwordHack: Item details
AutoSwordHack->>MaceItem: Check if instance of MaceItem
MaceItem-->>AutoSwordHack: MaceItem details
AutoSwordHack-->>AutoSwordHack: Calculate bonus attack damage
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
i had to switch the original switch structure to a messier if-else to do the argument checking for the field command, and i could not find a way to ideally convert the field argument to a component type to take advantage of the component map, maybe there is a cleaner way to do this?
Description
Viewnbt currently only shows custom_data fields and not certain nbt fields that people might want to see. Added .viewnbt all and .viewnbt field commands to see all nbt keys and specific nbt values instead of just custom_data fields.
Related: https://github.com/Wurst-Imperium/Wurst7/issues/1020
Testing
References
Demo: https://www.youtube.com/watch?v=kCzJMYJRHY0