Skip to content

Commit

Permalink
1.17+ compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
WindClan committed May 3, 2024
1 parent c0f47ab commit b6c0a31
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
3 changes: 1 addition & 2 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.20.6+build.1
loader_version=0.15.10

# Mod Properties
mod_version=0.1.1
mod_version=0.2.0
maven_group=com.notbronwyn.OldGL
archives_base_name=oldgl

Expand Down
7 changes: 7 additions & 0 deletions src/client/java/com/notbronwyn/OldGL/Config.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.notbronwyn.OldGL;

public class Config {
public static final int OGL_MAJOR = 3;
public static final int OGL_MINOR = 0;
public static final int OGL_PROFILE = 0;
}
7 changes: 4 additions & 3 deletions src/client/java/com/notbronwyn/OldGL/mixins/WindowMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.client.util.Window;
import org.spongepowered.asm.mixin.injection.At;
import static org.lwjgl.glfw.GLFW.*;
import static com.notbronwyn.OldGL.Config.*;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

Expand All @@ -16,8 +17,8 @@
public class WindowMixin {
@Inject(method = "<init>", at = @At(value = "INVOKE",remap = false, target = "org/lwjgl/glfw/GLFW.glfwWindowHint (II)V", shift = At.Shift.AFTER))
public void injected(CallbackInfo ci) {
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_OPENGL_PROFILE,0);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, OGL_MAJOR);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, OGL_MINOR);
glfwWindowHint(GLFW_OPENGL_PROFILE, OGL_PROFILE);
}
}
4 changes: 2 additions & 2 deletions src/client/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "oldgl",
"version": "0.1.1",
"version": "0.2.0",
"name": "OldGL",
"description": "Downgrades Minecraft's OpenGL",
"authors": [
Expand All @@ -19,7 +19,7 @@
],
"depends": {
"fabricloader": ">=0.15.10",
"minecraft": ">=1.20.5",
"minecraft": ">=1.17",
"java": ">=21"
}
}

0 comments on commit b6c0a31

Please sign in to comment.