@Override
public void registerRenderers() {
// This is for rendering entities and so forth later on
}
}
and my server proxy looks like this:
package tutorial.basic;
public class CommonProxy {
// Client stuff
public void registerRenderers() {
// Nothing here as the server doesn't render graphics or entities!
}
}
if you need my "main" class I can post the text as well, I dont know how to use spoilers
Provided that the proxies are set up properly you will create a new method in your client proxy (or use the existing one) and add the code from the tutorial to that. You can then do proxy.registerRenders(); in the main class.
Hey I have been trying to use your tutorial for a while but I still just cant get it to work I have everything from the tutorial typed down correctly, I have the method in my server proxy(for the sake of having to have the same methods in client and server) and I have in my main mod class under load proxy.addModerCapes(); is there anything that I am missing? Capes are something I have been trying to find a tutorial on for a while and I am very excited for this.
Can you paste your code for me? Also can you explain the full extent of what you're trying to do?
Well i tried to use that group thing, and also saw a "getArrayFromURL"... but i'm not really sure how to use them.. the group thing used an Array, which i though i was doing right (probably wasn't though) but it kept underlining something....
I saw that get array thing and thought - i think this take something from online, kinda like what my updater does. So i made a txt file with what i thought was an array like this - "Beatbox_Man", "link to pic" i don't think that's right, but i also put "[]" around it and that didn't do anything... I couldn't get the preview link for that, as it was a txt file, so i did some html in it (like what my updater has on google drive) and then i could get the preview link.... but it still didn't work..
Does this code work for when i add or edit that list on google drive, it changes in game? So lets say i want to add someone to the list that has a custom cape. I edit the file, then upload it to the google drive, and then in game, that person who i added gets his custom cape? Cause if i want to add someone for the list, right now i have the custom ppls capes hard coded in game, so if someone new wanted one, they'd have to wait for the next update...
that's pretty much what i'm tryin to do... idk if i'm doing those arrays right.. i'm not to good when those...
I took out that grouped cape thing as it was giving me an error and those "addCape" work, but i don't really want them hard coded in the mod... in case if i need to change or do something, all the person has to do it close the game and open it or something and it's been updated...
I can't seem to get this to work for server... i think i have to do something with the client and common proxy, i've done something and nothing worked..
2014-03-18 00:36:01 [SEVERE] [ForgeModLoader] Caught exception from mod_MoreBlocks
java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureObject
at com.mce.common.mod_MoreBlocks.capeRegistry(mod_MoreBlocks.java:3633)
at com.mce.common.mod_MoreBlocks.load(mod_MoreBlocks.java:3628)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107)
at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)
at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:142)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.texture.TextureObject
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 34 more
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/texture/TextureObject for invalid side SERVER
at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:274)
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:172)
... 36 more
2014-03-18 00:36:01 [INFO] [STDERR] cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureObject
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.transition(LoadController.java:156)
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:700)
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107)
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)
2014-03-18 00:36:01 [INFO] [STDERR] at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:142)
2014-03-18 00:36:01 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
2014-03-18 00:36:01 [INFO] [STDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2014-03-18 00:36:01 [INFO] [STDERR] Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureObject
I can't seem to get this to work for server... i think i have to do something with the client and common proxy, i've done something and nothing worked..
2014-03-18 00:36:01 [SEVERE] [ForgeModLoader] Caught exception from mod_MoreBlocks
java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureObject
at com.mce.common.mod_MoreBlocks.capeRegistry(mod_MoreBlocks.java:3633)
at com.mce.common.mod_MoreBlocks.load(mod_MoreBlocks.java:3628)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107)
at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)
at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:142)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.texture.TextureObject
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 34 more
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/texture/TextureObject for invalid side SERVER
at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:274)
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:172)
... 36 more
2014-03-18 00:36:01 [INFO] [STDERR] cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureObject
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.transition(LoadController.java:156)
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:700)
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107)
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)
2014-03-18 00:36:01 [INFO] [STDERR] at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:142)
2014-03-18 00:36:01 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
2014-03-18 00:36:01 [INFO] [STDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2014-03-18 00:36:01 [INFO] [STDERR] Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureObject
The issue here is that you're trying to run the cape code on the server side, this won't work. What you should do is remove the cape handler and put all of its methods in the common and client proxy. Make sure all the server sided methods are empty and that none of the proxy methods being used are static. Then in your main class you can call proxy.addCape("");
The issue here is that you're trying to run the cape code on the server side, this won't work. What you should do is remove the cape handler and put all of its methods in the common and client proxy. Make sure all the server sided methods are empty and that none of the proxy methods being used are static. Then in your main class you can call proxy.addCape("");
ok i did it, but it still gives me an error.. I got rid of that capehandler and what was in it i put in client and common proxy, gave me error, so then i tried without in common, then without it in client. still gave me errors. I also got rid of "capeRegistry" and just moved the "proxy.addcape("");" to the load method in the main class...
the "proxy" thing is set to this at the top of my main class - "public CommonProxy proxy;"
and here's the error log -
[SEVERE] Encountered an unexpected exception LoaderException
cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:75)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.loadMods(Loader.java:511)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:99)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350)
at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:69)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:63)
... 28 more
ok well i took them out completely just so i can add other stuff cause it kept crashing, and it still is crashing and complaining about Proxy Injector... how?! i don't even have the cape stuff in what so ever
Edit: Well i'ma take my mod out and reinstall the forge.... i may have did something in a base class..
Edit2: ah, i found what was wrong.... well now that i fixed it, capes work, but still crashed for server
ok well i took them out completely just so i can add other stuff cause it kept crashing, and it still is crashing and complaining about Proxy Injector... how?! i don't even have the cape stuff in what so ever
Edit: Well i'ma take my mod out and reinstall the forge.... i may have did something in a base class..
Edit2: ah, i found what was wrong.... well now that i fixed it, capes work, but still crashed for server
That suggests that you are using the proxy system wrong. Also if it crashes on server, as mentioned before you must put it in the client proxy.
Hey great tutorial! it all works but I want to make it so that everyone with my mod gets a cape; and I cant seem to figure it out. Do you know how this could be done?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Slabs- Bring easily place able upside down slabs back to minecraft!
Slabs- Bring easily place able upside down slabs back to minecraft!
Slabs- Bring easily place able upside down slabs back to minecraft!
package tutorial.basic.client;
import net.minecraftforge.client.MinecraftForgeClient;
import tutorial.basic.CommonProxy;
public class ClientProxy extends CommonProxy {
@Override
public void registerRenderers() {
// This is for rendering entities and so forth later on
}
}
and my server proxy looks like this:
package tutorial.basic;
public class CommonProxy {
// Client stuff
public void registerRenderers() {
// Nothing here as the server doesn't render graphics or entities!
}
}
if you need my "main" class I can post the text as well, I dont know how to use spoilers
-
View User Profile
-
View Posts
-
Send Message
Retired StaffProvided that the proxies are set up properly you will create a new method in your client proxy (or use the existing one) and add the code from the tutorial to that. You can then do proxy.registerRenders(); in the main class.
Thanks glad you like it
Thanks for any help you offer,
-
View User Profile
-
View Posts
-
Send Message
Retired StaffYep, that's how the forge proxy system works
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHelp modders out by contributing to the Forge Ore Dictionary List! http://mce626.wix.com/odnlist
-
View User Profile
-
View Posts
-
Send Message
Retired StaffCan you paste your code for me? Also can you explain the full extent of what you're trying to do?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWell i tried to use that group thing, and also saw a "getArrayFromURL"... but i'm not really sure how to use them.. the group thing used an Array, which i though i was doing right (probably wasn't though) but it kept underlining something....
I saw that get array thing and thought - i think this take something from online, kinda like what my updater does. So i made a txt file with what i thought was an array like this - "Beatbox_Man", "link to pic" i don't think that's right, but i also put "[]" around it and that didn't do anything... I couldn't get the preview link for that, as it was a txt file, so i did some html in it (like what my updater has on google drive) and then i could get the preview link.... but it still didn't work..
Does this code work for when i add or edit that list on google drive, it changes in game? So lets say i want to add someone to the list that has a custom cape. I edit the file, then upload it to the google drive, and then in game, that person who i added gets his custom cape? Cause if i want to add someone for the list, right now i have the custom ppls capes hard coded in game, so if someone new wanted one, they'd have to wait for the next update...
that's pretty much what i'm tryin to do... idk if i'm doing those arrays right.. i'm not to good when those...
But here's some of the code -
// CapeHandler // .getArrayFromUrl("https://googledrive.com/host/0B8JAYsTGbxASeUJoYllYSlNEQ3M/CapeList.html"); CapeHandler.addCape("Beatbox_Man", "http://i.imgur.com/vS72S52.png"); CapeHandler.addCape("MCE626", "http://i.imgur.com/vS72S52.png"); CapeHandler.addCape("kylelaw11", "http://i.imgur.com/3wQh158.png"); CapeHandler.addCape("The_Crazy_Guy34", ""); CapeHandler.addCape("Tic_toc26", "");I took out that grouped cape thing as it was giving me an error and those "addCape" work, but i don't really want them hard coded in the mod... in case if i need to change or do something, all the person has to do it close the game and open it or something and it's been updated...
Help modders out by contributing to the Forge Ore Dictionary List! http://mce626.wix.com/odnlist
"The method loadTexture(ResourceLocation, TextureObject) is undefined for the type
TextureManager"
Here is my code:
package gameofthrones.proxies; import gameofthrones.entity.EntityBaratheonSoldier; import gameofthrones.entity.EntityBear; import gameofthrones.entity.EntityDothraki; import gameofthrones.entity.EntityEddardStark; import gameofthrones.entity.EntityFreySoldier; import gameofthrones.entity.EntityGreyjoyShipowner; import gameofthrones.entity.EntityGreyjoySoldier; import gameofthrones.entity.EntityJamieLannister; import gameofthrones.entity.EntityJoffrey; import gameofthrones.entity.EntityJoffreyWidowsWail; import gameofthrones.entity.EntityKingsguardKnight; import gameofthrones.entity.EntityLannisterSoldier; import gameofthrones.entity.EntityNightsWatchRanger; import gameofthrones.entity.EntityRenlyBaratheon; import gameofthrones.entity.EntityRobbStark; import gameofthrones.entity.EntityRobertBaratheon; import gameofthrones.entity.EntityRobertBaratheonArmor; import gameofthrones.entity.EntityStannisBaratheon; import gameofthrones.entity.EntityStarkMessanger; import gameofthrones.entity.EntityStarkSoldier; import gameofthrones.entity.EntityThenn; import gameofthrones.entity.EntityTullySoldier; import gameofthrones.entity.EntityTywin; import gameofthrones.entity.EntityValeClansman; import gameofthrones.entity.EntityWhiteWalker; import gameofthrones.entity.EntityWight; import gameofthrones.entity.EntityWildling; import gameofthrones.entity.ModelBear; import gameofthrones.entity.ModelWhiteWalker; import gameofthrones.entity.RenderBaratheonSoldier; import gameofthrones.entity.RenderBear; import gameofthrones.entity.RenderDothraki; import gameofthrones.entity.RenderEddardStark; import gameofthrones.entity.RenderFreySoldier; import gameofthrones.entity.RenderGreyjoyShipowner; import gameofthrones.entity.RenderGreyjoySoldier; import gameofthrones.entity.RenderJoffrey; import gameofthrones.entity.RenderKingsguardKnight; import gameofthrones.entity.RenderLannisterSoldier; import gameofthrones.entity.RenderNightsWatchRanger; import gameofthrones.entity.RenderRenlyBaratheon; import gameofthrones.entity.RenderRobbStark; import gameofthrones.entity.RenderRobertBaratheon; import gameofthrones.entity.RenderStannisBaratheon; import gameofthrones.entity.RenderStarkMessanger; import gameofthrones.entity.RenderStarkSoldier; import gameofthrones.entity.RenderThenn; import gameofthrones.entity.RenderTullySoldier; import gameofthrones.entity.RenderTywin; import gameofthrones.entity.RenderValeClansman; import gameofthrones.entity.RenderWhiteWalker; import gameofthrones.entity.RenderWight; import gameofthrones.entity.RenderWildling; import gameofthrones.gui.GUIBaratheon; import gameofthrones.gui.GUIHouseSelect; import gameofthrones.gui.GUILannister; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.ThreadDownloadImageData; import net.minecraft.client.renderer.texture.TextureObject; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends CommonProxy{ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { switch(ID) { case 0: return new GUIHouseSelect(player); case 1: return new GUIBaratheon(player); case 2: return new GUILannister(player); } return null; } @Override public void initRenderers() { RenderingRegistry.addNewArmourRendererPrefix("Stark"); RenderingRegistry.addNewArmourRendererPrefix("Lannister"); RenderingRegistry.addNewArmourRendererPrefix("Wildling"); RenderingRegistry.addNewArmourRendererPrefix("Kingsguard"); RenderingRegistry.addNewArmourRendererPrefix("Frey"); RenderingRegistry.addNewArmourRendererPrefix("Baratheon"); RenderingRegistry.addNewArmourRendererPrefix("Greyjoy"); RenderingRegistry.addNewArmourRendererPrefix("Targaryen"); RenderingRegistry.addNewArmourRendererPrefix("Crownstag"); RenderingRegistry.addNewArmourRendererPrefix("NightsWatch"); RenderingRegistry.addNewArmourRendererPrefix("NoviceJerkin"); RenderingRegistry.addNewArmourRendererPrefix("Tully"); } public static void addModerCapes() { String capeURL = "http://i.imgur.com/SYqnmUP.png"; String[] devs = {"CHARGERWAYZIE", "NotADevYet", "NotADevYet"}; ThreadDownloadImageData image = new ThreadDownloadImageData(capeURL, null, null); for (String username : devs) { Minecraft.getMinecraft().renderEngine.loadTexture(new ResourceLocation("cloaks/" + username), (TextureObject) image); } } @Override public void registerRenderThings() { // MinecraftForgeClient.registerItemRenderer(GOTItemRegistry.Longclaw.itemID, new ItemRenderLongclaw()); RenderingRegistry.registerEntityRenderingHandler(EntityStarkSoldier.class, new RenderStarkSoldier(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityLannisterSoldier.class, new RenderLannisterSoldier(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityWhiteWalker.class, new RenderWhiteWalker(new ModelWhiteWalker(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityDothraki.class, new RenderDothraki(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityWildling.class, new RenderWildling(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityGreyjoySoldier.class, new RenderGreyjoySoldier(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityBaratheonSoldier.class, new RenderBaratheonSoldier(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityWight.class, new RenderWight(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityFreySoldier.class, new RenderFreySoldier(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityThenn.class, new RenderThenn(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityBear.class, new RenderBear(new ModelBear(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityKingsguardKnight.class, new RenderKingsguardKnight(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityStarkMessanger.class, new RenderStarkMessanger(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityGreyjoyShipowner.class, new RenderGreyjoyShipowner(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityNightsWatchRanger.class, new RenderNightsWatchRanger(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityTullySoldier.class, new RenderTullySoldier(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityRobertBaratheon.class, new RenderRobertBaratheon(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityRobertBaratheonArmor.class, new RenderRobertBaratheon(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityEddardStark.class, new RenderEddardStark(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityJoffrey.class, new RenderJoffrey(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityJoffreyWidowsWail.class, new RenderJoffrey(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityRobbStark.class, new RenderRobbStark(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityTywin.class, new RenderTywin(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityJamieLannister.class, new RenderLannisterSoldier(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityRenlyBaratheon.class, new RenderRenlyBaratheon(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityStannisBaratheon.class, new RenderStannisBaratheon(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityValeClansman.class, new RenderValeClansman(new ModelBiped(), 0.5F)); //the 0.5F is the shadowsize //the 0.5F is the shadowsize //the 0.5F is the shadowsize } @Override public void initSounds() { } }-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHere's the code -
In Main class -
public void capeRegistry() { //proxy.capeRegistry(); CapeHandler.addCape("Beatbox_Man", "http://i.imgur.com/vS72S52.png"); CapeHandler.addCape("MCE626", "http://i.imgur.com/vS72S52.png"); CapeHandler.addCape("kylelaw11", "http://i.imgur.com/3wQh158.png"); CapeHandler .addCape("The_Crazy_Guy34", "http://i.imgur.com/3UFb28F.png"); CapeHandler.addCape("Tic_toc26", "http://i.imgur.com/SqdCgkB.png"); CapeHandler.addCape("DamonRios", "http://i.imgur.com/uhU7WxQ.png"); }In the "load" method is --- "capeRegistry();"
Client and common proxy have -
public void capeRegistry(){
}
Here's the server crash report -
2014-03-18 00:36:01 [SEVERE] [ForgeModLoader] Caught exception from mod_MoreBlocks
java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureObject
at com.mce.common.mod_MoreBlocks.capeRegistry(mod_MoreBlocks.java:3633)
at com.mce.common.mod_MoreBlocks.load(mod_MoreBlocks.java:3628)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107)
at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)
at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:142)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.texture.TextureObject
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 34 more
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/texture/TextureObject for invalid side SERVER
at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:274)
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:172)
... 36 more
2014-03-18 00:36:01 [INFO] [STDERR] cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureObject
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.transition(LoadController.java:156)
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:700)
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107)
2014-03-18 00:36:01 [INFO] [STDERR] at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)
2014-03-18 00:36:01 [INFO] [STDERR] at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:142)
2014-03-18 00:36:01 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
2014-03-18 00:36:01 [INFO] [STDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2014-03-18 00:36:01 [INFO] [STDERR] Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureObject
Help modders out by contributing to the Forge Ore Dictionary List! http://mce626.wix.com/odnlist
-
View User Profile
-
View Posts
-
Send Message
Retired StaffThe issue here is that you're trying to run the cape code on the server side, this won't work. What you should do is remove the cape handler and put all of its methods in the common and client proxy. Make sure all the server sided methods are empty and that none of the proxy methods being used are static. Then in your main class you can call proxy.addCape("");
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumok i did it, but it still gives me an error.. I got rid of that capehandler and what was in it i put in client and common proxy, gave me error, so then i tried without in common, then without it in client. still gave me errors. I also got rid of "capeRegistry" and just moved the "proxy.addcape("");" to the load method in the main class...
the "proxy" thing is set to this at the top of my main class - "public CommonProxy proxy;"
and here's the error log -
[SEVERE] Encountered an unexpected exception LoaderException
cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:75)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.loadMods(Loader.java:511)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:99)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350)
at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:69)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:63)
... 28 more
Help modders out by contributing to the Forge Ore Dictionary List! http://mce626.wix.com/odnlist
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumEdit: Well i'ma take my mod out and reinstall the forge.... i may have did something in a base class..
Edit2: ah, i found what was wrong.... well now that i fixed it, capes work, but still crashed for server
Help modders out by contributing to the Forge Ore Dictionary List! http://mce626.wix.com/odnlist
-
View User Profile
-
View Posts
-
Send Message
Retired StaffThat suggests that you are using the proxy system wrong. Also if it crashes on server, as mentioned before you must put it in the client proxy.
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumok well then idk how to use the stupid proxy system.. so what ever tut i followed was probably wrong then
Help modders out by contributing to the Forge Ore Dictionary List! http://mce626.wix.com/odnlist