Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

cadenwolfdog

Members
  • Joined

  • Last visited

  1. cadenwolfdog joined the community
  2. I am currently trying to make a mod with a database using SnakeYAML. I am currently using VSCODE, Minecraft forge version 1.19, and Forge Gradle. I was previously trying to use SQLite, but had the same error so I switched to Snake. I have experience with Java, but no experience with SnakeYAML or Minecraft modding so let me know if I'm missing something. I have cleaned and rebuilt multiple times. I have also assured that SnakeYAML is being built into the .jar, which it is (It is listed as a dependency for the jar when built.) Exception message: java.lang.ClassNotFoundException: org.yaml.snakeyaml.DumperOptions DatabaseManager (where I intialize the SnakeYAML class): package me.cadenwolfdog.furclasses.Data; import me.cadenwolfdog.furclasses.PlayerClass; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.Yaml; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.UUID; public class DatabaseManager { private static final File configFile = new File("mods/FurClasses/players.yaml"); private static final DumperOptions options = new DumperOptions(); private static final Yaml yaml = new Yaml(options); private static final Map<UUID, PlayerClass> playerData = new HashMap<>(); public static void initializeDatabase() { configFile.getParentFile().mkdirs(); if (!configFile.exists()) { try { configFile.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } } public static void setPlayerClass(UUID playerUUID, PlayerClass playerClass) { playerData.put(playerUUID, playerClass); try (FileWriter writer = new FileWriter(configFile)) { yaml.dump(playerData, writer); } catch (IOException e) { e.printStackTrace(); } } public static PlayerClass getPlayerClass(UUID playerUUID) { return playerData.get(playerUUID); } } The common set up where I am running the database initialization: private void commonSetup(final FMLCommonSetupEvent event) { // Some common setup code LOGGER.info("HELLO FROM COMMON SETUP"); try{ DatabaseManager.initializeDatabase(); }catch (Exception e){ LOGGER.info("EXCEPTION MADE: " + e.toString()); } finally { LOGGER.info("Database initialization successful."); } }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.