Commit Graph
226 Commits
Author SHA1 Message Date
Duy Tran Khanh 8624e54630 Bug fix: NPE when setting inherited fields
Unable to insert id=null
java.lang.NoSuchFieldException: id
	at java.lang.Class.getDeclaredField(Class.java:2070)
	at net.kdt.pojavlaunch.Tools.insertSafety(Tools.java:544)
	at net.kdt.pojavlaunch.Tools.getVersionInfo(Tools.java:466)
	at net.kdt.pojavlaunch.PLaunchApp.launchMinecraft(PLaunchApp.java:61)
	at
net.kdt.pojavlaunch.uikit.UIKit.callback_SurfaceViewController_launchMi
necraft(UIKit.java:104)
	at net.kdt.pojavlaunch.uikit.UIKit.launchUI(Native Method)
	at net.kdt.pojavlaunch.PLaunchApp.main(PLaunchApp.java:40)
2022-01-02 06:25:40 +07:00
Duy Tran Khanh 33b00e417c Fix a NullPointerException when launching ≤ 1.6.4 2021-12-26 05:43:14 +07:00
Duy Tran Khanh 1b0d564379 New toggle option: Restart before launching game
This option allows the launcher to restart itself before launching the
game, therefore all changes are applied such as JVM Arguments and Java
version. The restart mechanism doesn't always work, so a toggle is
here for now.
2021-12-17 21:13:50 +07:00
Adam Tunnic 2e30a1470f Merge branch 'main' of github.com:PojavLauncherTeam/PojavLauncher_iOS 2021-12-15 19:13:42 -05:00
Adam Tunnic 0b643476f4 WIP Demo mode stuff
Sign in with a Microsoft account that doesn't own the game, demo_user will be made. This is very much WIP as my iPhone 7 doesn't feel like launching PojavLauncher.
2021-12-15 13:14:48 -05:00
Duy Tran Khanh fea17bb28e Log4J RCE patch config: disable XML format output
This applies for Minecraft 1.12+
Disable XML formatting for now until we have a log viewer.
2021-12-15 05:49:46 +07:00
Duy Tran Khanh 7d527942a2 Completely fix Log4J RCE (1.7-1.16.5) (not yet tested)
TODO: checker with SHA1
2021-12-13 20:50:42 +07:00
Duy Tran Khanh 150cf861b1 Experimental things
* Multitouch handling, allows one of these actions below to work with
moving camera at the same time.
- Switching hotbar slot; might not work properly
- Destroying block (left mouse button) with another finger
long-pressed (without pressing the PRI button)
- Right mouse trigger with another finger tapped onto the screen
(without pressing the SEC button); not working properly yet
* Sub-pixel cursor support; not yet checked
2021-12-13 07:40:12 +07:00
Duy Tran Khanh 96ea5fd687 Cleanup unused files
~~also fix a bit of grammar :trollface:~~
2021-11-27 15:11:09 +07:00
Duy Tran Khanh d533bfbb10 Local account: update the error message a bit 2021-11-27 13:55:43 +07:00
Duy Tran KhanhandDuy Tran Khanh db0074d1e5 Merge custom control changes (#284)
* Move control loaders to CustomControlsUtils.m

* WIP Drawer support (currently broken)

Also, updated MetalANGLE for helping debug stuff on crash.

* temp

* ControlDrawer: free orientation

* Avoid scrolling the hotbar in grab mode

* Popover: fix the frame inside the arrow

* Changes

- Attempt to allow Microsoft login when offline.
- Custom controls: drawer and sub-buttons are now visible.
- Pickers in Preferences: pre-select at the saved index.

* Bump version code to 4, hide sub-button by default

* Fix text trucanting

* impl scroll buttons, rewrite some parts to objc

* Virtual mouse implementation

Also, possible fix for popover crashes on iPad

Exception type: NSInternalInconsistencyException
> Reason: Tried to set <UIBarButtonItem: 0x10fee5660> menuOnTouchDown
menu=0x2810dce10 image=<UIImage:0x280149050 symbol(system:
ellipsis.circle) {20, 19} baseline=3.5,contentInsets={1, 1.5, 1,
1.5},alignmentRectInsets={-0.5, 0, -0.5, 0}
config=<traits=(UserInterfaceIdiom = Pad, DisplayScale = 2,
DisplayGamut = sRGB, HorizontalSizeClass = Regular, VerticalSizeClass
= Regular, UserInterfaceStyle = Dark, UserInterfaceLayoutDirection =
LTR, PreferredContentSizeCategory = L, AccessibilityContrast =
Normal)>> as sourceView of
<_UIAlertControllerActionSheetRegularPresentationController:
0x12043f5a0>, even though it is not a kind of UIView.

Co-authored-by: Duy Tran Khanh <[email protected]>
2021-10-15 05:16:17 +07:00
Duy Tran Khanh 4f59e0ffff PojavCore is now inside the main executable
This took so long since there was a failed attempt in unloading and
reloading JVM to support Forge 1.17.x. Next attempt would be rewrite
everything to Objective-C and move the JVM entry point to the start of
the game.
2021-10-01 11:14:05 +07:00
Duy Tran Khanh 7fb5b55d8b Override JNA to 5.8.0
This fixes LabyMod 1.8.9 crashing.
2021-09-27 11:06:15 +07:00
Duy Tran Khanh b2ffd5edc3 Changes
- libpojavexec.dylib is now PojavCore.framework.
- More changes for Zink renderer. Note that Mesa 21.0 is included instead of 21.2.1 due to the new version seems to be broken, only display glClearColor.
2021-09-17 07:00:14 +07:00
Duy Tran Khanh 5dcacb6d00 Changes
- Fixes #272
- Replaced MGLLayer with EGL calls
- Re-implemented Zink renderer to work with new Renderer selection system (currently hidden due to unfinished)
2021-09-14 10:57:24 +07:00
Duy Tran Khanh 1c91691d96 Workaround for Forge 1.12.2 crashing 2021-08-30 14:36:12 +07:00
Duy Tran Khanh cad4f47454 Fix parsing Java version "17-ea" 2021-08-24 14:02:06 +07:00
doregon 15a6cf0acf MultiMC-like instances:
- now stores the minecraft directory in .pojavlauncher/instances/default
- configurable straight from the preferences
- migrates your existing minecraft folder to instances/default
- moves L/AS/m from Documents/ to .pojavlauncher/
- changes home directory to .pojavlauncher/
- automatically switches the L/AS/m symlink based on the current instance
- accounts stay the same between instances
2021-08-24 02:56:00 -04:00
Duy Tran Khanh f571e96662 Changes
- Replace MGLKView with UIView + MGLLayer. Attempt to fix crash at "[MGLKView initWithFrame]". Known issue: hotbar offset is a bit wrong when scale ≠ 100%
- Cleanup some unused files.
2021-08-24 11:36:01 +07:00
Duy Tran Khanh 5ce5dbcc00 Changes
- Avoid printing "Session ID". Several Minecraft versions do that.
- Fixes Minecraft 1.13 snapshot due to the usage of LWJGL functions from an older version.
- Minecraft's built in Fullscreen Resolution scaler is available now, but not working properly.
- Regal internal changes (still fail at )
2021-08-23 11:19:54 +07:00
Duy Tran Khanh d949cb4e1b Fixes Sodium 0.3 crashes on saving settings
Sodium 0.3 won't work yet
2021-08-22 14:19:57 +07:00
Duy Tran Khanh 949e562c0e Regal stuff (test) 2021-08-22 14:19:57 +07:00
Duy Tran Khanh de6479f1e6 Changes
- test regal stuff (lib not added)
- auto init symlinks for jailed JRE
2021-08-18 05:52:40 +07:00
Duy Tran Khanh fe5f9e77a9 Changes
- Added a check to prevent attempt to launch 1.17+ with Java 8.
- Added an option to disable gl4es shaderconv in order to let ANGLE
processes them directly. This option lets Minecraft 1.17+ work
without the patch resource pack, OptiFine works aswell :)
- Changing renderer library no longer requires restart the launcher.
- Fixed some alert dialogs not displaying.
- PList default values are now set every time it loads.
2021-08-13 07:25:17 +07:00
Duy Tran Khanh a739cf7202 Resolution downscaler moment 2021-08-10 19:42:10 +07:00
Duy Tran Khanh 2f87bbb54d Trick FlatLAF (used by LabyMod installer) to use Linux codes 2021-08-10 11:44:56 +07:00
Duy Tran Khanh 934f4f1354 FPS limiter :) 2021-08-08 17:34:09 +07:00
Duy Tran Khanh 66bee901db Layout converter v1 -> unfinished v2
"i want new keyboard for pojavluancher" x20 by @𝙵𝚊𝚔ȇ̈_A𝕣ᴄᴀᴅᴇ#7200
2021-08-07 10:17:52 +07:00
Duy Tran Khanh e079e86a80 Changes
- Automatically set overrideWidth and overrideHeight
- Multi-context moment.
Current status of Forge 1.12.2:

