Cadiboo Posted April 21, 2019 Share Posted April 21, 2019 10 minutes ago, Thegametutor101 said: If i don't put the .obj wouldn't it get confused between pokeball.obj and pokeball.mtl..? No. .mtl is not a .obj file. AFAIK It will look for .obj files first if you called OBJLoader.addDomain, then it will look for .json files. Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted April 21, 2019 Share Posted April 21, 2019 2 hours ago, Thegametutor101 said: @V0idWa1k3r ok so..i went through the entire .obj file and fixed all negative "vt"s but the issue is still the same... any other idea? Well, if you would update your github repository I could debug it and tell you the next issue. Quote Link to comment Share on other sites More sharing options...
Thegametutor101 Posted April 21, 2019 Author Share Posted April 21, 2019 8 hours ago, Cadiboo said: No. .mtl is not a .obj file. AFAIK It will look for .obj files first if you called OBJLoader.addDomain, then it will look for .json files. Done..still doesn't work 8 hours ago, V0idWa1k3r said: Well, if you would update your github repository I could debug it and tell you the next issue. here you go: https://github.com/Thegametutor101/Pixelmon_Project_School/tree/Pixelmon_Main Quote Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted April 22, 2019 Share Posted April 22, 2019 Now you never call the pre-init method in your proxy, thus the OBJLoader doesn't know that it is supposed to process your mod. You did have it called previously, why you removed that lime of code I don't know. You do need the .obj extension at the definition of your model so the OBJLoader itself knows that you are looking for a wavefront model. Also stop using common proxy, it makes no sense. And don't have your common proxy as your server proxy, that makes even less sense. And well, it took me a while to figure this issue out, but your blockstates file isn't a forge blockstates file. forge_maker != forge_marker. Now those issues done and all your obj model is still broken. Quote Caused by: java.lang.RuntimeException: OBJLoader.Parser: Exception parsing line #986: `vt 1.029911 0.247618` UVs MUST be within a [0-1] bounds. This one isn't. 1 Quote Link to comment Share on other sites More sharing options...
Thegametutor101 Posted April 22, 2019 Author Share Posted April 22, 2019 11 hours ago, V0idWa1k3r said: Now you never call the pre-init method in your proxy, thus the OBJLoader doesn't know that it is supposed to process your mod. You did have it called previously, why you removed that lime of code I don't know. You do need the .obj extension at the definition of your model so the OBJLoader itself knows that you are looking for a wavefront model. Also stop using common proxy, it makes no sense. And don't have your common proxy as your server proxy, that makes even less sense. And well, it took me a while to figure this issue out, but your blockstates file isn't a forge blockstates file. forge_maker != forge_marker. Now those issues done and all your obj model is still broken. UVs MUST be within a [0-1] bounds. This one isn't. OH YEAH!! Finally it works!! I placed the OBJLoader back in the Main's preInit Checked every single line for vt out of bounds Corrected the forge_marker tag I miss spelled Set the Main to use the ClientProxy instead of CommonProxy ok the model needs work but it finally loads!! Thank you so Much @V0idWa1k3r!!! Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted April 22, 2019 Share Posted April 22, 2019 6 hours ago, Thegametutor101 said: I placed the OBJLoader back in the Main's preInit This will crash on a dedicated server 6 hours ago, Thegametutor101 said: Set the Main to use the ClientProxy instead of CommonProxy This entirely defeats the whole point of proxies and will crash very uglily on a dedicated server Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
Thegametutor101 Posted April 22, 2019 Author Share Posted April 22, 2019 56 minutes ago, Cadiboo said: This will crash on a dedicated server This entirely defeats the whole point of proxies and will crash very uglily on a dedicated server Oh..ok so how should I call the OBJLoader if it is in the ClientProxy?.. Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted April 23, 2019 Share Posted April 23, 2019 (edited) I would just not use proxies at all. I would put OBJLoader.addDomain in the static initialisers of my client event subscriber. Proxies work by having a common interface that both your server and client proxy implement and having a field with @SidedProxy that Forge will fill with an instance of either your server or client proxy class when your mod is loaded. This allows you to run code that will crash on the wrong physical side. For your problem you should have a method in your proxy interface called addOBJLoaderDomainIfOnClient. Then your server proxy should have a NOOP implementation (an implementation that doesn’t do anything at all) and your client proxy should have an implementation that calls OBJLoader.addDomain. You would then call PROXY.addOBJLoaderDomainIfOnClientin preInit. On the dedicated server this would do nothing, and on the client it will register your domain. As you can see, proxies are a lot more complicated than sided event subscribers where everything just works(tm). Edited April 23, 2019 by Cadiboo Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
Thegametutor101 Posted April 23, 2019 Author Share Posted April 23, 2019 31 minutes ago, Cadiboo said: I would just not use proxies at all. I would put OBJLoader.addDomain in the static initialisers of my client event subscriber. Proxies work by having a common interface that both your server and client proxy implement and having a field with @SidedProxy that Forge will fill with an instance of either your server or client proxy class when your mod is loaded. This allows you to run code that will crash on the wrong physical side. For your problem you should have a method in your proxy interface called addOBJLoaderDomainIfOnClient. Then your server proxy should have a NOOP implementation (an implementation that doesn’t do anything at all) and your client proxy should have an implementation that calls OBJLoader.addDomain. You would then call PROXY.addOBJLoaderDomainIfOnClientin preInit. On the dedicated server this would do nothing, and on the client it will register your domain. As you can see, proxies are a lot more complicated than sided event subscribers where everything just works(tm). Ok. So if I understand correctly: I create a method in the Proxies named "addOBJLoaderDomainIfOnClient" that has inside of it the OBJLoader.addDomain. Then in my RegistryHandler (where I register all items/blocks @BusSubscribeEvent) I would call the method in my proxy through a @SubscribeEvent. And finally I have the CommonProxy implement "NOOP" ...is that right? I'm not sure if you mean't I call the "addOBJLoaderDomainIfOnClient" method from the Main's preInit or in a "@BusSubscribeEvent" s "@SubscribeEvent". Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted April 23, 2019 Share Posted April 23, 2019 1 minute ago, Thegametutor101 said: I create a method in the Proxies named "addOBJLoaderDomainIfOnClient" that has inside of it the OBJLoader.addDomain. No, you create an empty method if you’re using a normal class or an abstract method if your using an abstract class or define a method if your using an interface. 2 minutes ago, Thegametutor101 said: Then in my RegistryHandler (where I register all items/blocks @BusSubscribeEvent) I would call the method in my proxy through a @SubscribeEvent. This would work but it doesn’t make sense to call it from there, you would call the method in preInit. 3 minutes ago, Thegametutor101 said: And finally I have the CommonProxy implement "NOOP" If your using a class, yes. NOOP stands for NO OPeration i.e. do nothing. 4 minutes ago, Thegametutor101 said: I'm not sure if you mean't I call the "addOBJLoaderDomainIfOnClient" method from the Main's preInit or in a "@BusSubscribeEvent" s "@SubscribeEvent". If your using a proxy, you would call it from preInit. If you’re doing it in a client event subscriber you can just call it from inside a static initialiser, without any other code at all. Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
Thegametutor101 Posted April 23, 2019 Author Share Posted April 23, 2019 4 minutes ago, Cadiboo said: No, you create an empty method if you’re using a normal class or an abstract method if your using an abstract class or define a method if your using an interface. This would work but it doesn’t make sense to call it from there, you would call the method in preInit. If your using a class, yes. NOOP stands for NO OPeration i.e. do nothing. If your using a proxy, you would call it from preInit. If you’re doing it in a client event subscriber you can just call it from inside a static initialiser, without any other code at all. Ok perfect, I will try to implement all of this info into my mod Quote Link to comment Share on other sites More sharing options...
Thegametutor101 Posted April 23, 2019 Author Share Posted April 23, 2019 14 hours ago, Cadiboo said: No, you create an empty method if you’re using a normal class or an abstract method if your using an abstract class or define a method if your using an interface. This would work but it doesn’t make sense to call it from there, you would call the method in preInit. If your using a class, yes. NOOP stands for NO OPeration i.e. do nothing. If your using a proxy, you would call it from preInit. If you’re doing it in a client event subscriber you can just call it from inside a static initialiser, without any other code at all. Ok! did it all and everything works perfectly! Thank you @Cadiboo for explaning proxies for me Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.