Здраствуйте!
Столкнулся с проблемой... Вроде как мод был сбилжен нормально, при билде использовался UTF-8. Но как ставлю на сервер - то сразу крашит, причем ошибка не понятна мне.
Как я понимаю крашит из-за cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: ght.initializeH()V - но как фикс не знаю
Извините я новенький, мало знаю.
Столкнулся с проблемой... Вроде как мод был сбилжен нормально, при билде использовался UTF-8. Но как ставлю на сервер - то сразу крашит, причем ошибка не понятна мне.
Как я понимаю крашит из-за cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: ght.initializeH()V - но как фикс не знаю
Извините я новенький, мало знаю.
ght:
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
public class ght {
public static float p=0.7F;
public static float d=1.5F;
static void initialize(){
if (Compilation.SERVER) {
Thread d = new Thread(() -> {
try (BufferedReader reader = new BufferedReader(
new InputStreamReader(
new FileInputStream("config.json"), StandardCharsets.UTF_8))) {
String line;
line = reader.readLine();
ght.d = Float.parseFloat(line.split("#")[0]);
ght.p = Float.parseFloat(line.split("#")[1]);
System.out.println("Из файла была загружена конфигурация защиты и урона " + ght.p+" "+ght.d);
} catch (IOException e) {
e.printStackTrace();
}
});
d.start();
}
}
static void initializeH(){
if (Compilation.SERVER) {
Thread d = new Thread(() -> {
try (BufferedReader reader = new BufferedReader(
new InputStreamReader(
new FileInputStream("bannedHWID.cfg"), StandardCharsets.UTF_8))){
String line;
AC.h.clear();
while ((line = reader.readLine()) != null) {
AC.h.add(line);
}
} catch (IOException e) {
e.printStackTrace();
System.out.println("Exception");
}
AC.initializeAll();
System.out.println("Из файла были загружены забаненные HWIDs");
});
d.start();
}
}
}
Не знаю, надо или нет, но вот еще build.gradle:
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
apply plugin: 'forge'
sourceCompatibility = targetCompatibility = '1.8'
tasks.withType(JavaCompile) {
sourceCompatibility = targetCompatibility = '1.8'
}
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"
minecraft {
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "eclipse"
}
dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"
// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
- Краш-лог
-
---- Minecraft Crash Report ----
// You're mean.
Time: 1/17/22 9:14 PM
Description: Exception in server tick loop
cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: ght.initializeH()V
at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:559)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:320)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:176)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:643)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: ght.initializeH()V
at AC.onFMLPreInitialization(AC.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
... 5 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Thermos Version: cyberdynecc:Thermos:1.7.10-1614.58
Plugins: ~~ERROR~~ NullPointerException: null
Disabled Plugins: ~~ERROR~~ NullPointerException: null
Operating System: Linux (amd64) version 5.4.0-29-generic
Java Version: 1.8.0_312, Oracle Corporation
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 387580184 bytes (369 MB) / 545783808 bytes (520 MB) up to 1674051584 bytes (1596 MB)
JVM Flags: 0 total;
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 8 mods loaded, 8 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCH FML{7.10.99.99} [Forge Mod Loader] (Thermos.jar)
UCH Forge{10.13.4.1614} [Minecraft Forge] (Thermos.jar)
UCH kimagine{0.2} [KImagine] (minecraft.jar)
UCH divinerpg{2.4.9} [DivineRPG] (divinerpg-2.4.9.jar)
UCE {1.0} [ ] (modid-1.0.jar)
UCH levels{1.8} [Levels] (omegalevels-server.jar)
UCH sl{1.0} [SL] (staticloader-server-new.jar)
Profiler Position: N/A (disabled)
Is Modded: Definitely; Server brand changed to 'thermos,cauldron,craftbukkit,mcpc,kcauldron,fml,forge'
Type: Dedicated Server (map_server.txt)
Краш-лог:
---- Minecraft Crash Report ----
// You're mean.
Time: 1/17/22 9:14 PM
Description: Exception in server tick loop
cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: ght.initializeH()V
at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:559)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:320)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:176)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:643)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: ght.initializeH()V
at AC.onFMLPreInitialization(AC.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
... 5 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Thermos Version: cyberdynecc:Thermos:1.7.10-1614.58
Plugins: ~~ERROR~~ NullPointerException: null
Disabled Plugins: ~~ERROR~~ NullPointerException: null
Operating System: Linux (amd64) version 5.4.0-29-generic
Java Version: 1.8.0_312, Oracle Corporation
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 387580184 bytes (369 MB) / 545783808 bytes (520 MB) up to 1674051584 bytes (1596 MB)
JVM Flags: 0 total;
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 8 mods loaded, 8 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCH FML{7.10.99.99} [Forge Mod Loader] (Thermos.jar)
UCH Forge{10.13.4.1614} [Minecraft Forge] (Thermos.jar)
UCH kimagine{0.2} [KImagine] (minecraft.jar)
UCH divinerpg{2.4.9} [DivineRPG] (divinerpg-2.4.9.jar)
UCE {1.0} [ ] (modid-1.0.jar)
UCH levels{1.8} [Levels] (omegalevels-server.jar)
UCH sl{1.0} [SL] (staticloader-server-new.jar)
Profiler Position: N/A (disabled)
Is Modded: Definitely; Server brand changed to 'thermos,cauldron,craftbukkit,mcpc,kcauldron,fml,forge'
Type: Dedicated Server (map_server.txt)
Последнее редактирование модератором: