182 Commits
Author SHA1 Message Date
Andrey 6df8300fd1 Fix LogisticsPipes BCCompat with Lwjgl3ify (#199) 2025-02-06 15:28:17 -06:00
DownerCaseandRaven Szewczyk c4bfbd537b Set wayland app_id (#196)
Co-authored-by: Raven Szewczyk <[email protected]>
2025-01-13 21:22:12 +00:00
ah-OOG-ah 6eb89d2cbf Reduce buffer allocations (#190) 2024-12-01 20:40:03 +00:00
kstvr32andkstvr32 9c10c03961 add null check to mimic behavior of lwjgl2 (#173)
fix error type

Co-authored-by: kstvr32 <[email protected]>
2024-09-13 17:51:28 +00:00
JL2210 bff02960e6 Fix scaling on HiDPI screens with Wayland (#171)
* Fix scaling on HiDPI screens with Wayland

The game expects getWidth and getHeight to return framebuffer
coordinates rather than screen-space coordinates (as shown by the
calls to glViewport). This was broken on scaling factors greater
than 1 but also masked by GL_SCALE_FRAMEBUFFER.

Additionally, the game's mouse code *also* expects framebuffer
coordinates to be returned. This fixes that by converting to and
from screen-space during calls to mouse code.

Disable GLFW_COCOA_RETINA_FRAMEBUFFER for now, it seems to not
play nice on non-MacOS systems. At least for me it makes the title
screen larger than the window when playing in fullscreen

* add back hack for macOS

I think their framebuffer implementation is buggy? I don't really
want to touch this since I don't have a Mac to test on

I think their GPUs are weak anyways and probably can't handle
rendering GTNH at 260 DPI or whatever Retina does

* Fix getPixelScaleFactor

Previous implementation was broken on hidpi platforms where the
size of the framebuffer and the size of the window correlate 1:1.
This manifested in the mouse code thinking the mouse was in a
different location than it actually was.

New implementation explicitly calculates the ratio between the
framebuffer size and the window size, rather than relying on
glfwGetWindowContentScale.

Remove GLFW_SCALE_FRAMEBUFFER/GLFW_COCOA_RETINA_FRAMEBUFFER,
it appears that it is not needed.

* fucking spotless
2024-09-13 17:36:14 +01:00
JL2210 86d9a76ae3 Better mixin infrastructure (#168)
* Better mixin infrastructure

* stiching -> stitching

* rework fastcraft compat
2024-08-04 09:22:39 +01:00
SKProCHandRaven Szewczyk 0e16c68235 Add borderless fullscreen, make fullscreen choose the appropriate monitor (#162)
* Add borderless fullscreen, make fullscreen choose the appropriate monitor

* Replace wildcard imports

---------

Co-authored-by: Raven Szewczyk <[email protected]>
2024-07-27 09:24:59 +00:00
Gravit c96a1f183c Make Sys.getClipboard() static. (#167) 2024-07-27 10:14:29 +01:00
Lily Autumn d1fe9ffc0f makeWritable private -> public (#163)
Fixes a rare crash with ASJCore
2024-07-12 07:43:11 +01:00
Raven Szewczyk 5b22a60984 Fix infinite loop in forge if patch parsing fails, fix compat with upgraded apache-compress 2024-06-30 10:10:44 +01:00
Raven Szewczyk 42dc98a743 Hotswap RFB transformer support 2024-06-30 09:36:23 +01:00
Raven Szewczyk cadb8f61e2 Start the game centered (toggleable in config)
Closes #151
2024-06-30 09:28:49 +01:00
Thorium0 f48c01bd9f Moved updateRawMouseMode to be called after displayCreated has been set to true. (#158) 2024-06-19 18:30:21 +01:00
Raven Szewczyk 93c5babdef Add more JAXB exclusions to fix asm crashes with some mods 2024-05-12 18:57:04 +01:00
Raven Szewczyk d239a21b05 Nullify old keybind ticking too 2024-05-12 14:15:02 +01:00
Raven Szewczyk 561d5fdf7a Add missing onTick action for keybind presses 2024-05-12 14:09:33 +01:00
Raven Szewczyk 047bed47c2 Move jakarta.xml.bind to the patches jar and add a CL exclusion for it 2024-05-12 13:55:51 +01:00
Raven Szewczyk d8ee738696 Add EFR banners to extensible enums list 2024-04-28 07:37:34 +01:00
Andrey RatnikovandRaven Szewczyk 3e1b8a30c3 Add more default LOTR mod ExtensibleEnums (#140)
* Update EarlyConfig.java

Add LOTR Enums

* spotlessApply

* Separate the lotr addons section in enum list

---------

Co-authored-by: Raven Szewczyk <[email protected]>
2024-04-28 06:29:58 +00:00
Lily Autumn 107e4acf9e add LOTRFaction to earlyconfig (#139)
* add LOTRFaction to earlyconfig

* i hate spotless
2024-04-22 07:15:47 +00:00
Raven Szewczyk c7bc58feb8 Save downloaded libraries to .tmp, then rename once successful to avoid creating broken jars on errors 2024-04-14 13:33:00 +01:00
Raven Szewczyk a62c401665 Fix EarlyConfig loading in two classloaders by forcing it into RFB-System
Closes #136
2024-04-14 13:26:41 +01:00
Raven Szewczyk b59bdfad68 Fix broken keybinds 2024-04-06 12:59:21 +01:00
Raven Szewczyk fdfc54e7ad Add a raw mouse input mode toggle 2024-04-06 10:56:56 +01:00
Raven Szewczyk 1e0a33c448 Disable LCL for lwjgl(x), if you need to transform them you can use the RFB api or reflection.
Closes #133
2024-04-06 10:39:49 +01:00
Raven Szewczyk 6fe3cbef4c Relauncher: hide the "do not show on future launches" option for now 2024-04-06 10:32:36 +01:00
Raven Szewczyk 7d4e9ad9ad Relauncher: do not use disable-atfiles for wider compatibility 2024-04-06 10:25:35 +01:00
Raven Szewczyk 6769363d96 Use RetroFuturaBootstrap instead of LaunchWrapper, significant compatibility improvements (#113)
* Start work on RFB bundling/support

* Use the first RFB release

* Upgrade GSON, RFB, migrate lwjglx redirector to an rfb plugin

* Update rfb again

* Update to RFB 0.3 APIs

* Migrate LCL transformers to RFB

* Update release workflow

* Fix server main class name

* Update RFB with the server fix

* Forgot Spotless...

* Fix maven publishing of snapshots

* Prism: Use included forgePatches jar instead of downloading from Nexus

* Fix crash when config/ doesn't already exist

* Change server entry point to a custom class, remove SLW forge patch.

* Move ASM upgrade to a batch transformer in RFB

* Bump RFB

* Update Apache Commons Compress

* Start work on the relauncher coremod

* Update bs&rfb

* Fix latest GTNHGradle compat

* Update dep versions

* Kotlinify buildscript

* Fix some more kts bugs, make it easier to run with GT

* Fix coremod not loading

* Fix remaining LCL.getSources issues that caused e.g. broken NEI handlers

* RIP forge patches, you won't be missed

* Start on parsing version.json in the relauncher

* WIP library downloader

* Skip downloading existing files, exit without tripping the SecurityManager

* Add missing relauncher libraries, fix jvm arg order

* Fix lwjgl3ify not loading itself as a mod, not downloading the main client jar

* Progress bar dialog for library downloads

* Start work on relauncher guis

* Working java detection and selection on Linux

* Fix use of some library functions not present in a lwjgl3ify-less instance

* Include the ServerMain class in the forgepatches jar

* Relauncher stub + graphical console for the new instance

* Add a fallback $VALUES search loop

* Switch from Rhino to Nashorn for JS

* Update rfb and apache commons-lang3

* Fix ItemStackHolder setting, simplify both object holders

Closes #93

* Add missing lwjgl.util subpackages

Closes #92

* Bump RFB with more asm fixes

Closes #37

* Update RFB with the dragonapi fix

* Exclude nashorn from LCL to avoid coremods complaining about it

* Add proxy lwjglx calls to lwjgl dummy Keyboard/Mouse classes for reflection

* Add InputEvents API, handle Minecraft keybindings with it to fix dead key support

* Update RFB

* Fix some warnings

* Add OSX and Windows JVM installation scanning

* Start work on translatable strings in the relauncher GUI

* Spotless, fix being able to walk with inventory screen open

Closes #123

* Update rfb with the java.lang.Compiler fix

* Finish rest of gui translations, allow any whitespace to split args, assign very little ram to the bootstrapper process

* Add a manifest attribute to more conveniently opt-out of lwjgl3ify transformers

* Update RFB, commons-compress, shade in newer commons-io too

* Remove the server jar name from java9argx.txt

* Update RFB with the #127 fix

* Add LiteLoader compatibility, tested with Voxelmap

Closes #67

* GL tweaks: move glGetString safety check into bindings, fix GL debug log notification spam

* Implement custom OpenGL context version&profile settings via the LWJGL2 Display API

* Simple sharedDrawable implementation

* Downgrade the servlet api to fix journeymap's new webmap crash

* Add sun.awt opens

* README updates

* RFB 1.0.0 (no changes from 0.4.1)
2024-03-11 21:09:38 +00:00
Kam 2229295b9f Add Config Toggle to Enable / Disable HRTF Bools in OpenAl (#119)
* Add Config Toggle to Enable / Disable HRTF Bools in OpenAl

* Import from Config without Static Import
2024-02-07 21:24:03 +00:00
Kam 7fff831dfb Add Enum Map to keep track of all Enum Names associated with their Enum Classes (#118)
- $1, $2, $3, $4.... and so on will be appended to the Enum Name until the Duplication clause is satisfied.

Closes #115
2024-02-07 17:36:26 +00:00
Raven Szewczyk 786d3c4c8b Fix null safety in AL.destroy 2024-01-20 18:35:53 +00:00
Raven Szewczykandkappa_maintainer c95fa5f315 Set OpenAL EFX max aux sends to 4 (#111)
Co-Authored-By: kappa_maintainer <[email protected]>
2024-01-20 09:36:15 +00:00
Raven Szewczyk 3c03c17404 Fix missing key index mappings (#110)
* Fix missing key index->name mappings at runtime

* Update dependencies

* Keyboard init goes into ClientProxy

* Spotless
2024-01-20 09:27:09 +00:00
Raven Szewczyk b4b733ceb2 Fix handling of null device/context in ALC bindings (#108)
Closes #100
2024-01-11 22:18:54 +00:00
Raven Szewczyk 8e5ce1ec21 Fix handling of Ctrl+Alt vs AltGr on Windows (#107)
Closes #91
2024-01-11 22:06:51 +00:00
Raven Szewczyk f67c0091c0 Remove the need for lwjgl package transformer exclusions (#106)
* Remove the need for lwjgl package transformer exclusions

* fix derp
2024-01-07 20:06:19 +00:00
Raven Szewczyk 7bd0ab589d Fix key name display on non-QWERTY keyboard layouts (#105)
Closes #103
2024-01-05 21:13:44 +00:00
makamys d79565c56f Disable STB stitching if FC 1.23 is present even with OF (#97)
(cc https://github.com/GTNewHorizons/lwjgl3ify/issues/47)
2023-11-29 21:15:24 +00:00
Katherine ecdd15f325 Fix for horizontal scrolling (#96)
* Account for horizontal mouse wheel scrolling

Display$Window#scrollCallback: when the vertical scrolling offset (yoffset) is 0, pass the horizontal scrolling offset (xoffset) to Mouse#addWheelEvent instead

Fixes #90

Signed-off-by: unilock <[email protected]>

* Allow inverting horizontal scrolling via config

Respects "invertScrollWheel", in that horizontal scrolling will be double-inverted if both config options are enabled. (thus: not inverted)

Disabled by default.

(Technically, when horizontal scrolling was fixed in Minecraft 1.20.2, it was made to be inverted by default.)

(However, all mods that implemented the same fix before Mojang did (EmuNO, MacOS Input Fixes, McMouser, etc.) do *not* invert horizontal scrolling by default - LWJGL3ify follows this standard.)

Signed-off-by: unilock <[email protected]>

* SPOTLESS...

Signed-off-by: unilock <[email protected]>

---------

Signed-off-by: unilock <[email protected]>
2023-11-26 17:59:52 +00:00
Jason Mitchell c218cb06ae Add missing GL_ARB_direct_state_access needed for osx 2023-11-25 05:31:20 -08:00
Jason Mitchell 7ba5867a7c Check for GLFW_KEY_UNKNOWN (#94) 2023-11-24 11:49:24 -08:00
Jason MitchellandRaven Szewczyk f8c4a5e330 Adjustments needed to get Angelica (Iris/Oculus backport) working (#88)
* WIP Adjustments needed to get Angelica (Iris/Oculus backport) working

* Move to GL20

* Hacky lwjglx.debug support since its transformer doesn't like lwjgl3ify's init call

* Don't submit invalid keycodes

* Add missing glTextureParameter

* Update buildscript

* Better setupDebugMessageCallback.

* Fix up the isKeyDown patch

* Better glGetActiveUniform sizetype impl

* Clean up the debug handler code

* Update the buildscript

---------

Co-authored-by: Raven Szewczyk <[email protected]>
2023-11-23 20:58:11 +00:00
Raven Szewczyk ba6e459fdd Fix Display.isCloseRequested not resetting the flag upon call like in lwjgl2 (#83) 2023-09-24 17:46:44 +01:00
Raven Szewczyk 03c6021fca Installation simplification and ASM upgrade (#82)
* Upstream TerminalTransformer

* TerminalTransformer: support ASM9 opcodes

* Mod*Visitor: accept newer asm (mixin)

* Gradle fix: disable runClient17/runServer17 as the regular tasks already use java 17 in this repo

* Update to asm 9.5 for better Java 21 support

* Installation overhaul: embed the modified libraries in the forgePatches jar to remove a complex installation step of merging libraries folders.
2023-09-23 13:38:17 +01:00
Raven Szewczyk 16fae70244 [ci skip] Update the spotless config 2023-09-23 11:47:09 +01:00
Raven Szewczyk f06ec1ec18 Synthesize ASCII escape codes for ctrl+alt+CHAR inputs too (#76) 2023-09-23 11:21:17 +01:00
ghostflybyandRaven Szewczyk be28e276b8 Fix macOS cmd + <key> not sending <key> pressed (#79)
* Fix macOS cmd + <key> not sending <key> pressed

* Cancel Super+key char events on non-mac platforms

* Update buildscript and fix wildcard imports

---------

Co-authored-by: Raven Szewczyk <[email protected]>
2023-09-23 11:17:20 +01:00
Raven Szewczyk 4cf597e9b3 Add missing OpenAL bindings to fix SoundPhysics (#75)
* Add missing OpenAL EFX bindings and a couple of AL/ALC10 functions

* Log the classloader and transformer exclusions for easier post-mortem debugging.
2023-09-04 17:16:13 +01:00
Raven Szewczyk 3bb91b8631 Fix mouse delta inputs (#70)
* Update buildscript

* Fix implementation of getDX/getDY/getDWheel to reset the value to 0 after a call.
2023-08-03 18:19:46 +01:00
Raven Szewczyk 520487da25 Patch compiler errors in generated code again 2023-06-03 10:42:08 +01:00