Jump to content

Andavin

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by Andavin

  1. Interesting, thank you for letting me know. That at least helps my search for a solution.
  2. Hi, Thanks for your response. I do not intend to publish or distribute decompiled Minecraft code in any way. I am asking a specific question about how Forge deals with a common issue that comes from decompiling code. I'd appreciate any insight you have for my question
  3. So, basically I would like to decompile Minecraft in order to have my own private repo for reference etc. I've done so via Fernflower and it works great except there are quite a few decompile errors and/or issues inserted by the obfuscator. What I'm wondering is: does anyone know how Forge deals with these little issues when decompiling? Common examples of what I'm talking about: void method() { String result; String result = getStringFromSomewhere(); // Compile error already defined in scope result = result; return result; } void otherMethod() { String name; String value; String name = properties.get("name"); // Already defined name = properties.get("value"); // Blantantly wrong vars value = properties.get("signature"); // Should actually be something like String name = properties.get("name"); String value = properties.get("value"); String signature = properties.get("signature"); } Since, as far as I'm aware, Forge fully decompiles and recompiles Minecraft it must deal with these issues in some way. Is this information readily available somewhere that I haven't been able to find it maybe? Thanks for any insight P.S. If I've posted this in the wrong section please let me know. I didn't see any other more appropriate forum sections though.
  4. Although, I just tested and the error comes back when I remove WorldEdit from the mods folder. I want it to be an optional dependency is there a way to do this? EDIT: Since I couldn't find a way I ended up just going with a small amount of reflection to get rid of the WorldEdit imports. Anyway thanks for you're help.
  5. Thank you. I thought I had changed that before but apparently not. I feel really dumb now. Thank you.
  6. Hey I posted this before for 1.7.10 and was notified that 1.7.x is no longer supported on these forums and to come back when I updated. So I updated my mod to 1.8.9 and I'm unfortunately still getting the exact same error. I'm trying to use WorldEdit as an optional dependency, but I'm having some ClassNotFound exceptions. I have WorldEdit declared as an optional dependency in my main class dependencies = "required-after:Forge@[11.15.1.1722,);after:WorldEdit" And also have it as a compile dependency in my build.gradle compile files('lib/worldedit.jar') It compiles fine with no errors, but then when I run it (with WorldEdit in the mods folder) it gives me a ClassNotFoundException. Here's the error: (only my mod and WorldEdit in the mods folder) http://pastebin.com/a7vYXinm I'm using one import for the ForgeWorldEdit main class in my main mod class and there's one other class that simply implements the WorldEdit permissions interface. And all that does is define the methods. If you'd like to see that I can post it. What am I doing wrong here? I can't figure it out. Thank you for any help!
  7. So I'm trying to use WorldEdit as an optional dependency, but I'm having some ClassNotFound exceptions. I have WorldEdit declared as an optional dependency in my main class dependencies = "required-after:Forge@[10.13.4.1558,);after:WorldEdit") And also have it as a compile dependency in my build.gradle compile files('lib/worldedit.jar') It compiles fine with no errors, but then when I run it (with WorldEdit in the mods folder) it gives me a ClassNotFoundException. Here's the error: (only my mod and WorldEdit in the mods folder) http://pastebin.com/Pqqvwq8L I'm using one import for the ForgeWorldEdit main class in my main mod class and there's one other class that simply implements the WorldEdit permissions interface. And all that does is define the methods. If you'd like to see that I can post it. What am I doing wrong here? I can't figure it out. Thank you for any help!
  8. Okay, I believe I just figured out. Turns out it was in my personal player object that was extending EntityPlayerMP and was using the super constructor. I'm thinking that's where the null Entity Type was coming in. Removed that and everything works fine. Thank you for the help. I really appreciate the effort.
  9. If I break the block in survival it actually crashes the server instead of just kicking me. What's nice about that is it gives me a crash report. To me it looks like the player is somehow null. Here's the crash report: Would teleporting somehow make the EntityType for me null? How does that happen? Sorry for so many comments I just really need help with this.
  10. Any idea why that would throw a NullPointer? What makes the packet handle fail? My best guess is that it can't find the player that broke the block or the World, but I can't figure out anything beyond that as to why my code would effect it.
  11. I believe your problem is here: try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } Using sleeping a thread is never a good idea if you need a delay I suggest using Timer and TimerTask.
  12. When you post code use the [.code] and [./code] modifiers without the periods and if it's a longer piece of code use a spoiler around that or pastebin.com. Then it will appear as such: Just a suggestion not meaning any offense.
  13. This is the if statement that correlates to: // Tell client the block is gone immediately then process events if (world.getTileEntity(x, y, z) == null) { S23PacketBlockChange packet = new S23PacketBlockChange(x, y, z, world); packet.field_148883_d = Blocks.air; packet.field_148884_e = 0; entityPlayer.playerNetServerHandler.sendPacket(packet); } Line 459 is: packet.field_148883_d = Blocks.air;
  14. Actually, BlockEvent.BreakEvent is only posted when a player breaks a block. At least to call the method onBlockBreakEvent in ForgeHooks EntityPlayerMP is one of the parameters. I did try it though and water doesn't throw the exception when it breaks a block. Do you know what I'm doing wrong that this would be happening?
  15. I know that it's throwing the NullPointerException from either the onBlockBreakEvent method in ForgeHooks or in the method that calls that one. My only suspicion is that somehow my position is invalidated after I teleport and the client doesn't know where the block is that I broke? Or something to that effect maybe?
  16. So I cannot seem to find a solution to this problem. I've done tons of debugging and I've seemed to narrow it down some, but not as much as I'd like. It seems that after I initiate a teleport command that is handled by my mod (doesn't have to actually teleport me just start the command, however it is only with the teleport commands) I cannot break any block without it kicking me from the server printing out a NullPointerException as follows: If I was to then log back in and break a block after this it will do the same thing over and over unless I remove my PlayerLoggedInEvent listener, in which case I have to teleport each time before I get the error. I really have almost no idea which classes it's relevant to, but here are all the ones I can think of. I can post more if needed. PlayerLoginListener: http://pastebin.com/qtJLUCLZ ListenerRegistry (The only classes that actually contain anything atm are the BlockBreak, Command, ChatListener, PlayerMove, PlayerTick, ServerTick, PlayerLogin, and PlayerLogout) BlockBreak (I can remove all code from this class and doesn't change the outcome): CommandHandler (This is where the CommandListener directs all commands): http://pastebin.com/kUQ9J9XC MyEssentials (@mod class): http://pastebin.com/C6bsGhyq And the two teleport commands that actually seem to cause the problem: http://pastebin.com/5JXXJXmG These commands don't actually have to go through, just called. I know this is a lot, but any help is extremely appreciated!
  17. Ahh never mind I think I get what you are saying. Haha I kind of feel stupid that I didn't think of just making them static, but I guess that's how it often is. Thank you very much!
  18. Here's my @Mod main class. You can see I register my commands in during FMLServerStartingEvent http://pastebin.com/uNiNQys1 And here's my CommandWrapper class: http://pastebin.com/LKLWw4ZS I think I see what you're saying.. CommandRegistry and CommandHandler are running on different instances of CommandManager and the data was only stored during the CommandRegistry instance? Also are you saying I should be making all of the Maps and Lists static?
  19. The subject basically says my problem. Basically I have an ArrayList that stores all of my commands for my mod and HashMaps that store the details for each command. Then there's a registry class that loops through each command and registers it with Forge. However, instead of processing the command in the processCommand() method with Forge I use a command listener which has a few checks before it passes the arguments to the command method. This is where my problem comes in. The whole beginning part works perfectly, however once I get to actually using the command for some reason the ArrayList and HashMaps have no data stored in them anymore. I can't for the life of my figure out why and I'm hoping it's something stupid that I'm just not seeing. Here's my CommandManager class: http://pastebin.com/mYTrdfmq And then my CommandHandler class: http://pastebin.com/9ADGSr5Z And the class I use to loop through and register each command: http://pastebin.com/jHMWkBLV The method getLengths() is only for debug as well as most of the logging you'll see.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.