OpenMods / OpenPeripheral

https://openmods.info
MIT License
67 stars 25 forks source link

Support for LanteaCraft #108

Closed LemADEC closed 10 years ago

LemADEC commented 10 years ago

LanteaCraft is an improved remake of SGcraft. It appears OpenPeripheral is having difficulties to handle it:

2014-02-02 13:31:31 [Avertissement] [OpenMods] Integration module 'SGCraft' failed during operation 'init' and will be disabled
java.lang.RuntimeException: java.lang.ClassNotFoundException: gcewing.sg.SGBaseTE
    at com.google.common.base.Throwables.propagate(Throwables.java:160)
    at openperipheral.util.ReflectionHelper.getClass(ReflectionHelper.java:128)
    at openperipheral.integration.sgcraft.AdapterStargate.<init>(AdapterStargate.java:11)
    at openperipheral.integration.sgcraft.ModuleSgCraft.init(ModuleSgCraft.java:21)
    at openperipheral.IntegrationModuleRegistry$1.visit(IntegrationModuleRegistry.java:64)
    at openperipheral.IntegrationModuleRegistry.visitModules(IntegrationModuleRegistry.java:52)
    at openperipheral.IntegrationModuleRegistry.initAllModules(IntegrationModuleRegistry.java:61)
    at openperipheral.OpenPeripheralCore.init(OpenPeripheralCore.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
    at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
    at com.google.common.eventbus.EventBus.post(EventBus.java:267)
    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
    at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
    at com.google.common.eventbus.EventBus.post(EventBus.java:267)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
    at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:509)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
    at net.minecraft.client.main.Main.main(SourceFile:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
Caused by: java.lang.ClassNotFoundException: gcewing.sg.SGBaseTE
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at openperipheral.util.ReflectionHelper.getClass(ReflectionHelper.java:126)
    ... 42 more
Caused by: java.lang.NullPointerException

LanteaCraft is available here: http://www.minecraftforum.net/topic/2059956-

mikeemoo commented 10 years ago

This is what, the 3rd remake of SGCraft? Each using the same ModID but completely different classes..

CaitlynMainer commented 10 years ago

Mikee we discussed this at length in the #OpenMods channel awhile back, I even asked if the ModID being the same but it missing the original classes would be an issue, to which you replied no. So, sup wit dat? :P

mikeemoo commented 10 years ago

I may well have been drunk

boq commented 10 years ago

Looks like two mods have same mod id AND same class names (otherwise one tile entity wouldn't be recognized as peripheral) but different methods. And without proper, public API we have to rely on reflection calls to specific methods.

It is almost impossible (or at least very annoying and bug prone) to create one adapter for two separate classes. It would work, if class names were different or there was common interface.

LemADEC commented 10 years ago

Could we choose the version through a configuration?

CaitlynMainer commented 10 years ago

Well, soon(tm) LanteaCraft will have it's own ModID. Soon as in the next release which could be anywhere from tomorrow to a few months from now.