Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

steakmans

Members
  • Posts

    12
  • Joined

  • Last visited

steakmans's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. It would be a selection menu for spells so a screen
  2. Hello, I would like to create a custom gui for my mod. I've already created custom guis for 1.12.2 but i can't figure out how to do it in 1.17.1.
  3. So here is the method were i'm trying to connect: public void serverStarting(FMLServerStartingEvent e) { mysql.connect("localhost", 3306, "db", "user", "mdp"); } And here is the class with all the functions private Connection conn; public void connect(String host, int port, String database, String user, String password) { if(!isConnected()){ try { conn = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database, user, password); } catch (SQLException e) { e.printStackTrace(); } } } public void disconnect(){ if(isConnected()){ try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } public boolean isConnected(){ try { if((conn == null) || (conn.isClosed()) || conn.isValid(5)){ return false; } return true; } catch (SQLException e) { e.printStackTrace(); } return false; } public Connection getConnection() { return conn; } I'm dumb I forgot to shade the mysql driver
  4. Here it is: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/spell?autoReconnect=true&useSSL=false at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:702) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228) at TRANSFORMER/spellmod@0.0NONE/fr.steakmans.spellmod.mysql.Mysql.connect(Mysql.java:14) at TRANSFORMER/spellmod@0.0NONE/fr.steakmans.spellmod.Main.serverStarting(Main.java:51) at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) at TRANSFORMER/forge@37.0.58/net.minecraftforge.fmllegacy.server.ServerLifecycleHooks.handleServerStarting(ServerLifecycleHooks.java:101) at TRANSFORMER/minecraft@1.17.1/net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:211) at TRANSFORMER/minecraft@1.17.1/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:659) at TRANSFORMER/minecraft@1.17.1/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258)
  5. Hello, I'm trying to connect my mod to a mysql database and I get an SQLException. Here are the dependencies and repos of my build.gradle repositories { // Put repositories for dependencies here // ForgeGradle automatically adds the Forge maven and Maven Central for you // If you have mod jar dependencies in ./libs, you can declare them as a repository like so: // flatDir { // dir 'libs' // } } dependencies { minecraft 'net.minecraftforge:forge:1.17.1-37.0.58' implementation 'mysql:mysql-connector-java:8.0.26' }
  6. Does the Capabilities are reseted on player death?
  7. It's maybe a dumb question but are capabilities reseted at death?
  8. Hello, I'm trying to make a spell mod and I want to store a the levels of the player in a json file.
  9. Hello, I was searching of how to add achievements to my mod and almost found anything. So if someone can tell me what do I need to do to add advancement that would be very helpful.
  10. Thanks, and sorry for the subform it was my first one.
  11. Hello, I am trying to add a dimension to my mod so I created a json file in data/modid/dimension/test_dimension.json but i can't acces that dimension.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.