jabelar
Members-
Posts
3266 -
Joined
-
Last visited
-
Days Won
39
Everything posted by jabelar
-
It looks like you're making progress with SanAndreas' method. In terms of my method, I have set up multiplayer in the dev environment and it fails with what I think is same error you saw: [13:59:45] [server thread/ERROR] [net.minecraft.server.MinecraftServer]: Encountered an unexpected exception java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient at wildanimals.entities.herdanimals.EntityHerdAnimal.sendSyncPacket(EntityHerdAnimal.java:474) ~[EntityHerdAnimal.class:?] at wildanimals.entities.herdanimals.EntityHerdAnimal.setRearing(EntityHerdAnimal.java:417) ~[EntityHerdAnimal.class:?] at wildanimals.entities.herdanimals.EntityHerdAnimal.attackEntityFrom(EntityHerdAnimal.java:292) ~[EntityHerdAnimal.class:?] at net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(EntityPlayer.java:1401) ~[EntityPlayer.class:?] at net.minecraft.network.NetHandlerPlayServer.processUseEntity(NetHandlerPlayServer.java:873) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:51) ~[C02PacketUseEntity.class:?] at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:69) ~[C02PacketUseEntity.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232) ~[NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:720) ~[MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:341) ~[DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:608) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:746) [MinecraftServer$2.class:?] Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:188) ~[launchwrapper-1.9.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_51] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_51] ... 14 more Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/multiplayer/WorldClient for invalid side SERVER at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50) ~[forgeSrc-1.7.2-10.12.1.1071.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:276) ~[launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:174) ~[launchwrapper-1.9.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_51] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_51] The weird thing is that, as far as I can understand, it seems to be a problem with the vanilla class WorldClient. I'm not sure that we could have really mucked that up. Seems like some bug. I'll start a separate topic on that issue itself -- how could it fail to find the vanilla class? Otherwise, it is possible it is issue with running multiplayer in development environment on same computer. I think I'll try to see if I can get it running with exported mods on separate computers.
-
Note -- as Brandon suggested to me in separate message a work-around is to press ESC to get back to game.
-
Okay, so you see these type of crashes too? I just tried reinstalling forge, cleaned, decomp space, refreshed dependencies, eclipse environment etc and got same error. Are others seeing this? It seems to be happening recently -- maybe a forge bug?
-
This is a new problem. If I pause the client and then select "back to game" it crashes with following error: This does only seems to happen running from Eclipse -- if I export mod and run it it doesn't crash. Should I just reinstall forge or otherwise refresh it?
-
Okay, it seems that the code is creating the file prior to me testing if it is there -- I can see a new config.cfg file has appeared after I run the code. Does the new File() create an actual file? Or does the canRead() method only indicate that there is a logical file open and not a physical file? I thought (noob I guess) that the new File() was sort of a logical thing until you actually did file operations to create the physical file... And I thought that the canRead() was related to a physical file (because the description talks about file permissions from the file system)...
-
Okay, because I make my mods for my kids to use and because they can't always agree on how the mechanics should work I have a text file for configuring the mods. (I need to look at implementing mod options properly...). Anyway, in the dev environment it works fine -- I have text file in Configuration format and can change the properties of the game. In my published mod, the config file is found (based on canRead() method call returning true) but it doesn't seem to like the values because it returns the default values (which happen when it thinks the values aren't Boolean as expected). Here's my processConfig() method: protected void processConfig() { // might need to use suggestedConfigFile (event.getSuggestedConfigFile) location to publish System.out.println(WildAnimals.MODNAME+" config path = "+WildAnimals.configPath); WildAnimals.configFile = new File(WildAnimals.configPath); System.out.println("Config file exists = "+WildAnimals.configFile.canRead()); config = new Configuration(WildAnimals.configFile); WildAnimals.config = config; WildAnimals.configBigCatsAreManEaters = config.get(Configuration.CATEGORY_GENERAL, "BigCatsAreManEaters", true).getBoolean(true); System.out.println("Big cats are man eaters = "+WildAnimals.configBigCatsAreManEaters); WildAnimals.configIncludeSnakes = config.get(Configuration.CATEGORY_GENERAL, "IncludeSnakes", false).getBoolean(false); System.out.println("Include snakes = "+WildAnimals.configIncludeSnakes); WildAnimals.configIncludeBigCats = config.get(Configuration.CATEGORY_GENERAL, "IncludeBigCats", false).getBoolean(false); System.out.println("Include big cats = "+WildAnimals.configIncludeBigCats); WildAnimals.configIncludeHerdAnimals = config.get(Configuration.CATEGORY_GENERAL, "IncludeHerdAnimals", false).getBoolean(false); System.out.println("Include herd animals = "+WildAnimals.configIncludeHerdAnimals); } Here's the actual config file contents: # Configuration file #################### # general #################### general { B:BigCatsAreManEaters=false B:IncludeSnakes=true B:IncludeBigCats=true B:IncludeHerdAnimals=true } And here is console output of the published mod (note the returned values are the default ones): [19:20:37 INFO]: Client> WildAnimals+ config path = WildAnimals/src/assets/wildanimals/config/config.cfg [19:20:37 INFO]: Client> Config file exists = true [19:20:37 INFO]: Client> Big cats are man eaters = true [19:20:37 INFO]: Client> Include snakes = false [19:20:37 INFO]: Client> Include big cats = false [19:20:37 INFO]: Client> Include herd animals = false And here is console output in the development environment (the returned values match the config file values): WildAnimals+ config path = WildAnimals/src/assets/wildanimals/config/config.cfg Config file exists = true Big cats are man eaters = false Include snakes = true Include big cats = true Include herd animals = true In both cases it seems to find the file, so I am perplexed on why it would parse differently. Any ideas?
-
I like this one. It also seems pretty straight forward and actually takes a similar approach to what I was trying to do. Since you're a much more expert coder than I, I assume that this already works in multiplayer as well?
-
Sorry this is really noob question, but I swear I googled and tried a few things before posting here. Okay, so I build my mod and it creates a jar that looks pretty good (has all my class files and assets in it). Drag the jar into my mods folder. I run Minecraft with Forge installed and great -- the mod shows in the mods list. I then create a single player game in creative mode and I enter my custom command ("conjure" which is basically like a "summon") and it is obvious my command class is there because the command is found (doesn't give an error about no such command) and also it gives some feedback that is my code. However, it doesn't actually conjure the entity that it is supposed to complaining about not finding the ID. So it seems there some problem with the entity class or (more likely) its registration. In other words, it is partially working so it isn't a fundamental problem with the build or applying it. It is not crashing. So I need to now debug it during operation. Anyway, I'm not looking for help with my specific issue, but rather the general issue -- how do you debug your mod issues with the built version (i.e. not in the IDE environment)? I assume you can get a Java console with same output, but I haven't been able to get that working. I have in fact get a Java console going, but can't seem to get it to do anything interesting -- I get Java icon in system tray, right click and ask for console, and it indicates a list of commands but don't see any real time logging related to the running Minecraft. Or do I have to start Minecraft from a windows console? This is first time my built mod has partially worked, so didn't have to do this before. I appreciate any tip. I guess my other option is to put a bunch more debug messages to the player in-game.
-
Sorry no, still working on it.
-
That was my first thought but I don't think that is the case because the side field in both events indicated server side. You know, maybe you should go back and use a different packet handling scheme. My initial success with the server to client packets was so easy that I thought the rest would be straight forward. But looks like some debug is needed. I'm gong to work on it but probably not as fast as you need. I won't take it personally if you abandon my approach. The frustrating thing is it seems so close to working...
-
Okay, I haven't got to the multiplayer yet because I noticed a weird thing with the client to server packets. While it seems pretty clear in my code that it is only sending one packet from client to server, the onServerPacket event seems to fire twice -- the first time with the expected packet (i.e payload is as expected) and second time with an apparently 0 payload (at least that is what the first int read gives. I'm pretty certain that the event is only happening on the server side because I assume the event is only there, then I check the side in the event handler method and check the side again later in the process packet method. So there is some sort of spurious packet event. I can ignore it, but would like to understand it. Reading through the FMLNetworkEvent class there is some mention of a "reply" packet, but I'm not sure if that is related (especially since I think it would go the other way).
-
That's funny (lmgtfy). I think a lot of us newbie modders forget that the whole Java language is available. Probably did searches related to specific to minecraft ...
-
Thanks, yeah I normally test multiplayer with separate computers. I can try it both ways, and yes I do have a Server run configuration set up in Eclipse. I'm slightly leery that running on the same computer could cause some issues with networking though especially when debugging custom packets. I have multiple gaming computers in the house so will try it that way too.
-
I worked on it a bit last night. I had to catch up with where you're at, so worked on implementing the client to server stuff. i got that working pretty handily. I didn't quite get to the multiplayer testing because I the other computers on my network were all in use, but I think I can try again tonight (although it is my anniversary so will be going out for dinner and ). Sorry for the delay. I promise to keep looking at this though as my time permits.
-
Note I responded on your other thread. I was able to update to 1071 without such errors although I have only a few items to register as my mod is mostly containing entities.
-
[1.7.2]Forge bug? or did something change? or am i a noob?
jabelar replied to brandon3055's topic in Modder Support
Okay I upgraded to 1071 and didn't see any such error. The one thing I noticed though (read it quickly maybe I mis-read) is that you're calling the register() method from inside your constructor. I'm not sure if that would be an issue, but I do it differently. I just directly register the item after creating it: Item itemSpawnEgg = new ItemWildAnimalSpawnEgg(parSpawnName, parEggColor, parEggSpotsColor).setUnlocalizedName("spawn_egg_"+parSpawnName.toLowerCase()).setTextureName("wildanimals:spawn_egg"); GameRegistry.registerItem(itemSpawnEgg, "spawnEgg"+parSpawnName); I don't know if that is related to your problem, but since 1071 is working for me and you're getting warnings about the game registry I though I would point it out. -
[1.7.2]Forge bug? or did something change? or am i a noob?
jabelar replied to brandon3055's topic in Modder Support
Interesting. Just because I'm a sucker for punishment I'm going to try to upgrade to 1071 as well. I'll tell you how it goes in a second. Note though that my current projects are mostly related to entities and so don't have blocks or tools. But do have items. -
[Fixed][Update to build 1079]Error when trying to launch in IDE
jabelar replied to theOriginalByte's topic in Modder Support
I think the error is pretty self-explanatory. You have added code to the core packages. You should make your mod as a separate project in Eclipse. You should check out Wuppy's tutorial for setup: -
So you mean you have errors in Eclipse. I thought you meant you had crashes when running the program. Okay, when programming the IDE (Integrated Development Environment) helps you by proof-reading your code for obvious mistakes that will affect compilation. So it is very normal to have lots of these errors appear while you're coding. The easiest thing is to often see if Eclipse will suggest a fix that looks correct. I think you can just hover over the part of the code that has a red underline and some suggested fixes will pop up. For example, for the "The method loadTexture(String) is undefined for the type RenderPlasmaBolt" it should offer to create the method for you. Note however that it will create the structure for the method but it won't know what to put in the method. So if you're copying a tutorial you'll have to see what should be in that method. However, I expect you don't know a lot about Java programming so it can be tricky to figure out the proper fix. For example, the "proxy cannot be resolved" means that you didn't define it (at least it is not defined in the scope of where you're referencing it). You should read up on how Java classes and methods work.
-
I'm at work for another 4 hours. But yeah, I'm willing to work through this with you. I'll probably try to get my own multiplayer packet working independently to see if there is any difference in result. Doing this kinda debug is worthwhile since it will make us better coders in the long run.
-
Okay, looking at the first case now, Client to Server That error is a Java language error. According to an answer at StackOverflow (http://stackoverflow.com/questions/34413/why-am-i-getting-a-noclassdeffounderror-in-java): However, a lot of people suggest that it is still most likely a classpath problem. Were you running this from within Eclipse? Make sure you back up your forge folder before you screw around with fixing up the Eclipse setup. Look up "troubleshoot java NoClassDefFoundError" for some ideas. It seems that there are ideas like cleaning the project in Eclipse, or someone mentioned the following: Some people cleared the workspace and then re-imported their project. Some people recommended doing Project->Clean… in Eclipse. And so on. In any case, my point is that the error seems to be a serious Java error probably related to project setup.
-
I'm at work so can only look at this a little bit and don't have my Forge set up to work with. I'll look at this more closely when I'm home tonight. I'm looking at the Server to Client case first. I think it is also interesting that the debug console crashes before it can print out the debug statement from your PacketTolkienaddon.createTestPacket() method. Basically your onBlockActivated() method calls the method, but it never prints out "[DEBUG]PacketTolkienaddon: createTestPacket". So the failure seems to be somewhere before the method is actually called. And the crash report indicates that it happens at the time of the call in the testBlock. What happens if you send a packet to a specific player instead? Anyway, this method is called within the try-catch so it might be interesting to understand if this is a situation where there was a catch -- put a debug println statement into the catch to see if that is the path being taken. Sorry but I haven't tested the multiplayer yet, but will do so when I get home. Sorry for you having so much trouble -- this is one reason I don't want to write a tutorial until I have it fully formed. However, I can't see any obvious reason why the general approach shouldn't work, so let's see if it is something simple.
-
Sorry you're having continued trouble. Things like the .equals() versus == are often tricky to find -- I'll have to look at that closer (as you said it worked in other direction). Like before, these type of issues are often very specific to the actual code. Do you mind reposting your current code, especially for the handlers and for the packet class? Actually the second crash seems to be related to the world object used in your test block's onBlockActivated() mehtod. Can you post code for that block or at least that method?