Jump to content

totemo

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

totemo's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. Ah, I understand what you're saying now. I think at the time I wrote it I wasn't sure if I could use net.minecraft.command.CommandHandler client side. If that is possible, then great.
  2. My mod is entirely client-side. It doesn't rely on anything in particular from the server other than permission to use LogBlock/CoreProtect/Prism query commands and tppos. A local command line was my preferred way of driving it.
  3. One of the things my mod does is add player names to the filenames of screenshots containing their edits. Currently I'm modifying the Minecraft ScreenshotHelper class to customise the name of the file to save. It would be helpful if there was an event hook in ScreenshotHelper.func_74292_a() just before ImageIO.write(bufferedimage, "png", file3) to customise the File to write. The current screenshot code in Minecraft is a bit of black box. It's currently hardwired to check the F2 key with a call to Minecraft.screenshotListener() in Minecraft.runGameLoop(). Someone pointed out, in another API request I had that it is possible to use the ASM library to modify core code. I have spent a few hours googling around for help and examples, but frankly, I'm struggling with it and it doesn't seem that the mechanisms for doing this in Forge are well explained. I'd appreciate any efforts made by the Forge developers to add an event hook for screenshots, or even a well-documented method of swapping a core Minecraft method for a method nominated by a mod at runtime.
      • 1
      • Like
  4. Wow. I wasn't even aware of that possibility. I'm quite surprised. Last time I looked at hot swapping code I think I reached the conclusion that it required JPDA and it all seemed too hard for my humble mod. I guess, ideally there would be a standard interface, so I'd greatly appreciate any work you could do in that regard. Thank you for your reply.
  5. Currently, it's not possible to handle commands purely at the client without modifying the base classes. Please feel free to cannibalise my code here: https://github.com/totemo/watson/tree/master/src/clientcommands to implement a standard Forge interface for this.
×
×
  • Create New...

Important Information

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