Skip to content

Conversation

@Yves000
Copy link

@Yves000 Yves000 commented Jul 14, 2025

Summary

  • First-time support for Minecraft 1.8.9 with Forge
  • Complete rewrite from Mixin-based to Forge event system
  • Optimized performance and code structure
  • Specifically targets macOS CMD+Q compatibility issue

Key Changes

New Platform Support

  • Minecraft 1.8.9: Full compatibility with Forge 11.15.1.2318+
  • macOS Focus: Addresses CMD+Q application quit issue
  • Java 8: Updated build system for legacy version compatibility

Technical Improvements

  • Replaced Mixin framework with native Forge events
  • Implemented proper networking via PlayerController.windowClick()
  • Added reflection-based slot access with field caching
  • Enhanced error handling and comprehensive logging

Code Quality

  • Extracted constants for better maintainability
  • Split methods for single responsibility principle
  • Reduced code duplication and nesting complexity
  • Added extensive JavaDoc documentation

Test Plan

  • Build successfully with Java 8 and Gradle 2.14
  • Deploy to 1.8.9 test instance
  • Test CTRL+Q functionality in hotbar
  • Test CTRL+Q functionality in inventory containers
  • Verify Creative Mode exclusion works correctly
  • Confirm multiplayer compatibility

Breaking Changes

None - this is a new platform addition, not a replacement of existing functionality.

Yves000 added 2 commits July 14, 2025 07:28
- Complete rewrite from Mixin-based to Forge event system
- Add comprehensive JavaDoc documentation
- Implement proper CTRL+Q functionality for hotbar and inventory
- Fix version specification crash (removed invalid range syntax)
- Update build system to Gradle 2.14 for 1.8.9 compatibility
- Remove unnecessary dependencies and mixin framework
- Streamline README with focus on macOS CMD+Q issue
- Extract magic numbers into named constants
- Implement reflection field caching for better performance
- Split large methods into focused helper functions
- Add early returns to reduce nesting complexity
- Eliminate code duplication with shared windowClick method
- Remove unused initialization method
- Improve code readability and maintainability
@SB2DD SB2DD requested a review from Copilot July 15, 2025 01:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds first-time support for Minecraft 1.8.9 using Forge with a complete rewrite of the CTRL-Q mod from a Mixin-based to an event-based implementation.

  • Replaces all Mixin configuration and classes with a single CtrlQMod.java using Forge events
  • Updates build scripts for Java 8/Gradle 2.14 and macOS CMD+Q handling
  • Cleans up metadata (mcmod.info, README) and removes unused files (pack.mcmeta, old LICENSE)

Reviewed Changes

Copilot reviewed 15 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/resources/pack.mcmeta Removed unused asset pack metadata
src/main/resources/mcmod.info Updated mod metadata (modid, name, URLs, authors, credits)
src/main/resources/ctrlq-forge.mixins.json Removed obsolete Mixin configuration
All mixin Java files & CoreMod.java Deleted old Mixin-based bootstrap and transformer code
src/main/java/me/polishkrowa/ctrlq/CtrlQMod.java Added new Forge event–based implementation
settings.gradle Simplified root project name
gradlew.bat, gradlew, gradle-wrapper.properties Overhauled Gradle wrapper scripts and downgraded version
README.md Rewritten installation, usage, and technical documentation
LICENSE (root & resources) Removed existing license files
Comments suppressed due to low confidence (4)

README.md:41

  • [nitpick] Consider adding a migration or upgrade section to the README to guide users transitioning from the previous Mixin-based implementation to the new Forge event-based version.
MIT License

src/main/java/me/polishkrowa/ctrlq/CtrlQMod.java:293

  • There are no tests for the new CTRL+Q functionality; consider adding unit or integration tests for handleHotbarCtrlQ and handleInventoryCtrlQ to ensure future changes don't regress core behavior.
}

gradle/wrapper/gradle-wrapper.properties:3

  • You downgraded the Gradle wrapper from 6.8.3 to 2.14; ensure that all build scripts and plugins remain compatible with this older Gradle version or consider updating back to a more recent supported version.
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip

"mcversion": "1.8.9",
"url": "https://github.com/polishkrowa/Ctrl-Q",
"updateUrl": "",
"authorList": ["polishkrowa"],
Copy link

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

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

[nitpick] The author name in authorList is all lowercase; consider using proper capitalization (e.g., "PolishKrowa") for consistency and readability.

Suggested change
"authorList": ["polishkrowa"],
"authorList": ["PolishKrowa"],

Copilot uses AI. Check for mistakes.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Copy link

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

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

The DEFAULT_JVM_OPTS variable includes embedded quotes, which may lead to double-quoting issues when launching the JVM; consider removing the inner quotes or adjusting the quoting so the JVM options are passed correctly.

Copilot uses AI. Check for mistakes.
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.

1 participant