forked from didirus/AstralRinth
* chore: fix typo in status message * feat(labrinth): overhaul malware scanner report storage and routes * chore: address some review comments * feat: add Delphi to Docker Compose `with-delphi` profile * chore: fix unused import Clippy lint * feat(labrinth/delphi): use PAT token authorization with project read scopes * chore: expose file IDs in version queries * fix: accept null decompiled source payloads from Delphi * tweak(labrinth): expose base62 file IDs more consistently for Delphi * feat(labrinth/delphi): support new Delphi report severity field * chore(labrinth): run `cargo sqlx prepare` to fix Docker build errors * tweak: add route for fetching Delphi issue type schema, abstract Labrinth away from issue types * chore: run `cargo sqlx prepare` * chore: fix typo on frontend generated state file message * feat: update to use new Delphi issue schema * wip: tech review endpoints * wip: add ToSchema for dependent types * wip: report issues return * wip * wip: returning more data * wip * Fix up db query * Delphi configuration to talk to Labrinth * Get Delphi working with Labrinth * Add Delphi dummy fixture * Better Delphi logging * Improve utoipa for tech review routes * Add more sorting options for tech review queue * Oops join * New routes for fetching issues and reports * Fix which kind of ID is returned in tech review endpoints * Deduplicate tech review report rows * Reduce info sent for projects * Fetch more thread info * Address PR comments * fix ci * fix postgres version mismatch * fix version creation * Implement routes * fix up tech review * Allow adding a moderation comment to Delphi rejections * fix up rebase * exclude rejected projects from tech review * add status change msg to tech review thread * cargo sqlx prepare * also ignore withheld projects * More filtering on issue search * wip: report routes * Fix up for build * cargo sqlx prepare * fix thread message privacy * New tech review search route * submit route * details have statuses now * add default to drid status * dedup issue details * fix sqlx query on empty files * fixes * Dedupe issue detail statuses and message on entering tech rev * Fix qa issues * Fix qa issues * fix review comments * typos * fix ci * feat: tech review frontend (#4781) * chore: fix typo in status message * feat(labrinth): overhaul malware scanner report storage and routes * chore: address some review comments * feat: add Delphi to Docker Compose `with-delphi` profile * chore: fix unused import Clippy lint * feat(labrinth/delphi): use PAT token authorization with project read scopes * chore: expose file IDs in version queries * fix: accept null decompiled source payloads from Delphi * tweak(labrinth): expose base62 file IDs more consistently for Delphi * feat(labrinth/delphi): support new Delphi report severity field * chore(labrinth): run `cargo sqlx prepare` to fix Docker build errors * tweak: add route for fetching Delphi issue type schema, abstract Labrinth away from issue types * chore: run `cargo sqlx prepare` * chore: fix typo on frontend generated state file message * feat: update to use new Delphi issue schema * wip: tech review endpoints * wip: add ToSchema for dependent types * wip: report issues return * wip * wip: returning more data * wip * Fix up db query * Delphi configuration to talk to Labrinth * Get Delphi working with Labrinth * Add Delphi dummy fixture * Better Delphi logging * Improve utoipa for tech review routes * Add more sorting options for tech review queue * Oops join * New routes for fetching issues and reports * Fix which kind of ID is returned in tech review endpoints * Deduplicate tech review report rows * Reduce info sent for projects * Fetch more thread info * Address PR comments * fix ci * fix ci * fix postgres version mismatch * fix version creation * Implement routes * feat: batch scan alert * feat: layout * feat: introduce surface variables * fix: theme selector * feat: rough draft of tech review card * feat: tab switcher * feat: batch scan btn * feat: api-client module for tech review * draft: impl * feat: auto icons * fix: layout issues * feat: fixes to code blocks + flag labels * feat: temp remove mock data * fix: search sort types * fix: intl & lint * chore: re-enable mock data * fix: flag badges + auto open first issue in file tab * feat: update for new routes * fix: more qa issues * feat: lazy load sources * fix: re-enable auth middleware * feat: impl threads * fix: lint & severity * feat: download btn + switch to using NavTabs with new local mode option * feat: re-add toplevel btns * feat: reports page consistency * fix: consistency on project queue * fix: icons + sizing * fix: colors and gaps * fix: impl endpoints * feat: load all flags on file tab * feat: thread generics changes * feat: more qa * feat: fix collapse * fix: qa * feat: msg modal * fix: ISO import * feat: qa fixes * fix: empty state basic * fix: collapsible region * fix: collapse thread by default * feat: rough draft of new process/flow * fix labrinth build * fix thread message privacy * New tech review search route * feat: qa fixes * feat: QA changes * fix: verdict on detail not whole issue * fix: lint + intl * fix: lint * fix: thread message for tech rev verdict * feat: use anim frames * fix: exports + typecheck * polish: qa changes * feat: qa * feat: qa polish * feat: fix malic modal * fix: lint * fix: qa + lint * fix: pagination * fix: lint * fix: qa * intl extract * fix ci --------- Signed-off-by: Calum H. <contact@cal.engineer> Co-authored-by: Alejandro González <me@alegon.dev> Co-authored-by: aecsocket <aecsocket@tutanota.com> --------- Signed-off-by: Calum H. <contact@cal.engineer> Co-authored-by: Alejandro González <me@alegon.dev> Co-authored-by: Calum H. <contact@cal.engineer>
91 lines
70 KiB
SQL
91 lines
70 KiB
SQL
--
|
|
-- PostgreSQL database dump
|
|
--
|
|
|
|
\restrict RGysBmMc8KFBQ9AssusGyNPozUiB43hdmIPxlv5KSWbX7tdW7XVMPpMginvod9K
|
|
|
|
-- Dumped from database version 17.6
|
|
-- Dumped by pg_dump version 17.6
|
|
|
|
SET statement_timeout = 0;
|
|
SET lock_timeout = 0;
|
|
SET idle_in_transaction_session_timeout = 0;
|
|
SET transaction_timeout = 0;
|
|
SET client_encoding = 'UTF8';
|
|
SET standard_conforming_strings = on;
|
|
SELECT pg_catalog.set_config('search_path', '', false);
|
|
SET check_function_bodies = false;
|
|
SET xmloption = content;
|
|
SET client_min_messages = warning;
|
|
SET row_security = off;
|
|
|
|
--
|
|
-- Data for Name: delphi_reports; Type: TABLE DATA; Schema: public; Owner: labrinth
|
|
--
|
|
|
|
COPY public.delphi_reports (id, file_id, delphi_version, artifact_url, created, severity) FROM stdin;
|
|
1 157529403422109 3 file:///tmp/modrinth/data/CaG4Mr66/versions/fMzLDsVA/sodium.jar 2025-11-15 23:01:30.012526+00 high
|
|
\.
|
|
|
|
|
|
--
|
|
-- Data for Name: delphi_report_issues; Type: TABLE DATA; Schema: public; Owner: labrinth
|
|
--
|
|
|
|
COPY public.delphi_report_issues (id, report_id, issue_type, status) FROM stdin;
|
|
1 1 runtime_exec_usage pending
|
|
2 1 hardcoded_url pending
|
|
3 1 classloader_usage pending
|
|
4 1 obfuscated_names pending
|
|
5 1 main_method pending
|
|
\.
|
|
|
|
|
|
--
|
|
-- Data for Name: delphi_report_issue_details; Type: TABLE DATA; Schema: public; Owner: labrinth
|
|
--
|
|
|
|
COPY public.delphi_report_issue_details (id, issue_id, key, file_path, decompiled_source, data, severity) FROM stdin;
|
|
1 1 d670186a0e5210fc2b9332a2163849740f19bec59a99d890bef0ae9e6608f83d net/caffeinemc/mods/sodium/desktop/utils/browse/XDGImpl package net.caffeinemc.mods.sodium.desktop.utils.browse;\n\nimport java.io.IOException;\nimport java.util.Locale;\n\nclass XDGImpl implements BrowseUrlHandler {\n public static boolean isSupported() {\n String os = System.getProperty("os.name").toLowerCase(Locale.ROOT);\n return os.equals("linux");\n }\n\n @Override\n public void browseTo(String url) throws IOException {\n Process process = Runtime.getRuntime().exec(new String[]{"xdg-open", url});\n\n try {\n int result = process.waitFor();\n if (result != 0) {\n throw new IOException("xdg-open exited with code: %d".formatted(result));\n }\n } catch (InterruptedException var4) {\n throw new RuntimeException(var4);\n }\n }\n}\n {} medium
|
|
2 1 317dd815f60f04f1cef5d855e30f6a2719570c583ef49ae94ca2b563179fc1fa net/caffeinemc/mods/sodium/client/compatibility/environment/probe/GraphicsAdapterProbe package net.caffeinemc.mods.sodium.client.compatibility.environment.probe;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Set;\nimport java.util.stream.Stream;\nimport net.caffeinemc.mods.sodium.client.compatibility.environment.OsUtils;\nimport net.caffeinemc.mods.sodium.client.platform.windows.api.d3dkmt.D3DKMT;\nimport org.jetbrains.annotations.Nullable;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class GraphicsAdapterProbe {\n private static final Logger LOGGER = LoggerFactory.getLogger("Sodium-GraphicsAdapterProbe");\n private static final Set<String> LINUX_PCI_CLASSES = Set.of("0x030000", "0x030001", "0x030200", "0x038000");\n private static List<? extends GraphicsAdapterInfo> ADAPTERS = List.of();\n\n public static void findAdapters() {\n LOGGER.info("Searching for graphics cards...");\n\n List<? extends GraphicsAdapterInfo> adapters;\n try {\n adapters = switch (OsUtils.getOs()) {\n case WIN -> findAdapters$Windows();\n case LINUX -> findAdapters$Linux();\n default -> null;\n };\n } catch (Exception var3) {\n LOGGER.error("Failed to find graphics adapters!", var3);\n return;\n }\n\n if (adapters != null) {\n if (adapters.isEmpty()) {\n LOGGER.warn(\n "Could not find any graphics adapters! Probably the device is not on a bus we can probe, or there are no devices supporting 3D acceleration."\n );\n } else {\n for (GraphicsAdapterInfo adapter : adapters) {\n LOGGER.info("Found graphics adapter: {}", adapter);\n }\n }\n\n ADAPTERS = adapters;\n }\n }\n\n private static List<? extends GraphicsAdapterInfo> findAdapters$Windows() {\n return D3DKMT.findGraphicsAdapters();\n }\n\n private static List<? extends GraphicsAdapterInfo> findAdapters$Linux() {\n ArrayList<GraphicsAdapterInfo> results = new ArrayList();\n\n try {\n Stream<Path> devices = Files.list(Path.of("/sys/bus/pci/devices/"));\n\n try {\n for (Path devicePath : devices::iterator) {\n String deviceClass = Files.readString(devicePath.resolve("class")).trim();\n if (LINUX_PCI_CLASSES.contains(deviceClass)) {\n String pciVendorId = Files.readString(devicePath.resolve("vendor")).trim();\n String pciDeviceId = Files.readString(devicePath.resolve("device")).trim();\n GraphicsAdapterVendor adapterVendor = GraphicsAdapterVendor.fromPciVendorId(pciVendorId);\n String adapterName = getPciDeviceName$Linux(pciVendorId, pciDeviceId);\n if (adapterName == null) {\n adapterName = "<unknown>";\n }\n\n GraphicsAdapterInfo.LinuxPciAdapterInfo info = new GraphicsAdapterInfo.LinuxPciAdapterInfo(\n adapterVendor, adapterName, pciVendorId, pciDeviceId\n );\n results.add(info);\n }\n }\n } catch (Throwable var12) {\n if (devices != null) {\n try {\n devices.close();\n } catch (Throwable var11) {\n var12.addSuppressed(var11);\n }\n }\n\n throw var12;\n }\n\n if (devices != null) {\n devices.close();\n }\n } catch (IOException var13) {\n }\n\n return results;\n }\n\n @Nullable\n private static String getPciDeviceName$Linux(String vendorId, String deviceId) {\n String deviceFilter = vendorId.substring(2) + ":" + deviceId.substring(2);\n\n try {\n Process process = Runtime.getRuntime().exec(new String[]{"lspci", "-vmm", "-d", deviceFilter});\n int result = process.waitFor();\n if (result != 0) {\n throw new IOException("lspci exited with error code: %s".formatted(result));\n } else {\n BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\n String var7;\n label40: {\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n if (line.startsWith("Device:")) {\n var7 = line.substring("Device:".length()).trim();\n break label40;\n }\n }\n } catch (Throwable var9) {\n try {\n reader.close();\n } catch (Throwable var8) {\n var9.addSuppressed(var8);\n }\n\n throw var9;\n }\n\n reader.close();\n throw new IOException("lspci did not return a device name");\n }\n\n reader.close();\n return var7;\n }\n } catch (Throwable var10) {\n LOGGER.warn("Failed to query PCI device name for %s:%s".formatted(vendorId, deviceId), var10);\n return null;\n }\n }\n\n public static Collection<? extends GraphicsAdapterInfo> getAdapters() {\n if (ADAPTERS == null) {\n LOGGER.error("Graphics adapters not probed yet; returning an empty list.");\n return Collections.emptyList();\n } else {\n return ADAPTERS;\n }\n }\n}\n {} medium
|
|
3 2 5ba58b7f9dcc59f14c8a0fd9b78c23a19723791bd9006ed408d43557ea24abb4 net/caffeinemc/mods/sodium/desktop/LaunchWarn package net.caffeinemc.mods.sodium.desktop;\n\nimport java.awt.GraphicsEnvironment;\nimport java.io.IOException;\nimport javax.swing.JDialog;\nimport javax.swing.JOptionPane;\nimport javax.swing.UIManager;\nimport javax.swing.UnsupportedLookAndFeelException;\nimport net.caffeinemc.mods.sodium.desktop.utils.browse.BrowseUrlHandler;\n\npublic class LaunchWarn {\n private static final String HELP_URL = "https://link.caffeinemc.net/guides/sodium/installation";\n private static final String RICH_MESSAGE = "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then click the \\"Help\\" button for an installation guide.</p></body></html>";\n private static final String FALLBACK_MESSAGE = "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then visit <i>https://link.caffeinemc.net/guides/sodium/installation</i> for an installation guide.</p></body></html>";\n private static final String FAILED_TO_BROWSE_MESSAGE = "<html><body><p style='width: 400px; padding: 0 0 8px 0;'>Failed to open the default browser! Your system may be misconfigured. Please open the URL <i>https://link.caffeinemc.net/guides/sodium/installation</i> manually.</p></body></html>";\n public static final String WINDOW_TITLE = "Sodium";\n\n public static void main(String[] args) {\n if (GraphicsEnvironment.isHeadless()) {\n showHeadlessError();\n } else {\n showGraphicalError();\n }\n }\n\n private static void showHeadlessError() {\n System.err\n .println(\n "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then visit <i>https://link.caffeinemc.net/guides/sodium/installation</i> for an installation guide.</p></body></html>"\n );\n }\n\n private static void showGraphicalError() {\n trySetSystemLookAndFeel();\n trySetSystemFontPreferences();\n BrowseUrlHandler browseUrlHandler = BrowseUrlHandler.createImplementation();\n if (browseUrlHandler != null) {\n showRichGraphicalDialog(browseUrlHandler);\n } else {\n showFallbackGraphicalDialog();\n }\n\n System.exit(0);\n }\n\n private static void showRichGraphicalDialog(BrowseUrlHandler browseUrlHandler) {\n int selectedOption = showDialogBox(\n "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then click the \\"Help\\" button for an installation guide.</p></body></html>",\n "Sodium",\n 0,\n 1,\n new String[]{"Help", "Close"},\n 0\n );\n if (selectedOption == 0) {\n log("Opening URL: https://link.caffeinemc.net/guides/sodium/installation");\n\n try {\n browseUrlHandler.browseTo("https://link.caffeinemc.net/guides/sodium/installation");\n } catch (IOException var3) {\n log("Failed to open default web browser!", var3);\n showDialogBox(\n "<html><body><p style='width: 400px; padding: 0 0 8px 0;'>Failed to open the default browser! Your system may be misconfigured. Please open the URL <i>https://link.caffeinemc.net/guides/sodium/installation</i> manually.</p></body></html>",\n "Sodium",\n -1,\n 2,\n null,\n -1\n );\n }\n }\n }\n\n private static void showFallbackGraphicalDialog() {\n showDialogBox(\n "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then visit <i>https://link.caffeinemc.net/guides/sodium/installation</i> for an installation guide.</p></body></html>",\n "Sodium",\n -1,\n 1,\n null,\n null\n );\n }\n\n private static int showDialogBox(String message, String title, int optionType, int messageType, String[] options, Object initialValue) {\n JOptionPane pane = new JOptionPane(message, messageType, optionType, null, options, initialValue);\n JDialog dialog = pane.createDialog(title);\n dialog.setVisible(true);\n Object selectedValue = pane.getValue();\n if (selectedValue == null) {\n return -1;\n } else if (options == null) {\n return selectedValue instanceof Integer ? (Integer)selectedValue : -1;\n } else {\n for (int counter = 0; counter < options.length; counter++) {\n String option = options[counter];\n if (option.equals(selectedValue)) {\n return counter;\n }\n }\n\n return -1;\n }\n }\n\n private static void trySetSystemLookAndFeel() {\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (UnsupportedLookAndFeelException | ReflectiveOperationException var1) {\n }\n }\n\n private static void trySetSystemFontPreferences() {\n System.setProperty("awt.useSystemAAFontSettings", "on");\n }\n\n private static void log(String message) {\n System.err.println(message);\n }\n\n private static void log(String message, Throwable exception) {\n System.err.println(message);\n exception.printStackTrace(System.err);\n }\n}\n {"url": "https://link.caffeinemc.net/guides/sodium/installation"} low
|
|
4 2 34a4ceb119311f669d4b3b036dfef9f93c1e86f765582ebf556b92486766f861 net/caffeinemc/mods/sodium/client/gui/SodiumOptionsGUI package net.caffeinemc.mods.sodium.client.gui;\n\nimport com.google.common.collect.UnmodifiableIterator;\nimport java.io.IOException;\nimport java.time.Instant;\nimport java.time.temporal.ChronoUnit;\nimport java.util.ArrayList;\nimport java.util.EnumSet;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.stream.Stream;\nimport net.caffeinemc.mods.sodium.client.SodiumClientMod;\nimport net.caffeinemc.mods.sodium.client.console.Console;\nimport net.caffeinemc.mods.sodium.client.console.message.MessageLevel;\nimport net.caffeinemc.mods.sodium.client.data.fingerprint.HashedFingerprint;\nimport net.caffeinemc.mods.sodium.client.gui.options.Option;\nimport net.caffeinemc.mods.sodium.client.gui.options.OptionFlag;\nimport net.caffeinemc.mods.sodium.client.gui.options.OptionGroup;\nimport net.caffeinemc.mods.sodium.client.gui.options.OptionImpact;\nimport net.caffeinemc.mods.sodium.client.gui.options.OptionPage;\nimport net.caffeinemc.mods.sodium.client.gui.options.control.Control;\nimport net.caffeinemc.mods.sodium.client.gui.options.control.ControlElement;\nimport net.caffeinemc.mods.sodium.client.gui.options.storage.OptionStorage;\nimport net.caffeinemc.mods.sodium.client.gui.prompt.ScreenPrompt;\nimport net.caffeinemc.mods.sodium.client.gui.prompt.ScreenPromptable;\nimport net.caffeinemc.mods.sodium.client.gui.screen.ConfigCorruptedScreen;\nimport net.caffeinemc.mods.sodium.client.gui.widgets.AbstractWidget;\nimport net.caffeinemc.mods.sodium.client.gui.widgets.FlatButtonWidget;\nimport net.caffeinemc.mods.sodium.client.services.PlatformRuntimeInformation;\nimport net.caffeinemc.mods.sodium.client.util.Dim2i;\nimport net.minecraft.class_124;\nimport net.minecraft.class_156;\nimport net.minecraft.class_2561;\nimport net.minecraft.class_310;\nimport net.minecraft.class_332;\nimport net.minecraft.class_364;\nimport net.minecraft.class_437;\nimport net.minecraft.class_446;\nimport net.minecraft.class_5250;\nimport net.minecraft.class_5348;\nimport net.minecraft.class_5481;\nimport org.jetbrains.annotations.Nullable;\n\npublic class SodiumOptionsGUI extends class_437 implements ScreenPromptable {\n private final List<OptionPage> pages = new ArrayList();\n private final List<ControlElement<?>> controls = new ArrayList();\n private final class_437 prevScreen;\n private OptionPage currentPage;\n private FlatButtonWidget applyButton;\n private FlatButtonWidget closeButton;\n private FlatButtonWidget undoButton;\n private FlatButtonWidget donateButton;\n private FlatButtonWidget hideDonateButton;\n private boolean hasPendingChanges;\n private ControlElement<?> hoveredElement;\n @Nullable\n private ScreenPrompt prompt;\n private static final List<class_5348> DONATION_PROMPT_MESSAGE = List.of(\n class_5348.method_29433(new class_5348[]{class_2561.method_43470("Hello!")}),\n class_5348.method_29433(\n new class_5348[]{\n class_2561.method_43470("It seems that you've been enjoying "),\n class_2561.method_43470("Sodium").method_54663(2616210),\n class_2561.method_43470(", the powerful and open rendering optimization mod for Minecraft.")\n }\n ),\n class_5348.method_29433(\n new class_5348[]{\n class_2561.method_43470("Mods like these are complex. They require "),\n class_2561.method_43470("thousands of hours").method_54663(16739840),\n class_2561.method_43470(" of development, debugging, and tuning to create the experience that players have come to expect.")\n }\n ),\n class_5348.method_29433(\n new class_5348[]{\n class_2561.method_43470("If you'd like to show your token of appreciation, and support the development of our mod in the process, then consider "),\n class_2561.method_43470("buying us a coffee").method_54663(15550926),\n class_2561.method_43470(".")\n }\n ),\n class_5348.method_29433(new class_5348[]{class_2561.method_43470("And thanks again for using our mod! We hope it helps you (and your computer.)")})\n );\n\n private SodiumOptionsGUI(class_437 prevScreen) {\n super(class_2561.method_43470("Sodium Renderer Settings"));\n this.prevScreen = prevScreen;\n this.pages.add(SodiumGameOptionPages.general());\n this.pages.add(SodiumGameOptionPages.quality());\n this.pages.add(SodiumGameOptionPages.performance());\n this.pages.add(SodiumGameOptionPages.advanced());\n this.checkPromptTimers();\n }\n\n private void checkPromptTimers() {\n if (!PlatformRuntimeInformation.getInstance().isDevelopmentEnvironment()) {\n SodiumGameOptions options = SodiumClientMod.options();\n if (!options.notifications.hasSeenDonationPrompt) {\n HashedFingerprint fingerprint = null;\n\n try {\n fingerprint = HashedFingerprint.loadFromDisk();\n } catch (Throwable var5) {\n SodiumClientMod.logger().error("Failed to read the fingerprint from disk", var5);\n }\n\n if (fingerprint != null) {\n Instant now = Instant.now();\n Instant threshold = Instant.ofEpochSecond(fingerprint.timestamp()).plus(3L, ChronoUnit.DAYS);\n if (now.isAfter(threshold)) {\n this.openDonationPrompt(options);\n }\n }\n }\n }\n }\n\n private void openDonationPrompt(SodiumGameOptions options) {\n ScreenPrompt prompt = new ScreenPrompt(\n this, DONATION_PROMPT_MESSAGE, 320, 190, new ScreenPrompt.Action(class_2561.method_43470("Buy us a coffee"), this::openDonationPage)\n );\n prompt.method_25365(true);\n options.notifications.hasSeenDonationPrompt = true;\n\n try {\n SodiumGameOptions.writeToDisk(options);\n } catch (IOException var4) {\n SodiumClientMod.logger().error("Failed to update config file", var4);\n }\n }\n\n public static class_437 createScreen(class_437 currentScreen) {\n return (class_437)(SodiumClientMod.options().isReadOnly()\n ? new ConfigCorruptedScreen(currentScreen, SodiumOptionsGUI::new)\n : new SodiumOptionsGUI(currentScreen));\n }\n\n public void setPage(OptionPage page) {\n this.currentPage = page;\n this.rebuildGUI();\n }\n\n protected void method_25426() {\n super.method_25426();\n this.rebuildGUI();\n if (this.prompt != null) {\n this.prompt.init();\n }\n }\n\n private void rebuildGUI() {\n this.controls.clear();\n this.method_37067();\n if (this.currentPage == null) {\n if (this.pages.isEmpty()) {\n throw new IllegalStateException("No pages are available?!");\n }\n\n this.currentPage = (OptionPage)this.pages.get(0);\n }\n\n this.rebuildGUIPages();\n this.rebuildGUIOptions();\n this.undoButton = new FlatButtonWidget(\n new Dim2i(this.field_22789 - 211, this.field_22790 - 30, 65, 20), class_2561.method_43471("sodium.options.buttons.undo"), this::undoChanges\n );\n this.applyButton = new FlatButtonWidget(\n new Dim2i(this.field_22789 - 142, this.field_22790 - 30, 65, 20), class_2561.method_43471("sodium.options.buttons.apply"), this::applyChanges\n );\n this.closeButton = new FlatButtonWidget(\n new Dim2i(this.field_22789 - 73, this.field_22790 - 30, 65, 20), class_2561.method_43471("gui.done"), this::method_25419\n );\n this.donateButton = new FlatButtonWidget(\n new Dim2i(this.field_22789 - 128, 6, 100, 20), class_2561.method_43471("sodium.options.buttons.donate"), this::openDonationPage\n );\n this.hideDonateButton = new FlatButtonWidget(new Dim2i(this.field_22789 - 26, 6, 20, 20), class_2561.method_43470("x"), this::hideDonationButton);\n if (SodiumClientMod.options().notifications.hasClearedDonationButton) {\n this.setDonationButtonVisibility(false);\n }\n\n this.method_37063(this.undoButton);\n this.method_37063(this.applyButton);\n this.method_37063(this.closeButton);\n this.method_37063(this.donateButton);\n this.method_37063(this.hideDonateButton);\n }\n\n private void setDonationButtonVisibility(boolean value) {\n this.donateButton.setVisible(value);\n this.hideDonateButton.setVisible(value);\n }\n\n private void hideDonationButton() {\n SodiumGameOptions options = SodiumClientMod.options();\n options.notifications.hasClearedDonationButton = true;\n\n try {\n SodiumGameOptions.writeToDisk(options);\n } catch (IOException var3) {\n throw new RuntimeException("Failed to save configuration", var3);\n }\n\n this.setDonationButtonVisibility(false);\n }\n\n private void rebuildGUIPages() {\n int x = 6;\n int y = 6;\n\n for (OptionPage page : this.pages) {\n int width = 12 + this.field_22793.method_27525(page.getName());\n FlatButtonWidget button = new FlatButtonWidget(new Dim2i(x, y, width, 18), page.getName(), () -> this.setPage(page));\n button.setSelected(this.currentPage == page);\n x += width + 6;\n this.method_37063(button);\n }\n }\n\n private void rebuildGUIOptions() {\n int x = 6;\n int y = 28;\n\n for (UnmodifiableIterator var3 = this.currentPage.getGroups().iterator(); var3.hasNext(); y += 4) {\n OptionGroup group = (OptionGroup)var3.next();\n\n for (UnmodifiableIterator var5 = group.getOptions().iterator(); var5.hasNext(); y += 18) {\n Option<?> option = (Option<?>)var5.next();\n Control<?> control = option.getControl();\n ControlElement<?> element = control.createElement(new Dim2i(x, y, 240, 18));\n this.method_37063(element);\n this.controls.add(element);\n }\n }\n }\n\n public void method_25394(class_332 graphics, int mouseX, int mouseY, float delta) {\n this.updateControls();\n super.method_25394(graphics, this.prompt != null ? -1 : mouseX, this.prompt != null ? -1 : mouseY, delta);\n if (this.hoveredElement != null) {\n this.renderOptionTooltip(graphics, this.hoveredElement);\n }\n\n if (this.prompt != null) {\n this.prompt.method_25394(graphics, mouseX, mouseY, delta);\n }\n }\n\n private void updateControls() {\n ControlElement<?> hovered = (ControlElement<?>)this.getActiveControls()\n .filter(AbstractWidget::isHovered)\n .findFirst()\n .orElse((ControlElement)this.getActiveControls().filter(AbstractWidget::method_25370).findFirst().orElse(null));\n boolean hasChanges = this.getAllOptions().anyMatch(Option::hasChanged);\n\n for (OptionPage page : this.pages) {\n UnmodifiableIterator var5 = page.getOptions().iterator();\n\n while (var5.hasNext()) {\n Option<?> option = (Option<?>)var5.next();\n if (option.hasChanged()) {\n hasChanges = true;\n }\n }\n }\n\n this.applyButton.setEnabled(hasChanges);\n this.undoButton.setVisible(hasChanges);\n this.closeButton.setEnabled(!hasChanges);\n this.hasPendingChanges = hasChanges;\n this.hoveredElement = hovered;\n }\n\n private Stream<Option<?>> getAllOptions() {\n return this.pages.stream().flatMap(s -> s.getOptions().stream());\n }\n\n private Stream<ControlElement<?>> getActiveControls() {\n return this.controls.stream();\n }\n\n private void renderOptionTooltip(class_332 graphics, ControlElement<?> element) {\n Dim2i dim = element.getDimensions();\n int textPadding = 3;\n int boxPadding = 3;\n int boxY = dim.y();\n int boxX = dim.getLimitX() + boxPadding;\n int boxWidth = Math.min(200, this.field_22789 - boxX - boxPadding);\n Option<?> option = element.getOption();\n int splitWidth = boxWidth - textPadding * 2;\n List<class_5481> tooltip = new ArrayList(this.field_22793.method_1728(option.getTooltip(), splitWidth));\n OptionImpact impact = option.getImpact();\n if (impact != null) {\n class_5250 impactText = class_2561.method_43469("sodium.options.performance_impact_string", new Object[]{impact.getLocalizedName()});\n tooltip.addAll(this.field_22793.method_1728(impactText.method_27692(class_124.field_1080), splitWidth));\n }\n\n int boxHeight = tooltip.size() * 12 + boxPadding;\n int boxYLimit = boxY + boxHeight;\n int boxYCutoff = this.field_22790 - 40;\n if (boxYLimit > boxYCutoff) {\n boxY -= boxYLimit - boxYCutoff;\n }\n\n graphics.method_25296(boxX, boxY, boxX + boxWidth, boxY + boxHeight, -536870912, -536870912);\n\n for (int i = 0; i < tooltip.size(); i++) {\n graphics.method_35720(this.field_22793, (class_5481)tooltip.get(i), boxX + textPadding, boxY + textPadding + i * 12, -1);\n }\n }\n\n private void applyChanges() {\n HashSet<OptionStorage<?>> dirtyStorages = new HashSet();\n EnumSet<OptionFlag> flags = EnumSet.noneOf(OptionFlag.class);\n this.getAllOptions().forEach(option -> {\n if (option.hasChanged()) {\n option.applyChanges();\n flags.addAll(option.getFlags());\n dirtyStorages.add(option.getStorage());\n }\n });\n class_310 client = class_310.method_1551();\n if (client.field_1687 != null) {\n if (flags.contains(OptionFlag.REQUIRES_RENDERER_RELOAD)) {\n client.field_1769.method_3279();\n } else if (flags.contains(OptionFlag.REQUIRES_RENDERER_UPDATE)) {\n client.field_1769.method_3292();\n }\n }\n\n if (flags.contains(OptionFlag.REQUIRES_ASSET_RELOAD)) {\n client.method_24041((Integer)client.field_1690.method_42563().method_41753());\n client.method_1513();\n }\n\n if (flags.contains(OptionFlag.REQUIRES_VIDEOMODE_RELOAD)) {\n client.method_22683().method_4475();\n }\n\n if (flags.contains(OptionFlag.REQUIRES_GAME_RESTART)) {\n Console.instance().logMessage(MessageLevel.WARN, "sodium.console.game_restart", true, 10.0);\n }\n\n for (OptionStorage<?> storage : dirtyStorages) {\n storage.save();\n }\n }\n\n private void undoChanges() {\n this.getAllOptions().forEach(Option::reset);\n }\n\n private void openDonationPage() {\n class_156.method_668().method_670("https://caffeinemc.net/donate");\n }\n\n public boolean method_25404(int keyCode, int scanCode, int modifiers) {\n if (this.prompt != null && this.prompt.method_25404(keyCode, scanCode, modifiers)) {\n return true;\n } else if (this.prompt == null && keyCode == 80 && (modifiers & 1) != 0) {\n class_310.method_1551().method_1507(new class_446(this.prevScreen, class_310.method_1551(), class_310.method_1551().field_1690));\n return true;\n } else {\n return super.method_25404(keyCode, scanCode, modifiers);\n }\n }\n\n public boolean method_25402(double mouseX, double mouseY, int button) {\n if (this.prompt != null) {\n return this.prompt.method_25402(mouseX, mouseY, button);\n } else {\n boolean clicked = super.method_25402(mouseX, mouseY, button);\n if (!clicked) {\n this.method_25395(null);\n return true;\n } else {\n return clicked;\n }\n }\n }\n\n public boolean method_25422() {\n return !this.hasPendingChanges;\n }\n\n public void method_25419() {\n this.field_22787.method_1507(this.prevScreen);\n }\n\n public List<? extends class_364> method_25396() {\n return this.prompt == null ? super.method_25396() : this.prompt.getWidgets();\n }\n\n @Override\n public void setPrompt(@Nullable ScreenPrompt prompt) {\n this.prompt = prompt;\n }\n\n @Nullable\n @Override\n public ScreenPrompt getPrompt() {\n return this.prompt;\n }\n\n @Override\n public Dim2i getDimensions() {\n return new Dim2i(0, 0, this.field_22789, this.field_22790);\n }\n}\n {"url": "https://caffeinemc.net/donate"} low
|
|
5 2 2048cee1aed753e10480183673ffb5e685de2ce414e99e93f7d1dd11a87a19af net/caffeinemc/mods/sodium/client/compatibility/checks/PreLaunchChecks package net.caffeinemc.mods.sodium.client.compatibility.checks;\n\nimport net.caffeinemc.mods.sodium.client.platform.PlatformHelper;\nimport org.lwjgl.Version;\n\npublic class PreLaunchChecks {\n private static final String REQUIRED_LWJGL_VERSION = "3.3.3";\n\n public static void checkEnvironment() {\n if (BugChecks.ISSUE_2561) {\n checkLwjglRuntimeVersion();\n }\n }\n\n private static void checkLwjglRuntimeVersion() {\n if (!isUsingKnownCompatibleLwjglVersion()) {\n String advice;\n if (isUsingPrismLauncher()) {\n advice = "It appears you are using Prism Launcher to start the game. You can likely fix this problem by opening your instance settings and navigating to the Versionsection in the sidebar.";\n } else {\n advice = "You must change the LWJGL version in your launcher to continue. This is usually controlled by the settings for a profile or instance in your launcher.";\n }\n\n String message = "The game failed to start because the currently active LWJGL version is not compatible.\\n\\nInstalled version: ###CURRENT_VERSION###\\nRequired version: ###REQUIRED_VERSION###\\n\\n###ADVICE_STRING###"\n .replace("###CURRENT_VERSION###", Version.getVersion())\n .replace("###REQUIRED_VERSION###", "3.3.3")\n .replace("###ADVICE_STRING###", advice);\n PlatformHelper.showCriticalErrorAndClose(\n null, "Sodium Renderer - Unsupported LWJGL", message, "https://link.caffeinemc.net/help/sodium/runtime-issue/lwjgl3/gh-2561"\n );\n }\n }\n\n private static boolean isUsingKnownCompatibleLwjglVersion() {\n return Version.getVersion().startsWith("3.3.3");\n }\n\n private static boolean isUsingPrismLauncher() {\n return getLauncherBrand().equalsIgnoreCase("PrismLauncher");\n }\n\n private static String getLauncherBrand() {\n return System.getProperty("minecraft.launcher.brand", "unknown");\n }\n}\n {"url": "https://link.caffeinemc.net/help/sodium/runtime-issue/lwjgl3/gh-2561"} low
|
|
6 2 0b9d53bc482f11c0d8c71a9689645132f0a50249838091b3e6f95fefbc279075 net/caffeinemc/mods/sodium/client/compatibility/checks/ModuleScanner package net.caffeinemc.mods.sodium.client.compatibility.checks;\n\nimport com.sun.jna.Platform;\nimport com.sun.jna.platform.win32.Kernel32;\nimport com.sun.jna.platform.win32.Kernel32Util;\nimport com.sun.jna.platform.win32.Tlhelp32.MODULEENTRY32W;\nimport java.nio.file.Files;\nimport java.nio.file.LinkOption;\nimport java.nio.file.Path;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport net.caffeinemc.mods.sodium.client.platform.MessageBox;\nimport net.caffeinemc.mods.sodium.client.platform.NativeWindowHandle;\nimport net.caffeinemc.mods.sodium.client.platform.windows.WindowsFileVersion;\nimport net.caffeinemc.mods.sodium.client.platform.windows.api.version.Version;\nimport net.caffeinemc.mods.sodium.client.platform.windows.api.version.VersionFixedFileInfoStruct;\nimport net.caffeinemc.mods.sodium.client.platform.windows.api.version.VersionInfo;\nimport org.jetbrains.annotations.Nullable;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class ModuleScanner {\n private static final Logger LOGGER = LoggerFactory.getLogger("Sodium-Win32ModuleChecks");\n private static final String[] RTSS_HOOKS_MODULE_NAMES = new String[]{"RTSSHooks64.dll", "RTSSHooks.dll"};\n private static final String[] ASUS_GPU_TWEAK_MODULE_NAMES = new String[]{\n "GTIII-OSD64-GL.dll", "GTIII-OSD-GL.dll", "GTIII-OSD64-VK.dll", "GTIII-OSD-VK.dll", "GTIII-OSD64.dll", "GTIII-OSD.dll"\n };\n\n public static void checkModules(NativeWindowHandle window) {\n List<String> modules;\n try {\n modules = listModules();\n } catch (Throwable var3) {\n LOGGER.warn("Failed to scan the currently loaded modules", var3);\n return;\n }\n\n if (!modules.isEmpty()) {\n if (BugChecks.ISSUE_2048 && isModuleLoaded(modules, RTSS_HOOKS_MODULE_NAMES)) {\n checkRTSSModules(window);\n }\n\n if (BugChecks.ISSUE_2637 && isModuleLoaded(modules, ASUS_GPU_TWEAK_MODULE_NAMES)) {\n checkASUSGpuTweakIII(window);\n }\n }\n }\n\n private static List<String> listModules() {\n if (!Platform.isWindows()) {\n return List.of();\n } else {\n int pid = Kernel32.INSTANCE.GetCurrentProcessId();\n ArrayList<String> modules = new ArrayList();\n\n for (MODULEENTRY32W module : Kernel32Util.getModules(pid)) {\n modules.add(module.szModule());\n }\n\n return Collections.unmodifiableList(modules);\n }\n }\n\n private static void checkRTSSModules(NativeWindowHandle window) {\n LOGGER.warn("RivaTuner Statistics Server (RTSS) has injected into the process! Attempting to apply workarounds for compatibility...");\n WindowsFileVersion version = null;\n\n try {\n version = findRTSSModuleVersion();\n } catch (Throwable var3) {\n LOGGER.warn("Exception thrown while reading file version", var3);\n }\n\n if (version == null) {\n LOGGER.warn("Could not determine version of RivaTuner Statistics Server");\n } else {\n LOGGER.info("Detected RivaTuner Statistics Server version: {}", version);\n }\n\n if (version == null || !isRTSSCompatible(version)) {\n MessageBox.showMessageBox(\n window,\n MessageBox.IconType.ERROR,\n "Sodium Renderer",\n "You appear to be using an older version of RivaTuner Statistics Server (RTSS) which is not compatible with Sodium.\\n\\nYou must either update to a newer version (7.3.4 and later) or close the RivaTuner Statistics Server application.\\n\\nFor more information on how to solve this problem, click the 'Help' button.",\n "https://link.caffeinemc.net/help/sodium/incompatible-software/rivatuner-statistics-server/gh-2048"\n );\n throw new RuntimeException(\n "The installed version of RivaTuner Statistics Server (RTSS) is not compatible with Sodium, see here for more details: https://link.caffeinemc.net/help/sodium/incompatible-software/rivatuner-statistics-server/gh-2048"\n );\n }\n }\n\n private static boolean isRTSSCompatible(WindowsFileVersion version) {\n int x = version.x();\n int y = version.y();\n int z = version.z();\n return x > 7 || x == 7 && y > 3 || x == 7 && y == 3 && z >= 4;\n }\n\n private static void checkASUSGpuTweakIII(NativeWindowHandle window) {\n MessageBox.showMessageBox(\n window,\n MessageBox.IconType.ERROR,\n "Sodium Renderer",\n "ASUS GPU Tweak III is not compatible with Minecraft, and causes extreme performance issues and severe graphical corruption when used with Minecraft.\\n\\nYou *must* do one of the following things to continue:\\n\\na) Open the settings of ASUS GPU Tweak III, enable the Blacklist option, click \\"Browse from file...\\", and select the Java runtime (javaw.exe) which is used by Minecraft.\\n\\nb) Completely uninstall the ASUS GPU Tweak III application.\\n\\nFor more information on how to solve this problem, click the 'Help' button.",\n "https://link.caffeinemc.net/help/sodium/incompatible-software/asus-gtiii/gh-2637"\n );\n throw new RuntimeException(\n "ASUS GPU Tweak III is not compatible with Minecraft, see here for more details: https://link.caffeinemc.net/help/sodium/incompatible-software/asus-gtiii/gh-2637"\n );\n }\n\n @Nullable\n private static WindowsFileVersion findRTSSModuleVersion() {\n long module;\n try {\n module = net.caffeinemc.mods.sodium.client.platform.windows.api.Kernel32.getModuleHandleByNames(RTSS_HOOKS_MODULE_NAMES);\n } catch (Throwable var9) {\n LOGGER.warn("Failed to locate module", var9);\n return null;\n }\n\n String moduleFileName;\n try {\n moduleFileName = net.caffeinemc.mods.sodium.client.platform.windows.api.Kernel32.getModuleFileName(module);\n } catch (Throwable var8) {\n LOGGER.warn("Failed to get path of module", var8);\n return null;\n }\n\n Path modulePath = Path.of(moduleFileName);\n Path moduleDirectory = modulePath.getParent();\n LOGGER.info("Searching directory: {}", moduleDirectory);\n Path executablePath = moduleDirectory.resolve("RTSS.exe");\n if (!Files.exists(executablePath, new LinkOption[0])) {\n LOGGER.warn("Could not find executable: {}", executablePath);\n return null;\n } else {\n LOGGER.info("Parsing file: {}", executablePath);\n VersionInfo version = Version.getModuleFileVersion(executablePath.toAbsolutePath().toString());\n if (version == null) {\n LOGGER.warn("Couldn't find version structure");\n return null;\n } else {\n VersionFixedFileInfoStruct fileVersion = version.queryFixedFileInfo();\n if (fileVersion == null) {\n LOGGER.warn("Couldn't query file version");\n return null;\n } else {\n return WindowsFileVersion.fromFileVersion(fileVersion);\n }\n }\n }\n }\n\n private static boolean isModuleLoaded(List<String> modules, String[] names) {\n for (String name : names) {\n for (String module : modules) {\n if (module.equalsIgnoreCase(name)) {\n return true;\n }\n }\n }\n\n return false;\n }\n}\n {"url": "https://link.caffeinemc.net/help/sodium/incompatible-software/asus-gtiii/gh-2637"} low
|
|
7 2 c7ef03b142e9371c5b10fd54ee7a22060872bd3addb96c6fa21ab10ccdc4b481 net/caffeinemc/mods/sodium/client/compatibility/checks/ModuleScanner package net.caffeinemc.mods.sodium.client.compatibility.checks;\n\nimport com.sun.jna.Platform;\nimport com.sun.jna.platform.win32.Kernel32;\nimport com.sun.jna.platform.win32.Kernel32Util;\nimport com.sun.jna.platform.win32.Tlhelp32.MODULEENTRY32W;\nimport java.nio.file.Files;\nimport java.nio.file.LinkOption;\nimport java.nio.file.Path;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport net.caffeinemc.mods.sodium.client.platform.MessageBox;\nimport net.caffeinemc.mods.sodium.client.platform.NativeWindowHandle;\nimport net.caffeinemc.mods.sodium.client.platform.windows.WindowsFileVersion;\nimport net.caffeinemc.mods.sodium.client.platform.windows.api.version.Version;\nimport net.caffeinemc.mods.sodium.client.platform.windows.api.version.VersionFixedFileInfoStruct;\nimport net.caffeinemc.mods.sodium.client.platform.windows.api.version.VersionInfo;\nimport org.jetbrains.annotations.Nullable;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class ModuleScanner {\n private static final Logger LOGGER = LoggerFactory.getLogger("Sodium-Win32ModuleChecks");\n private static final String[] RTSS_HOOKS_MODULE_NAMES = new String[]{"RTSSHooks64.dll", "RTSSHooks.dll"};\n private static final String[] ASUS_GPU_TWEAK_MODULE_NAMES = new String[]{\n "GTIII-OSD64-GL.dll", "GTIII-OSD-GL.dll", "GTIII-OSD64-VK.dll", "GTIII-OSD-VK.dll", "GTIII-OSD64.dll", "GTIII-OSD.dll"\n };\n\n public static void checkModules(NativeWindowHandle window) {\n List<String> modules;\n try {\n modules = listModules();\n } catch (Throwable var3) {\n LOGGER.warn("Failed to scan the currently loaded modules", var3);\n return;\n }\n\n if (!modules.isEmpty()) {\n if (BugChecks.ISSUE_2048 && isModuleLoaded(modules, RTSS_HOOKS_MODULE_NAMES)) {\n checkRTSSModules(window);\n }\n\n if (BugChecks.ISSUE_2637 && isModuleLoaded(modules, ASUS_GPU_TWEAK_MODULE_NAMES)) {\n checkASUSGpuTweakIII(window);\n }\n }\n }\n\n private static List<String> listModules() {\n if (!Platform.isWindows()) {\n return List.of();\n } else {\n int pid = Kernel32.INSTANCE.GetCurrentProcessId();\n ArrayList<String> modules = new ArrayList();\n\n for (MODULEENTRY32W module : Kernel32Util.getModules(pid)) {\n modules.add(module.szModule());\n }\n\n return Collections.unmodifiableList(modules);\n }\n }\n\n private static void checkRTSSModules(NativeWindowHandle window) {\n LOGGER.warn("RivaTuner Statistics Server (RTSS) has injected into the process! Attempting to apply workarounds for compatibility...");\n WindowsFileVersion version = null;\n\n try {\n version = findRTSSModuleVersion();\n } catch (Throwable var3) {\n LOGGER.warn("Exception thrown while reading file version", var3);\n }\n\n if (version == null) {\n LOGGER.warn("Could not determine version of RivaTuner Statistics Server");\n } else {\n LOGGER.info("Detected RivaTuner Statistics Server version: {}", version);\n }\n\n if (version == null || !isRTSSCompatible(version)) {\n MessageBox.showMessageBox(\n window,\n MessageBox.IconType.ERROR,\n "Sodium Renderer",\n "You appear to be using an older version of RivaTuner Statistics Server (RTSS) which is not compatible with Sodium.\\n\\nYou must either update to a newer version (7.3.4 and later) or close the RivaTuner Statistics Server application.\\n\\nFor more information on how to solve this problem, click the 'Help' button.",\n "https://link.caffeinemc.net/help/sodium/incompatible-software/rivatuner-statistics-server/gh-2048"\n );\n throw new RuntimeException(\n "The installed version of RivaTuner Statistics Server (RTSS) is not compatible with Sodium, see here for more details: https://link.caffeinemc.net/help/sodium/incompatible-software/rivatuner-statistics-server/gh-2048"\n );\n }\n }\n\n private static boolean isRTSSCompatible(WindowsFileVersion version) {\n int x = version.x();\n int y = version.y();\n int z = version.z();\n return x > 7 || x == 7 && y > 3 || x == 7 && y == 3 && z >= 4;\n }\n\n private static void checkASUSGpuTweakIII(NativeWindowHandle window) {\n MessageBox.showMessageBox(\n window,\n MessageBox.IconType.ERROR,\n "Sodium Renderer",\n "ASUS GPU Tweak III is not compatible with Minecraft, and causes extreme performance issues and severe graphical corruption when used with Minecraft.\\n\\nYou *must* do one of the following things to continue:\\n\\na) Open the settings of ASUS GPU Tweak III, enable the Blacklist option, click \\"Browse from file...\\", and select the Java runtime (javaw.exe) which is used by Minecraft.\\n\\nb) Completely uninstall the ASUS GPU Tweak III application.\\n\\nFor more information on how to solve this problem, click the 'Help' button.",\n "https://link.caffeinemc.net/help/sodium/incompatible-software/asus-gtiii/gh-2637"\n );\n throw new RuntimeException(\n "ASUS GPU Tweak III is not compatible with Minecraft, see here for more details: https://link.caffeinemc.net/help/sodium/incompatible-software/asus-gtiii/gh-2637"\n );\n }\n\n @Nullable\n private static WindowsFileVersion findRTSSModuleVersion() {\n long module;\n try {\n module = net.caffeinemc.mods.sodium.client.platform.windows.api.Kernel32.getModuleHandleByNames(RTSS_HOOKS_MODULE_NAMES);\n } catch (Throwable var9) {\n LOGGER.warn("Failed to locate module", var9);\n return null;\n }\n\n String moduleFileName;\n try {\n moduleFileName = net.caffeinemc.mods.sodium.client.platform.windows.api.Kernel32.getModuleFileName(module);\n } catch (Throwable var8) {\n LOGGER.warn("Failed to get path of module", var8);\n return null;\n }\n\n Path modulePath = Path.of(moduleFileName);\n Path moduleDirectory = modulePath.getParent();\n LOGGER.info("Searching directory: {}", moduleDirectory);\n Path executablePath = moduleDirectory.resolve("RTSS.exe");\n if (!Files.exists(executablePath, new LinkOption[0])) {\n LOGGER.warn("Could not find executable: {}", executablePath);\n return null;\n } else {\n LOGGER.info("Parsing file: {}", executablePath);\n VersionInfo version = Version.getModuleFileVersion(executablePath.toAbsolutePath().toString());\n if (version == null) {\n LOGGER.warn("Couldn't find version structure");\n return null;\n } else {\n VersionFixedFileInfoStruct fileVersion = version.queryFixedFileInfo();\n if (fileVersion == null) {\n LOGGER.warn("Couldn't query file version");\n return null;\n } else {\n return WindowsFileVersion.fromFileVersion(fileVersion);\n }\n }\n }\n }\n\n private static boolean isModuleLoaded(List<String> modules, String[] names) {\n for (String name : names) {\n for (String module : modules) {\n if (module.equalsIgnoreCase(name)) {\n return true;\n }\n }\n }\n\n return false;\n }\n}\n {"url": "https://link.caffeinemc.net/help/sodium/incompatible-software/rivatuner-statistics-server/gh-2048"} low
|
|
8 2 54aa6d079497c9fc459f84c660a303496d18fa17c35c0e22cbe2160924de212e net/caffeinemc/mods/sodium/client/compatibility/checks/GraphicsDriverChecks package net.caffeinemc.mods.sodium.client.compatibility.checks;\n\nimport net.caffeinemc.mods.sodium.client.compatibility.environment.GlContextInfo;\nimport net.caffeinemc.mods.sodium.client.compatibility.environment.probe.GraphicsAdapterVendor;\nimport net.caffeinemc.mods.sodium.client.compatibility.workarounds.intel.IntelWorkarounds;\nimport net.caffeinemc.mods.sodium.client.compatibility.workarounds.nvidia.NvidiaDriverVersion;\nimport net.caffeinemc.mods.sodium.client.compatibility.workarounds.nvidia.NvidiaWorkarounds;\nimport net.caffeinemc.mods.sodium.client.platform.NativeWindowHandle;\nimport net.caffeinemc.mods.sodium.client.platform.PlatformHelper;\nimport net.caffeinemc.mods.sodium.client.platform.windows.WindowsFileVersion;\n\nclass GraphicsDriverChecks {\n static void postContextInit(NativeWindowHandle window, GlContextInfo context) {\n GraphicsAdapterVendor vendor = GraphicsAdapterVendor.fromContext(context);\n if (vendor != GraphicsAdapterVendor.UNKNOWN) {\n if (vendor == GraphicsAdapterVendor.INTEL && BugChecks.ISSUE_899) {\n WindowsFileVersion installedVersion = IntelWorkarounds.findIntelDriverMatchingBug899();\n if (installedVersion != null) {\n String installedVersionString = installedVersion.toString();\n PlatformHelper.showCriticalErrorAndClose(\n window,\n "Sodium Renderer - Unsupported Driver",\n "The game failed to start because the currently installed Intel Graphics Driver is not compatible.\\n\\nInstalled version: ###CURRENT_DRIVER###\\nRequired version: 10.18.10.5161 (or newer)\\n\\nPlease click the 'Help' button to read more about how to fix this problem."\n .replace("###CURRENT_DRIVER###", installedVersionString),\n "https://link.caffeinemc.net/help/sodium/graphics-driver/windows/intel/gh-899"\n );\n }\n }\n\n if (vendor == GraphicsAdapterVendor.NVIDIA && BugChecks.ISSUE_1486) {\n WindowsFileVersion installedVersion = NvidiaWorkarounds.findNvidiaDriverMatchingBug1486();\n if (installedVersion != null) {\n String installedVersionString = NvidiaDriverVersion.parse(installedVersion).toString();\n PlatformHelper.showCriticalErrorAndClose(\n window,\n "Sodium Renderer - Unsupported Driver",\n "The game failed to start because the currently installed NVIDIA Graphics Driver is not compatible.\\n\\nInstalled version: ###CURRENT_DRIVER###\\nRequired version: 536.23 (or newer)\\n\\nPlease click the 'Help' button to read more about how to fix this problem."\n .replace("###CURRENT_DRIVER###", installedVersionString),\n "https://link.caffeinemc.net/help/sodium/graphics-driver/windows/nvidia/gh-1486"\n );\n }\n }\n }\n }\n}\n {"url": "https://link.caffeinemc.net/help/sodium/graphics-driver/windows/nvidia/gh-1486"} low
|
|
9 2 5ff865ff6c2e250096fb15b9a943c645deb8558eddc72fa1b492748eb2c78b32 net/caffeinemc/mods/sodium/client/compatibility/checks/GraphicsDriverChecks package net.caffeinemc.mods.sodium.client.compatibility.checks;\n\nimport net.caffeinemc.mods.sodium.client.compatibility.environment.GlContextInfo;\nimport net.caffeinemc.mods.sodium.client.compatibility.environment.probe.GraphicsAdapterVendor;\nimport net.caffeinemc.mods.sodium.client.compatibility.workarounds.intel.IntelWorkarounds;\nimport net.caffeinemc.mods.sodium.client.compatibility.workarounds.nvidia.NvidiaDriverVersion;\nimport net.caffeinemc.mods.sodium.client.compatibility.workarounds.nvidia.NvidiaWorkarounds;\nimport net.caffeinemc.mods.sodium.client.platform.NativeWindowHandle;\nimport net.caffeinemc.mods.sodium.client.platform.PlatformHelper;\nimport net.caffeinemc.mods.sodium.client.platform.windows.WindowsFileVersion;\n\nclass GraphicsDriverChecks {\n static void postContextInit(NativeWindowHandle window, GlContextInfo context) {\n GraphicsAdapterVendor vendor = GraphicsAdapterVendor.fromContext(context);\n if (vendor != GraphicsAdapterVendor.UNKNOWN) {\n if (vendor == GraphicsAdapterVendor.INTEL && BugChecks.ISSUE_899) {\n WindowsFileVersion installedVersion = IntelWorkarounds.findIntelDriverMatchingBug899();\n if (installedVersion != null) {\n String installedVersionString = installedVersion.toString();\n PlatformHelper.showCriticalErrorAndClose(\n window,\n "Sodium Renderer - Unsupported Driver",\n "The game failed to start because the currently installed Intel Graphics Driver is not compatible.\\n\\nInstalled version: ###CURRENT_DRIVER###\\nRequired version: 10.18.10.5161 (or newer)\\n\\nPlease click the 'Help' button to read more about how to fix this problem."\n .replace("###CURRENT_DRIVER###", installedVersionString),\n "https://link.caffeinemc.net/help/sodium/graphics-driver/windows/intel/gh-899"\n );\n }\n }\n\n if (vendor == GraphicsAdapterVendor.NVIDIA && BugChecks.ISSUE_1486) {\n WindowsFileVersion installedVersion = NvidiaWorkarounds.findNvidiaDriverMatchingBug1486();\n if (installedVersion != null) {\n String installedVersionString = NvidiaDriverVersion.parse(installedVersion).toString();\n PlatformHelper.showCriticalErrorAndClose(\n window,\n "Sodium Renderer - Unsupported Driver",\n "The game failed to start because the currently installed NVIDIA Graphics Driver is not compatible.\\n\\nInstalled version: ###CURRENT_DRIVER###\\nRequired version: 536.23 (or newer)\\n\\nPlease click the 'Help' button to read more about how to fix this problem."\n .replace("###CURRENT_DRIVER###", installedVersionString),\n "https://link.caffeinemc.net/help/sodium/graphics-driver/windows/nvidia/gh-1486"\n );\n }\n }\n }\n }\n}\n {"url": "https://link.caffeinemc.net/help/sodium/graphics-driver/windows/intel/gh-899"} low
|
|
10 2 dcf24bb91e7861b7a382958053c3efc201684e93df7ce058e849effa3f947fb0 net/caffeinemc/mods/sodium/client/checks/ResourcePackScanner package net.caffeinemc.mods.sodium.client.checks;\n\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Set;\nimport net.caffeinemc.mods.sodium.client.console.Console;\nimport net.caffeinemc.mods.sodium.client.console.message.MessageLevel;\nimport net.minecraft.class_3258;\nimport net.minecraft.class_3259;\nimport net.minecraft.class_3262;\nimport net.minecraft.class_3264;\nimport net.minecraft.class_3300;\nimport org.jetbrains.annotations.NotNull;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class ResourcePackScanner {\n private static final Logger LOGGER = LoggerFactory.getLogger("Sodium-ResourcePackScanner");\n private static final Set<String> SHADER_PROGRAM_BLACKLIST = Set.of(\n "rendertype_solid.vsh",\n "rendertype_solid.fsh",\n "rendertype_solid.json",\n "rendertype_cutout_mipped.vsh",\n "rendertype_cutout_mipped.fsh",\n "rendertype_cutout_mipped.json",\n "rendertype_cutout.vsh",\n "rendertype_cutout.fsh",\n "rendertype_cutout.json",\n "rendertype_translucent.vsh",\n "rendertype_translucent.fsh",\n "rendertype_translucent.json",\n "rendertype_tripwire.vsh",\n "rendertype_tripwire.fsh",\n "rendertype_tripwire.json",\n "rendertype_clouds.vsh",\n "rendertype_clouds.fsh",\n "rendertype_clouds.json"\n );\n private static final Set<String> SHADER_INCLUDE_BLACKLIST = Set.of("light.glsl", "fog.glsl");\n\n public static void checkIfCoreShaderLoaded(class_3300 manager) {\n List<ResourcePackScanner.ScannedResourcePack> outputs = manager.method_29213()\n .filter(ResourcePackScanner::isExternalResourcePack)\n .map(ResourcePackScanner::scanResources)\n .toList();\n printToasts(outputs);\n printCompatibilityReport(outputs);\n }\n\n private static void printToasts(Collection<ResourcePackScanner.ScannedResourcePack> resourcePacks) {\n List<ResourcePackScanner.ScannedResourcePack> incompatibleResourcePacks = resourcePacks.stream().filter(pack -> !pack.shaderPrograms.isEmpty()).toList();\n List<ResourcePackScanner.ScannedResourcePack> likelyIncompatibleResourcePacks = resourcePacks.stream()\n .filter(pack -> !pack.shaderIncludes.isEmpty())\n .filter(pack -> !incompatibleResourcePacks.contains(pack))\n .toList();\n boolean shown = false;\n if (!incompatibleResourcePacks.isEmpty()) {\n showConsoleMessage("sodium.console.core_shaders_error", true, MessageLevel.SEVERE);\n\n for (ResourcePackScanner.ScannedResourcePack entry : incompatibleResourcePacks) {\n showConsoleMessage(getResourcePackName(entry.resourcePack), false, MessageLevel.SEVERE);\n }\n\n shown = true;\n }\n\n if (!likelyIncompatibleResourcePacks.isEmpty()) {\n showConsoleMessage("sodium.console.core_shaders_warn", true, MessageLevel.WARN);\n\n for (ResourcePackScanner.ScannedResourcePack entry : likelyIncompatibleResourcePacks) {\n showConsoleMessage(getResourcePackName(entry.resourcePack), false, MessageLevel.WARN);\n }\n\n shown = true;\n }\n\n if (shown) {\n showConsoleMessage("sodium.console.core_shaders_info", true, MessageLevel.INFO);\n }\n }\n\n private static void printCompatibilityReport(Collection<ResourcePackScanner.ScannedResourcePack> scanResults) {\n StringBuilder builder = new StringBuilder();\n\n for (ResourcePackScanner.ScannedResourcePack entry : scanResults) {\n if (!entry.shaderPrograms.isEmpty() || !entry.shaderIncludes.isEmpty()) {\n builder.append("- Resource pack: ").append(getResourcePackName(entry.resourcePack)).append("\\n");\n if (!entry.shaderPrograms.isEmpty()) {\n emitProblem(\n builder,\n "The resource pack replaces terrain shaders, which are not supported",\n "https://github.com/CaffeineMC/sodium/wiki/Resource-Packs",\n entry.shaderPrograms\n );\n }\n\n if (!entry.shaderIncludes.isEmpty()) {\n emitProblem(\n builder,\n "The resource pack modifies shader include files, which are not fully supported",\n "https://github.com/CaffeineMC/sodium/wiki/Resource-Packs",\n entry.shaderIncludes\n );\n }\n }\n }\n\n if (!builder.isEmpty()) {\n LOGGER.error("The following compatibility issues were found with installed resource packs:\\n{}", builder);\n }\n }\n\n private static void emitProblem(StringBuilder builder, String description, String url, List<String> resources) {\n builder.append("\\t- Problem found: ").append("\\n");\n builder.append("\\t\\t- Description:\\n\\t\\t\\t").append(description).append("\\n");\n builder.append("\\t\\t- More information: ").append(url).append("\\n");\n builder.append("\\t\\t- Files: ").append("\\n");\n\n for (String resource : resources) {\n builder.append("\\t\\t\\t- ").append(resource).append("\\n");\n }\n }\n\n @NotNull\n private static ResourcePackScanner.ScannedResourcePack scanResources(class_3262 resourcePack) {\n List<String> ignoredShaders = determineIgnoredShaders(resourcePack);\n if (!ignoredShaders.isEmpty()) {\n LOGGER.warn(\n "Resource pack '{}' indicates the following shaders should be ignored: {}", getResourcePackName(resourcePack), String.join(", ", ignoredShaders)\n );\n }\n\n ArrayList<String> unsupportedShaderPrograms = new ArrayList();\n ArrayList<String> unsupportedShaderIncludes = new ArrayList();\n resourcePack.method_14408(class_3264.field_14188, "minecraft", "shaders", (identifier, supplier) -> {\n String path = identifier.method_12832();\n String name = path.substring(path.lastIndexOf(47) + 1);\n if (!ignoredShaders.contains(name)) {\n if (SHADER_PROGRAM_BLACKLIST.contains(name)) {\n unsupportedShaderPrograms.add(path);\n } else if (SHADER_INCLUDE_BLACKLIST.contains(name)) {\n unsupportedShaderIncludes.add(path);\n }\n }\n });\n return new ResourcePackScanner.ScannedResourcePack(resourcePack, unsupportedShaderPrograms, unsupportedShaderIncludes);\n }\n\n private static boolean isExternalResourcePack(class_3262 pack) {\n return pack instanceof class_3259 || pack instanceof class_3258;\n }\n\n private static String getResourcePackName(class_3262 pack) {\n String path = pack.method_14409();\n return path.startsWith("file/") ? path.substring(5) : path;\n }\n\n private static List<String> determineIgnoredShaders(class_3262 resourcePack) {\n ArrayList<String> ignoredShaders = new ArrayList();\n\n try {\n SodiumResourcePackMetadata meta = (SodiumResourcePackMetadata)resourcePack.method_14407(SodiumResourcePackMetadata.SERIALIZER);\n if (meta != null) {\n ignoredShaders.addAll(meta.ignoredShaders());\n }\n } catch (IOException var3) {\n LOGGER.error("Failed to load pack.mcmeta file for resource pack '{}'", resourcePack.method_14409());\n }\n\n return ignoredShaders;\n }\n\n private static void showConsoleMessage(String message, boolean translatable, MessageLevel messageLevel) {\n Console.instance().logMessage(messageLevel, message, translatable, 12.5);\n }\n\n private record ScannedResourcePack(class_3262 resourcePack, ArrayList<String> shaderPrograms, ArrayList<String> shaderIncludes) {\n }\n}\n {"url": "https://github.com/CaffeineMC/sodium/wiki/Resource-Packs"} low
|
|
11 3 fc7e089f517eab447befde28ce1b5b2438bc5a08131eb338adeaaacbdef7d6cf net/fabricmc/fabric/impl/base/event/EventFactoryImpl \N {} low
|
|
12 4 967302d02a45f4cfa29af6604a50d12097295caa1aabff33b1a3d8e7638f9962 net/caffeinemc/mods/sodium/client/platform/windows/WindowsFileVersion package net.caffeinemc.mods.sodium.client.platform.windows;\n\nimport net.caffeinemc.mods.sodium.client.platform.windows.api.version.VersionFixedFileInfoStruct;\nimport org.jetbrains.annotations.NotNull;\n\npublic record WindowsFileVersion(int x, int y, int z, int w) {\n @NotNull\n public static WindowsFileVersion fromFileVersion(VersionFixedFileInfoStruct fileVersion) {\n int x = fileVersion.getFileVersionMostSignificantBits() >>> 16 & 65535;\n int y = fileVersion.getFileVersionMostSignificantBits() >>> 0 & 65535;\n int z = fileVersion.getFileVersionLeastSignificantBits() >>> 16 & 65535;\n int w = fileVersion.getFileVersionLeastSignificantBits() >>> 0 & 65535;\n return new WindowsFileVersion(x, y, z, w);\n }\n\n public String toString() {\n return "%s.%s.%s.%s".formatted(this.x, this.y, this.z, this.w);\n }\n}\n {} high
|
|
13 5 7005a5b5d443c84d758eceb963351a357d93b5c15eeb19caf20aae99d65a623b net/caffeinemc/mods/sodium/desktop/LaunchWarn package net.caffeinemc.mods.sodium.desktop;\n\nimport java.awt.GraphicsEnvironment;\nimport java.io.IOException;\nimport javax.swing.JDialog;\nimport javax.swing.JOptionPane;\nimport javax.swing.UIManager;\nimport javax.swing.UnsupportedLookAndFeelException;\nimport net.caffeinemc.mods.sodium.desktop.utils.browse.BrowseUrlHandler;\n\npublic class LaunchWarn {\n private static final String HELP_URL = "https://link.caffeinemc.net/guides/sodium/installation";\n private static final String RICH_MESSAGE = "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then click the \\"Help\\" button for an installation guide.</p></body></html>";\n private static final String FALLBACK_MESSAGE = "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then visit <i>https://link.caffeinemc.net/guides/sodium/installation</i> for an installation guide.</p></body></html>";\n private static final String FAILED_TO_BROWSE_MESSAGE = "<html><body><p style='width: 400px; padding: 0 0 8px 0;'>Failed to open the default browser! Your system may be misconfigured. Please open the URL <i>https://link.caffeinemc.net/guides/sodium/installation</i> manually.</p></body></html>";\n public static final String WINDOW_TITLE = "Sodium";\n\n public static void main(String[] args) {\n if (GraphicsEnvironment.isHeadless()) {\n showHeadlessError();\n } else {\n showGraphicalError();\n }\n }\n\n private static void showHeadlessError() {\n System.err\n .println(\n "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then visit <i>https://link.caffeinemc.net/guides/sodium/installation</i> for an installation guide.</p></body></html>"\n );\n }\n\n private static void showGraphicalError() {\n trySetSystemLookAndFeel();\n trySetSystemFontPreferences();\n BrowseUrlHandler browseUrlHandler = BrowseUrlHandler.createImplementation();\n if (browseUrlHandler != null) {\n showRichGraphicalDialog(browseUrlHandler);\n } else {\n showFallbackGraphicalDialog();\n }\n\n System.exit(0);\n }\n\n private static void showRichGraphicalDialog(BrowseUrlHandler browseUrlHandler) {\n int selectedOption = showDialogBox(\n "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then click the \\"Help\\" button for an installation guide.</p></body></html>",\n "Sodium",\n 0,\n 1,\n new String[]{"Help", "Close"},\n 0\n );\n if (selectedOption == 0) {\n log("Opening URL: https://link.caffeinemc.net/guides/sodium/installation");\n\n try {\n browseUrlHandler.browseTo("https://link.caffeinemc.net/guides/sodium/installation");\n } catch (IOException var3) {\n log("Failed to open default web browser!", var3);\n showDialogBox(\n "<html><body><p style='width: 400px; padding: 0 0 8px 0;'>Failed to open the default browser! Your system may be misconfigured. Please open the URL <i>https://link.caffeinemc.net/guides/sodium/installation</i> manually.</p></body></html>",\n "Sodium",\n -1,\n 2,\n null,\n -1\n );\n }\n }\n }\n\n private static void showFallbackGraphicalDialog() {\n showDialogBox(\n "<html><body><p style='width: 600px; padding: 0 0 8px 0;'>You have tried to launch Sodium (a Minecraft mod) directly, but it is not an executable program or mod installer. Instead, you must install Fabric Loader for Minecraft, and then place this file in your mods directory.</p><p style='width: 600px; padding: 0 0 8px 0;'>If this is your first time installing mods with Fabric Loader, then visit <i>https://link.caffeinemc.net/guides/sodium/installation</i> for an installation guide.</p></body></html>",\n "Sodium",\n -1,\n 1,\n null,\n null\n );\n }\n\n private static int showDialogBox(String message, String title, int optionType, int messageType, String[] options, Object initialValue) {\n JOptionPane pane = new JOptionPane(message, messageType, optionType, null, options, initialValue);\n JDialog dialog = pane.createDialog(title);\n dialog.setVisible(true);\n Object selectedValue = pane.getValue();\n if (selectedValue == null) {\n return -1;\n } else if (options == null) {\n return selectedValue instanceof Integer ? (Integer)selectedValue : -1;\n } else {\n for (int counter = 0; counter < options.length; counter++) {\n String option = options[counter];\n if (option.equals(selectedValue)) {\n return counter;\n }\n }\n\n return -1;\n }\n }\n\n private static void trySetSystemLookAndFeel() {\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (UnsupportedLookAndFeelException | ReflectiveOperationException var1) {\n }\n }\n\n private static void trySetSystemFontPreferences() {\n System.setProperty("awt.useSystemAAFontSettings", "on");\n }\n\n private static void log(String message) {\n System.err.println(message);\n }\n\n private static void log(String message, Throwable exception) {\n System.err.println(message);\n exception.printStackTrace(System.err);\n }\n}\n {} low
|
|
\.
|
|
|
|
|
|
--
|
|
-- Name: delphi_report_issue_details_id_seq; Type: SEQUENCE SET; Schema: public; Owner: labrinth
|
|
--
|
|
|
|
SELECT pg_catalog.setval('public.delphi_report_issue_details_id_seq', 13, true);
|
|
|
|
|
|
--
|
|
-- Name: delphi_report_issues_id_seq; Type: SEQUENCE SET; Schema: public; Owner: labrinth
|
|
--
|
|
|
|
SELECT pg_catalog.setval('public.delphi_report_issues_id_seq', 5, true);
|
|
|
|
|
|
--
|
|
-- Name: delphi_reports_id_seq; Type: SEQUENCE SET; Schema: public; Owner: labrinth
|
|
--
|
|
|
|
SELECT pg_catalog.setval('public.delphi_reports_id_seq', 1, true);
|
|
|
|
|
|
--
|
|
-- PostgreSQL database dump complete
|
|
--
|
|
|
|
\unrestrict RGysBmMc8KFBQ9AssusGyNPozUiB43hdmIPxlv5KSWbX7tdW7XVMPpMginvod9K
|