Skip to content

Conversation

@olehrstm
Copy link
Owner

No description provided.

@olehrstm olehrstm self-assigned this Oct 15, 2025
@olehrstm olehrstm merged commit 8c6cfbf into develop Oct 15, 2025
1 check passed
@olehrstm olehrstm deleted the feature/upgrade-to-1-21-10 branch October 15, 2025 18:04
@gemini-code-assist
Copy link

Summary of Changes

Hello @olehrstm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a comprehensive version upgrade for the project, primarily targeting Minecraft 1.21.10. It involves updating various core dependencies such as Fabric Loader, Fabric API, and Kotlin Loader to ensure full compatibility with the new Minecraft version. Additionally, the build system has been modernized with a Gradle wrapper upgrade, and specific code adaptations were made to align with changes in Minecraft's client-side APIs, particularly in how mouse events are processed.

Highlights

  • Minecraft Version Upgrade: The project has been updated to target Minecraft version 1.21.10, along with corresponding Yarn mappings.
  • Dependency Updates: Fabric Loader, Fabric API, and Kotlin Loader versions have all been bumped to their latest compatible releases for Minecraft 1.21.10.
  • Gradle Upgrade: The Gradle wrapper has been upgraded to version 9.1.0, and build.gradle.kts now includes explicit type casting for project properties.
  • API Adaptation: The ExtractPackScreen class has been updated to reflect changes in Minecraft's mouse event handling API, now utilizing the Click object.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@olehrstm olehrstm mentioned this pull request Oct 15, 2025
1 task
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the project dependencies to support Minecraft 1.21.10, including updates to Gradle, Fabric, and Kotlin versions. The changes in build.gradle.kts and gradle.properties are consistent with this goal. The update to ExtractPackScreen.kt adapts the mouseClicked method to a new signature from the Minecraft API. My review focuses on ensuring the logic remains correct after this API migration. I've found one potential issue regarding the order of operations in the updated mouseClicked method.

Comment on lines +148 to 161
override fun mouseClicked(click: Click?, doubled: Boolean): Boolean {
if (click == null) return super.mouseClicked(click, doubled)

if (extractionState.isExtracting.value) return true // block interaction while extracting

val hovered = listRenderer.getHoveredIndex(mouseX.toInt(), mouseY.toInt(), width, serverPackProfiles.size)
val hovered = listRenderer.getHoveredIndex(click.x.toInt(), click.y.toInt(), width, serverPackProfiles.size)
if (hovered in serverPackProfiles.indices) {
selectedIndex = hovered
updateButtonStates()
return true
}
return super.mouseClicked(mouseX, mouseY, button)

return super.mouseClicked(click, doubled)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The order of checks in mouseClicked has been changed, which could introduce a bug. The check for extractionState.isExtracting.value should be the first thing in the method to ensure that all interactions are blocked during extraction, which was the original behavior. With the current implementation, if click is null, the method will return false via super.mouseClicked even if an extraction is in progress, potentially allowing other UI elements to process the event.

Suggested change
override fun mouseClicked(click: Click?, doubled: Boolean): Boolean {
if (click == null) return super.mouseClicked(click, doubled)
if (extractionState.isExtracting.value) return true // block interaction while extracting
val hovered = listRenderer.getHoveredIndex(mouseX.toInt(), mouseY.toInt(), width, serverPackProfiles.size)
val hovered = listRenderer.getHoveredIndex(click.x.toInt(), click.y.toInt(), width, serverPackProfiles.size)
if (hovered in serverPackProfiles.indices) {
selectedIndex = hovered
updateButtonStates()
return true
}
return super.mouseClicked(mouseX, mouseY, button)
return super.mouseClicked(click, doubled)
}
override fun mouseClicked(click: Click?, doubled: Boolean): Boolean {
if (extractionState.isExtracting.value) return true // block interaction while extracting
if (click == null) return super.mouseClicked(click, doubled)
val hovered = listRenderer.getHoveredIndex(click.x.toInt(), click.y.toInt(), width, serverPackProfiles.size)
if (hovered in serverPackProfiles.indices) {
selectedIndex = hovered
updateButtonStates()
return true
}
return super.mouseClicked(click, doubled)
}

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