Skip to content

Conversation

@Deftu
Copy link
Owner

@Deftu Deftu commented Dec 11, 2025

No description provided.

@Deftu Deftu requested a review from Copilot December 11, 2025 11:17
@Deftu Deftu self-assigned this Dec 11, 2025
@Deftu Deftu added the enhancement New feature or request label Dec 11, 2025
Copy link
Contributor

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

This pull request ports the OmniCore library to support Minecraft version 1.21.11 for both Fabric and NeoForge mod loaders. The port involves significant API changes in Minecraft 1.21.11, particularly around rendering, texture management, and UI handling.

  • Adds version-specific conditionals throughout the codebase to support 1.21.11 while maintaining backward compatibility
  • Updates texture and sampler management to accommodate API changes in the rendering system
  • Refactors resource reload listener logic to handle nullable data types and synchronization
  • Updates build configuration to include 1.21.11 versions and dependency management

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/testMod/kotlin/com/test/TestResourceListener.kt Adds debug logging for resource loading
src/main/kotlin/dev/deftu/omnicore/internal/world/DimensionInternals.kt Updates dimension type references for 1.21.11 using identifier() method
src/main/kotlin/dev/deftu/omnicore/internal/client/textures/WrappedGlTexture.kt Conditionally initializes modesDirty only for versions before 1.21.11
src/main/kotlin/dev/deftu/omnicore/internal/client/textures/TextureInternals.kt Throws UnsupportedOperationException for bindOnUnit in 1.21.11+
src/main/kotlin/dev/deftu/omnicore/internal/client/textures/HandleBackedTexture.kt Replaces texture filter methods with sampler cache for 1.21.11+
src/main/kotlin/dev/deftu/omnicore/internal/client/render/pipeline/RenderPassEncoderImpl.kt Updates texture binding to use RenderTypes.MOVING_BLOCK_SAMPLER in 1.21.11+
src/main/kotlin/dev/deftu/omnicore/internal/client/render/TextureAllocation.kt Conditionally applies texture filter for versions before 1.21.11
src/main/kotlin/dev/deftu/omnicore/internal/client/render/ImmediateGlyphDrawer.kt Updates glyph rendering with version-specific sampler binding
src/main/kotlin/dev/deftu/omnicore/api/resources/SimpleResourceReloadListener.kt Refactors reload logic to handle nullable data with Unit placeholder
src/main/kotlin/dev/deftu/omnicore/api/resources/ResourceReloadListener.kt Adds Fabric-specific method overrides for 1.21.11 using Identifier type
src/main/kotlin/dev/deftu/omnicore/api/client/screen/OmniScreen.kt Updates resize and getTitle methods for 1.21.11 API changes
src/main/kotlin/dev/deftu/omnicore/api/client/render/vertex/OmniVertexConsumer.kt Adds forceLineWidth method with default no-op implementation
src/main/kotlin/dev/deftu/omnicore/api/client/render/OmniTextRenderer.kt Adds version-specific parameter to prepareText call and fixes height calculation
src/main/kotlin/dev/deftu/omnicore/api/client/render/ImmediateScreenRenderer.kt Adds null check with exception for projection matrix buffer
src/main/kotlin/dev/deftu/omnicore/api/client/render/DrawModes.kt Conditionally excludes LINE_STRIP mode for 1.21.11+
src/main/kotlin/dev/deftu/omnicore/api/client/render/DrawMode.kt Deprecates LINE_STRIP mode and conditionally handles it
src/main/kotlin/dev/deftu/omnicore/api/client/options/utils.kt Adds non-null constraint to unwrap function generic type
src/main/kotlin/dev/deftu/omnicore/api/client/options/RenderMode.kt Adds CUSTOM graphics preset handling for 1.21.11
src/main/kotlin/dev/deftu/omnicore/api/client/options/OmniVideoSettings.kt Updates render mode retrieval to use graphicsPreset for 1.21.11+
src/main/kotlin/dev/deftu/omnicore/api/client/options/OmniSoundSettings.kt Updates music toast check to use MusicToastDisplayState for 1.21.11+
src/main/kotlin/dev/deftu/omnicore/api/client/network/OmniClientServers.kt Adds optional screen parameter to connectTo functions with default fallback
src/main/kotlin/dev/deftu/omnicore/api/client/chat/OmniClientChat.kt Fixes nullable subtitle handling with safe call chain
settings.gradle.kts Adds 1.21.11-neoforge and 1.21.11-fabric versions and updates multiversion-root plugin
root.gradle.kts Restructures version hierarchy with 1.21.11 as the new primary version
gradle/libs.versions.toml Updates textile library from 1.0.0-beta.9 to 1.0.0-beta.11
gradle.properties Increments dgt.minecraft.revision from 3 to 4
build.gradle.kts Disables mod-provided Javadoc and excludes Kotlin/JetBrains dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

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

Copilot reviewed 26 out of 27 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

src/main/kotlin/dev/deftu/omnicore/api/client/render/DrawMode.kt:44

  • The LINE_STRIP enum value is deprecated but still usable in all versions. However, in the vanilla property (line 31-44), when LINE_STRIP is used in MC >= 1.21.11, it will fall through to the else clause and call DrawModes.die(const) because GL11.GL_LINE_STRIP won't match any of the when branches. This will cause a runtime error if LINE_STRIP is used in version 1.21.11+. Consider either throwing a more descriptive error in the const property for LINE_STRIP when MC >= 1.21.11, or handling this case explicitly in the vanilla property.
    public val vanilla: VertexFormat.Mode
        get() {
            return when (const) {
                GL11.GL_LINES -> VertexFormat.Mode.LINES
                //#if MC < 1.21.11
                GL11.GL_LINE_STRIP -> VertexFormat.Mode.LINE_STRIP
                //#endif
                GL11.GL_TRIANGLES -> VertexFormat.Mode.TRIANGLES
                GL11.GL_TRIANGLE_STRIP -> VertexFormat.Mode.TRIANGLE_STRIP
                GL11.GL_TRIANGLE_FAN -> VertexFormat.Mode.TRIANGLE_FAN
                GL11.GL_QUADS -> VertexFormat.Mode.QUADS
                else -> DrawModes.die(const)
            }
        }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Deftu Deftu merged commit 7a69449 into main Dec 11, 2025
1 check passed
@LunasaVT
Copy link

This is a peak pull request

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.

3 participants