Revert "register JDBC driver to work around Forge bug"
This reverts commit ce0e173a9e.
This commit is contained in:
parent
606b9e1c1e
commit
bcb55c5a67
|
|
@ -151,9 +151,7 @@ dependencies {
|
||||||
// modImplementation project(":myproject")
|
// modImplementation project(":myproject")
|
||||||
|
|
||||||
// embedd the JDBC driver in the mod using jarJar
|
// embedd the JDBC driver in the mod using jarJar
|
||||||
// JDBC driver auto-detection is broken in Forge as of v47.4.0
|
runtimeOnly "com.mysql:mysql-connector-j:${jdbc_version}"
|
||||||
// i.e. we need to need it both at compile and runtime
|
|
||||||
implementation "com.mysql:mysql-connector-j:${jdbc_version}"
|
|
||||||
jarJar "com.mysql:mysql-connector-j:${jdbc_version}"
|
jarJar "com.mysql:mysql-connector-j:${jdbc_version}"
|
||||||
additionalRuntimeClasspath "com.mysql:mysql-connector-j:${jdbc_version}"
|
additionalRuntimeClasspath "com.mysql:mysql-connector-j:${jdbc_version}"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,9 @@ import vip.fubuki.playersync.sync.VanillaSync;
|
||||||
import vip.fubuki.playersync.util.JDBCsetUp;
|
import vip.fubuki.playersync.util.JDBCsetUp;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DriverManager;
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Statement;
|
import java.sql.Statement;
|
||||||
import com.mysql.cj.jdbc.Driver;
|
|
||||||
|
|
||||||
@Mod(PlayerSync.MODID)
|
@Mod(PlayerSync.MODID)
|
||||||
public class PlayerSync {
|
public class PlayerSync {
|
||||||
|
|
@ -36,14 +34,6 @@ public class PlayerSync {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void commonSetup(final FMLCommonSetupEvent event) {
|
private void commonSetup(final FMLCommonSetupEvent event) {
|
||||||
// JDBC driver auto-detection is broken in Forge as of v47.4.0
|
|
||||||
// We need to register the driver manually
|
|
||||||
try {
|
|
||||||
DriverManager.registerDriver(new Driver());
|
|
||||||
} catch (SQLException e) {
|
|
||||||
LOGGER.error("Unable to register JDBC MySQL driver", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
VanillaSync.register();
|
VanillaSync.register();
|
||||||
event.enqueueWork(() -> {
|
event.enqueueWork(() -> {
|
||||||
// read SYNC_CHAT only within the enqueueWork to reliably get the real
|
// read SYNC_CHAT only within the enqueueWork to reliably get the real
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user