Android detection fix#10305
Conversation
|
Someone please tell me how to disable copilot review |
There was a problem hiding this comment.
Pull request overview
This PR broadens the existing Pojav compatibility warning into a more general Android/mobile-environment check, updating the client-side detector, warning screen, and related English localization entries.
Changes:
- Replaced the Pojav-specific checker/warning screen naming with Android-oriented equivalents.
- Added extra Android detection heuristics (Amethyst env var and JVM vendor/runtime checks).
- Updated English warning text and lang keys, including changes to the default lang source file.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/resources/assets/create/lang/default/interface.json |
Updates warning strings and also modifies the default lang source used for datagen. |
src/main/java/com/simibubi/create/infrastructure/debugInfo/DebugInformation.java |
Switches debug reporting to the new Android checker. |
src/main/java/com/simibubi/create/CreateClient.java |
Initializes the renamed Android checker during client setup. |
src/main/java/com/simibubi/create/compat/pojav/AndroidWarningScreen.java |
Renames the warning screen and points it at new gui.android.* translation keys. |
src/main/java/com/simibubi/create/compat/pojav/AndroidChecker.java |
Renames the detector and adds broader Android/Amethyst detection logic. |
src/generated/resources/assets/create/lang/en_us.json |
Regenerated English output for the renamed warning keys. |
Comments suppressed due to low confidence (2)
src/main/java/com/simibubi/create/compat/pojav/AndroidWarningScreen.java:20
- These new translation keys are only defined in
en_us; every existing locale file still shipscreate.gui.pojav.*. Renaming the screen togui.android.*will therefore drop the localized warning text for non-English players until all locale files are migrated.
src/main/java/com/simibubi/create/compat/pojav/AndroidChecker.java:35 - The warning log mentions an
AMETHYSTenvironment variable, but the code is actually checkingAMETHYST_RENDERER. If someone is trying to understand why Android mode was detected, this message points them at the wrong variable name.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .put("OpenGL Version", GlUtil::getOpenGLVersion) | ||
| .put("Graphics Mode", () -> Minecraft.getInstance().options.graphicsMode().get().name().toLowerCase(Locale.ROOT)) | ||
| .put("PojavLauncher Detected", () -> String.valueOf(PojavChecker.IS_PRESENT)) | ||
| .put("PojavLauncher Detected", () -> String.valueOf(AndroidChecker.IS_PRESENT)) |
| "advancement.create.andesite_alloy": "Sturdier Rocks", | ||
| "advancement.create.andesite_alloy.desc": "Obtain some Andesite Alloy, Create's most important resource", | ||
| "advancement.create.andesite_casing": "The Andesite Age", | ||
| "advancement.create.andesite_casing.desc": "Apply Andesite Alloy to stripped wood, creating a basic casing for your machines", | ||
| "advancement.create.anvil_plough": "Blacksmith Artillery", | ||
| "advancement.create.anvil_plough.desc": "Launch an Anvil with Mechanical Ploughs", | ||
| "advancement.create.arm_blaze_burner": "Combust-o-Tron", | ||
| "advancement.create.arm_blaze_burner.desc": "Instruct a Mechanical Arm to feed your Blaze Burner", | ||
| "advancement.create.arm_many_targets": "Organize-o-Tron", | ||
| "advancement.create.arm_many_targets.desc": "Program a Mechanical Arm with 10 or more output locations", | ||
| "advancement.create.backtank": "Pressure to Go", | ||
| "advancement.create.backtank.desc": "Create a Copper Backtank and make it accumulate air pressure", | ||
| "advancement.create.belt": "Kelp Drive", | ||
| "advancement.create.belt.desc": "Connect two Shafts with a Mechanical Belt", | ||
| "advancement.create.belt_funnel_kiss": "The Parrots and the Flaps", | ||
| "advancement.create.belt_funnel_kiss.desc": "Make two Belt-mounted Funnels kiss\n§7(Hidden Advancement)", | ||
| "advancement.create.brass": "Real Alloys", |
| "create.gui.pojav.content": "Mobile devices have extremely low quality graphics drivers, which cause visual issues that are impossible for Create to fix. No support will be provided for any issues you encounter.", | ||
| "create.gui.pojav.continue": "Continue Anyway", | ||
| "create.gui.pojav.title": "Create is not supported on PojavLauncher.", |
|
My phone refused to render the diff where you do exactly that. Apologies. That said - why is that diff so big? You only needed to modify three entries. |
Oh fuck I ran datagen and I didn't realize that rearranged the lang file. I'll fix it in a bit |
Should be under here. Incase you have not found it yourself already. |
Fix android detection/Pojav compat as it didn't detect it if not using Pojav.
Changes:
Screenshot of the new screen on my phone using Amethyst
