Hbm's Nuclear Tech Mod

Hbm's Nuclear Tech Mod

1M Downloads

TestObj model file is missing

Syncinus opened this issue ยท 8 comments

commented

I was trying to mess around with the mod source when this happened.

Caught exception from hbm
net.minecraftforge.client.model.ModelFormatException: IO Exception reading model format
	at net.minecraftforge.client.model.obj.WavefrontObject.<init>(WavefrontObject.java:60)
	at net.minecraftforge.client.model.obj.ObjModelLoader.loadInstance(ObjModelLoader.java:27)
	at net.minecraftforge.client.model.AdvancedModelLoader.loadModel(AdvancedModelLoader.java:65)
	at com.hbm.render.tileentity.RendererObjTester.<init>(RendererObjTester.java:23)
	at com.hbm.main.ClientProxy.registerRenderInfo(ClientProxy.java:84)
	at com.hbm.main.MainRegistry.PreLoad(MainRegistry.java:356)
	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:497)
	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	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:497)
	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)
	at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)
	at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)
	at net.minecraft.client.main.Main.main(SourceFile:148)
	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:497)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Caused by: java.io.FileNotFoundException: hbm:models/TestObj.obj
	at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110536_a(SimpleReloadableResourceManager.java:71)
	at net.minecraftforge.client.model.obj.WavefrontObject.<init>(WavefrontObject.java:55)
	... 41 more
commented

Since you're already messing with the code, you might as well remove the reference to that model in RendererObjTester.java since it's not being used anywhere. Does that happen after compiling the mod or when starting from an IDE?

commented

I don't get why it's happening either due to TestObj being there, which I can verify.

commented

So after removing the TestObj totally, with the block and the model both being removed, the issue still persists, I think the way that model's are loading is broken in the source code, because after removing it, the issue began happening on The Gadget instead which is the next thing loaded after TestObj.

commented

It's still a mystery to me why it tires to load the models at all when running gradlew build. From what I know, moving the contents of the assets folder into the /main/resources directory instead of having it in /main/java might allow the compile script to automatically insert the assets into the jar (I always do it by hand), perhaps it makes a difference? Still, none of this should be happening in the first place.

commented

I think it might be due to the mod ID being wrong. This is also not breaking at gradlew build it's breaking when loading minecraft right after pre-initialization by the way, I don't know why I said that earlier.

commented

Also by the way, this is not happening in Eclipse, it only happens when I actually build the mod and then export it to minecraft (in case that wasn't seen from me running gradlew build).

commented

It was happening after I ran gradlew build, I also tried to remove RenderObjTester though, and the issue seemed to persist.

commented

Ok looks like I misunderstood. Make sure you have a mcmod.info file in your jar (look at #10 in the readme) since due to a mistake in setting up this repository, it's not included by default. Not having this file is known to break some registry events (i.e. empty creative tabs) so it wouldn't be a surprise if your problem has the same root cause.