GithubHelp home page GithubHelp logo

apricotfarmer11 / legacy-lwjgl3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zarzelcow/legacy-lwjgl3

0.0 0.0 0.0 293 KB

A legacy-fabric mod that makes minecraft versions older than 1.13 run using LWJGL 3 instead of the legacy LWJGL 2

License: GNU Lesser General Public License v2.1

Java 97.79% Kotlin 2.21%

legacy-lwjgl3's Introduction

legacy-lwjgl3

A hacky over-engineered project that runs LWJGL3 on legacy-fabric minecraft versions (current only tested 1.8.9), Allowing you to use modern LWJGL features and libraries on older minecraft versions.

Table of Contents

Credits

A whole lot of this code is just code from the original LWJGL 2 project modified to work with LWJGL 3, Thanks so much to the LWJGL devs for making their license so permissive.

and a big thanks to gudenau for the original F*rge mod https://github.com/gudenau/MC-LWJGL3 that did the same thing, thanks as a big portion of this code is from that project.

Usage

Dev Environments

First head over to https://jitpack.io/#Zarzelcow/legacy-lwjgl3 and select the latest version in commits

then add this to your build.gradle replacing %VERSION% with the version of your choosing

โฏ build.gradle

import org.gradle.internal.os.OperatingSystem

project.ext.lwjglVersion = "3.3.1"

switch (OperatingSystem.current()) {
    case OperatingSystem.LINUX:
        project.ext.lwjglNatives = "natives-linux"
        break
    case OperatingSystem.WINDOWS:
        project.ext.lwjglNatives = "natives-windows"
        break
}

repositories {
   maven { url 'https://jitpack.io' }
}

dependencies {
    modImplementation "com.github.Zarzelcow:legacy-lwjgl3:%VERSION%"
    implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")

    runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
    runtimeOnly "org.lwjgl:lwjgl-assimp::$lwjglNatives"
    runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
    runtimeOnly "org.lwjgl:lwjgl-openal::$lwjglNatives"
    runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
    runtimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives"
}

configurations.all {
    // Removes LWJGL2 dependencies
    exclude group: "org.lwjgl.lwjgl"
}

Clients

Shaded builds are not currently published, so you will have to build them yourself.

TLDR: ./gradlew remapShadowJar then add build/libs/*-all-remapped.jar to your mods, done


Longer version: in the directory containing the file build.gradle run the command ./gradlew remapShadowJar

this will create 2 new files in the folder build/libs, add the file ending with -all-remapped.jar to your list of mods and run the game

Performance Increases?

While increasing performance was not the main point you do very much do see a benefit from LWJGl 3's quite substantial performance increase, resulting in a bump of about 20 fps (for me) even while having to emulate a lot of lwjgl 2 code that got removed.

results
The settings used

JDK: temurin-17 (Adopt OpenJDK Hotspot 17)
JVM Options:
  -client
  -server
mods:
  - fabricloader 0.13.3,
  - java 17,
  - minecraft 1.8.9
World seed: 123
Options changed from default:
  - Map FPS: unlimited
  - Use VBOS: true
  - VSync: Disabled

Contributing

This project is a work in progress, if you have any suggestions or want to contribute feel free to open an issue or pull request
Seriously please I suck at code quality and need people to help me
Really i w ill accept it im begging you my code quality is so bad ๐Ÿ˜ญtiny potato

legacy-lwjgl3's People

Contributors

zarzelcow avatar makai410 avatar apricotfarmer11 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.