Commit Graph

96 Commits

Author SHA1 Message Date
Sefa Eyeoglu
db19362a97
feat: add launcher brand and version props
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-10-22 21:19:44 +02:00
TheKodeToad
cf33927f21
Merge remote-tracking branch 'upstream/develop' into sysprops
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-10-19 11:28:07 +01:00
TheKodeToad
1213a5ab46
Merge remote-tracking branch 'upstream/develop' into skinfix
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-09-02 22:27:57 +01:00
TheKodeToad
f6d8c9659c
Rework
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-08-11 00:39:05 +01:00
TheKodeToad
e2d77f21ba
More system properties because yes!! 🎉
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-08-11 00:02:48 +01:00
Sefa Eyeoglu
1d468ac35a
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-08-02 18:35:35 +02:00
TheKodeToad
d4b346b7ae Fix oversights
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-01-09 10:48:46 +00:00
TheKodeToad
17317ea308 Move legacy support classes to another jar
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-01-06 09:23:36 +00:00
TheKodeToad
cb32711077 Slim skin fix - thanks to @craftycodie and @DelofJ
!

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-01-06 09:21:43 +00:00
TheKodeToad
5c96b1c628
Remove MIT license from JsonParser
I don't mind, and it's my code.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-25 09:45:42 +00:00
TheKodeToad
884bd85495 Skin fix -> online fixes
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-23 09:35:29 +00:00
TheKodeToad
94067f34cf Try to make some of the suggested changes
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-23 09:34:26 +00:00
TheKodeToad
87bcefd08a Automatically add add-opens if Java version >= 9
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-15 15:28:24 +00:00
TheKodeToad
8a6776731a Use reflection to access DatatypeConverter
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-15 14:59:39 +00:00
TheKodeToad
bfa5fe1598 Better skin fix error handling
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-15 14:59:39 +00:00
TheKodeToad
ead59c0246 Improve the skin fix code
- Spoof 404 instead of keeping original URL.
- Move JsonParseException to the package.
- Pass proxy as null to reduce code duplication.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-15 14:59:39 +00:00
TheKodeToad
cfeadf858e Add workaround to warning
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-15 14:59:39 +00:00
TheKodeToad
7534eaf006 Only use DatatypeConverter as a fallback
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-15 14:59:39 +00:00
TheKodeToad
8a81aaaa0a Add separate util class
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-15 14:59:39 +00:00
TheKodeToad
b544661e81 Experimental skin fix, inspired by craftycodie's
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-15 14:59:38 +00:00
TheKodeToad
70fa92f22c Remove dirty printStackTrace hacks
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-19 13:59:22 +00:00
TheKodeToad
669eef92eb Make requested changes and utilise AssertionError
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-19 08:54:17 +00:00
TheKodeToad
32c2ad2bbd A lot more cleanup
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 17:51:18 +00:00
TheKodeToad
f2ca9a6b31 Revert switch to JUL for better colours
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 17:38:23 +00:00
TheKodeToad
50d40257fe Always use this for consistency
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 17:38:23 +00:00
TheKodeToad
e6dc34fe10 More license fixing
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
745c331311 Remove last case of printStackTrace
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
1ea2e85415 Implicit is generally prefered
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
4a2df30f92 Try to use more standard exit codes
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
922220c11e More consistent logging text
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
56d5035c63 Fix the warnings properly
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
4abf3a20c6 More standard code formatting profile
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:25 +00:00
TheKodeToad
5912ef3b45 Just ignore empty lines
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:00 +00:00
TheKodeToad
9931c9a286 Remove arguments being passed twice
Passing the classpath into stdin has no effect. Java is already provided the classpath with -cp, which pretty much takes up the largest part of the arguments anyway, which leads me to wonder, what's the point of stdin arguments at all?

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:00 +00:00
TheKodeToad
1da834f650 *opinionated change* Remove LauncherFactory
Factories in OOP are a classic example of over-enginneering. When you only have two launchers I personally think that it's not very useful.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:00 +00:00
TheKodeToad
fb677a7489 So turns out we can have nice things
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:36:55 +00:00
TheKodeToad
404796d4b2 Sorry for reverting a lot but copying a list just hurts me
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:36:35 +00:00
TheKodeToad
5b9bfe8891 Attempt to mimic clang-format
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:36:33 +00:00
TheKodeToad
779bc2c63d Fix WrongMethodTypeException. Invoke exact don't work like that
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:35:46 +00:00
TheKodeToad
cae1ba7cd8 Less needless verbosity, and return fallback
Needlessly verbose commit message ik.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:35:46 +00:00
TheKodeToad
8ce78dcc54 Try to improve consistency
- Makes code formatting more consistent with the C++ codebase. Probably removes some trailing whitespace. Maybe it would be best to commit an Eclipse or IntelliJ code format preferences file?
- Removes obscure suppressions. I personally think it's better to only suppress warnings that javac complains about. Suppressing a lot of non-standardised warnings (many of them turned off by default even in IntelliJ) just creates needless clutter.
- Fixes some trivial warnings instead of suppressing them. serialVersionUID is sort of stupid, but I'd rather mentally ignore it or just fix it if it's really that annoying.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:35:43 +00:00
solonovamax
afe088dba1 Fix license headers
- Update license headers in several files to remove multimc apache reference, when unneeded
  - LauncherFactory: we've entirely rewritten this class at this point, so it's fully under GPL code
  - Launcher: this interface contains zero logic, and only a single method named `launch`, so I doubt you can actually copyright that
  - LauncherProvider: same as above
  - ParseException, ParameterNotFoundException: same as above; this class contains almost no logic (And the logic that was added is under GPL)
  - ReflectionUtils, StringUtils: add license header
  - Everything else: modify the program name in the license header from "PolyMC - Minecraft Launcher" to "Prism Launcher"

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
e899e31745 More informative exceptions in entrypoint
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
dabb84f62a Cleanup launcher classes
Cleanup a bunch of the code in launcher classes
- Migrate the majority of the reflection to ReflectionUtils
- Decrease logic in AbstractLauncher
- Add logging to launcher classes at FINE level
- make mcParams in AbstractLauncher an immutable list to prevent runtime manipulation
  - StandardLauncher instead copies the list to modify it

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
9b8096c699 Get rid of gross HashMap being used by LauncherFactory and instead use *fancy* enum
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
ac5b74301e Cleanup splitting string into a pair
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
TheKodeToad
609b30110b Make main static
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>

Inline local variable

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
35d200356f Create launcher.impl.legacy
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
ade7526f5f Remove the need for LegacyUtils
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
a7b1700d42 Better variable naming
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00