Exception type: EXC_BAD_ACCESS (SIGSEGV)
Exception subtype: KERN_INVALID_ADDRESS: 0x964
Exception codes: 0x0000000000000001, 0x0000000000000964
Culprit: Unknown
VM Protection: 0x964 is not in any region.

Triggered by thread: 20
Thread name:
Call stack:
0   libgl4es_115.dylib  0x000000012196738c 0x121900000 + 422796  //
realize_glenv
1   libgl4es_115.dylib  0x00000001219672dc 0x121900000 + 422620  //
realize_glenv
2   libgl4es_115.dylib  0x0000000121966e78 0x121900000 + 421496  //
fpe_glDrawArrays
3   libgl4es_115.dylib  0x000000012199d4e4 0x121900000 + 644324  //
draw_renderlist
4   libgl4es_115.dylib  0x000000012197e39c 0x121900000 + 517020  //
gl4es_flush
5   libgl4es_115.dylib  0x00000001219609e4 0x121900000 + 395748  //
proxy_glEnable
2021-08-05 15:17:56 +07:00
Duy Tran Khanh f2566e3da5 Basic mod installer implementation 2021-08-03 16:06:32 +07:00
Duy Tran Khanh 0668d016bf Changes
- Added Caciocavallo (libawt_xawt stubs) support library.
- Added support lauching Minecraft 1.5.2 and older (requires latest
JRE8 build)
- [Custom controls] Implemented opacity property.
- Version info is now updated through macro instead of `sed` command.
2021-08-01 10:41:02 +07:00
Duy Tran Khanh d4d13edc9a Stub glfwRequestWindowAttention 2021-07-24 16:25:42 +07:00
Duy Tran Khanh 14c5a5ac8f Update PLaunchApp.java 2021-07-18 07:49:54 +07:00
Duy Tran Khanh 7c766a1a5d [Java] This messy plist parser should be fixed now 2021-07-18 07:44:07 +07:00
Duy Tran Khanh 69e8f38894 Update PLaunchApp.java 2021-07-18 07:21:55 +07:00
Duy Tran Khanh 1b606997e1 wrong offset in current selected version parser 2021-07-17 20:34:32 +07:00
Duy Tran Khanh 322870f8a3 Bug fix: always download 1.16.5 2021-07-17 16:13:06 +07:00
Duy Tran Khanh 8f5059e741 Changes
- [Custom controls] Removed control size limit, prepare custom controls
screen.
- [Jailed] Use  directory as home instead of

- [Preference] Added "button scale"
- [Preferences] Moved into launcher_preferences.plist
2021-07-17 07:18:03 +07:00
Duy Tran Khanh 12f6fcf1b6 Bug fixes around interacting with hotbar
- GUI scale is never set, so hotbar offset becomes wrong.
- Touching from hotbar to outside and vice versa cause camera to jump
randomly.
2021-07-12 16:27:54 +07:00
Duy Tran Khanh 7a4bef444b Update GLFWNativeCocoa.java 2021-07-07 07:57:47 +07:00
Duy Tran Khanh f33da2475f Update GLFWNativeCocoa.java 2021-07-07 07:57:03 +07:00
Duy Tran Khanh f76c91f1a9 Get Minecraft 1.17.1 to work 2021-07-07 07:55:41 +07:00
Duy Tran Khanh 35afa7ec5c Local account implementation 2021-07-05 05:31:03 +07:00
Duy Tran Khanh cade3c1f01 Added Caciocavallo (not yet finished) 2021-07-04 19:43:33 +07:00
Duy Tran Khanh be1646c8ce Now this can be installed as an IPA :trollface: 2021-07-02 20:05:59 +07:00
Duy Tran Khanh 705e53e47b well, just remove this piece of check :trollface:
Local interrupt is already handled by mIsAssetsProcessing
2021-07-02 04:53:48 +07:00
Adam Tunnic b29289fc13 Recreate error, now that the Makefile is fixed 2021-07-01 17:41:22 -04:00
Adam Tunnic 6211f42f55 Revert "TEST: Update MC assets downloader to match Android" 2021-07-01 11:50:22 -04:00
Duy Tran Khanh 41d1943c87 TEST: Update MC assets downloader to match Android
Could fix issue #182
See https://github.com/PojavLauncherTeam/PojavLauncher/commit/2adc410ef81bc5641a8517000cfeeaaf2df3f1eb
2021-07-01 20:40:00 +07:00
Duy Tran Khanh 7ac5f2d163 Java Runtime loading changes
Allow changing Java Runtime with JAVA_HOME environment variable.
Support Java 8 libjli location (`lib/jli` instead of `lib`).
2021-07-01 12:52:59 +07:00