Advertisement
smbarbour

Untitled

Apr 26th, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.72 KB | None | 0 0
  1. java -classpath bin/SrgTools.jar;bin/asm-all-3.3.1.jar ApplySrg --srg mappings/generated/server_mcp_bukkit_1.2.5.srg --inheritance jar/generated/craftbukkit......MCP.jar --inheritance <other mod that you depend on> --in mod_MODNAME.zip --out mod_MODNAME.final.zip
  2.  
  3. Start of Lordmau5 buffer: Thu Apr 26 19:30:38 2012
  4. Session Ident: Lordmau5 (EsperNet, FransWillem) (~chatzilla@HSI-KBW-046-005-029-023.hsi8.kabel-badenwuerttemberg.de)
  5. [19:16] <Lordmau5> Franswillem?
  6. [19:16] <Lordmau5> Have one question to you
  7. [19:16] <FransWillem> Shoot
  8. [19:17] <Lordmau5> How can i compile the bukkit code for a mod on a easier way?
  9. [19:17] <Lordmau5> (sry german)
  10. [19:17] <FransWillem> No worries :)
  11. [19:17] <FransWillem> So a mod which you have the (MCP-based) source code for, right ?
  12. [19:17] <Lordmau5> yep :P
  13. [19:18] <FransWillem> https://github.com/Frans-Willem/BukkitPorting
  14. [19:18] <Lordmau5> and whats that now?
  15. [19:18] <FransWillem> A repository with stuff you need :)
  16. [19:18] <Lordmau5> oh well, epic thing
  17. [19:18] <FransWillem> What you normally do is compile your mod with MCP in the classpath, right ?
  18. [19:18] <Lordmau5> not exactly
  19. [19:18] <FransWillem> Instead of that, compile it with the craftbukkit-1.2.5-R1.1-MCPC-SNAPSHOT-73.MCP.jar from jar/generated/ in the classpath
  20. [19:18] <Lordmau5> using eclipse
  21. [19:19] <Lordmau5> ok
  22. [19:19] <FransWillem> Ok, wait, explain how you do it first
  23. [19:19] <FransWillem> and I'll tell you how to adjust it to compile for bukkit :)
  24. [19:19] <Lordmau5> so i have the mod ready for server
  25. [19:19] <Lordmau5> it works
  26. [19:19] <Lordmau5> its an addon for buildcraft made by smbarbour, and he said, i am allowed to port it to bukkit.
  27. [19:19] <Lordmau5> now i have the sourcecode ready, but what i would do now is
  28. [19:19] <Lordmau5> switching workspace in eclipse and add the files in the src folder
  29. [19:20] <Lordmau5> of the workspace
  30. [19:20] <FransWillem> Ah, ok :)
  31. [19:20] <FransWillem> So let's say you start with a clean workspace
  32. [19:20] <FransWillem> first, you start a project
  33. [19:20] <FransWillem> then add the mod files in the src folder
  34. [19:20] <Lordmau5> ok
  35. [19:20] <FransWillem> then add the craftbukkit.....MCP.jar in the project folder,
  36. [19:20] <FransWillem> and then add it to the classpath
  37. [19:20] <Lordmau5> as library, right?
  38. [19:21] <FransWillem> Ehm, basically right-click the project, pick java buildm path, pick tab Libraries, and Add JARs
  39. [19:21] <Lordmau5> yep
  40. [19:21] <Lordmau5> not add external jars?
  41. [19:21] <FransWillem> external JARs is good too :)
  42. [19:21] <Lordmau5> ok :D
  43. [19:21] <Lordmau5> let me do that one second
  44. [19:21] <FransWillem> you can use Add JARs if you put it in the project, external JARs if not, won't make too much of a difference
  45. [19:22] <Lordmau5> ok
  46. [19:22] <Lordmau5> so now
  47. [19:22] <FransWillem> And if it's a mod that adds to something else, you should probably add that mod as a JAR too
  48. [19:22] <Lordmau5> i added the craftbukkit jar
  49. [19:22] <Lordmau5> as external jar
  50. [19:22] <Lordmau5> next thing i would do
  51. [19:22] <Lordmau5> open up the src folder
  52. [19:22] <FransWillem> So what this does is it compiles against a special bukkit version with MCPs names, and a few things to make sure the compiler shouts at you for certain things :p
  53. [19:22] <Lordmau5> create folder net.minecraft.src (better package)
  54. [19:22] <Lordmau5> aah :D
  55. [19:23] <FransWillem> But after you compile, you're not done yet
  56. [19:23] <Lordmau5> ok
  57. [19:23] <FransWillem> Because you compiled against MCPs names, and you want it to run against bukkit's names
  58. [19:23] <FransWillem> for that we have ApplySrg
  59. [19:23] <FransWillem> how you run ApplySrg is usually like this:
  60. [19:23] <Lordmau5> waaait
  61. [19:23] <Lordmau5> one second :P
  62. [19:24] <Lordmau5> oks
  63. [19:24] <Lordmau5> pls* xD
  64. [19:24] <FransWillem> You can read it later :)
  65. [19:24] <FransWillem> So you create a JAR of your mod as usual
  66. [19:24] <FransWillem> then you run ApplySrg like this:
  67. [19:24] <Lordmau5> jar of my mod... what?
  68. [19:25] <FransWillem> Or a zip file :p
  69. [19:25] <Lordmau5> dont even know how to do that :S
  70. [19:25] <FransWillem> How do you normally craete your zipfile ?
  71. [19:25] <Lordmau5> rightclick desktop
  72. [19:25] <Lordmau5> create zip file
  73. [19:26] <Lordmau5> call it something like
  74. [19:26] <FransWillem> Yeha, that's fine :)
  75. [19:26] <Lordmau5> mod_MODNAME.zip
  76. [19:26] <Lordmau5> and add the files i need in it
  77. [19:26] <FransWillem> Just create a zipfile as usual
  78. [19:26] <FransWillem> then do something like:
  79. [19:26] <FransWillem> java -classpath bin/SrgTools.jar;bin/asm-all-3.3.1.jar ApplySrg --srg mappings/generated/server_mcp_bukkit_1.2.5.srg --inheritance jar/generated/craftbukkit......MCP.jar --inheritance <other mod that you depend on> --in mod_MODNAME.zip --out mod_MODNAME.final.zip
  80. [19:26] <FransWillem> then the final.zip one should run in craftbukkit
  81. [19:28] <Lordmau5> . . .
  82. [19:28] <Lordmau5> ok
  83. [19:29] <Lordmau5> and this is a "basic" batch file?
  84. [19:29] <Lordmau5> for windows
  85. [19:29] <FransWillem> yeah, you can make a batch file of it too
  86. [19:29] <FransWillem> or you can run it directly from cmd
  87. [19:29] <Lordmau5> ah ok
  88. [19:29] <FransWillem> But I really got to run
  89. [19:29] <Lordmau5> thanks at all :)
  90. [19:29] <FransWillem> Hope you get it working :)
  91. [19:29] <Lordmau5> yea, try it :D
  92. [19:29] <Lordmau5> thanks man
  93. [19:29] <Lordmau5> and cya :D
  94. [19:29] <FransWillem> If not, maybe I can help you out tomorrow :)
  95. [19:29] <Lordmau5> kk
  96. [19:30] <Lordmau5> cya
  97. -
  98. Lordmau5 is ~chatzilla@HSI-KBW-046-005-029-023.hsi8.kabel-badenwuerttemberg.de * New Now Know How
  99. Lordmau5 on #mcportcentral
  100. Lordmau5 using optical.esper.net Internet Retro Chat (Oslo, Norway)
  101. Lordmau5 has been idle 20secs, signed on Thu Apr 26 17:54:08
  102. Lordmau5 End of /WHOIS list.
  103. -
  104. End of Lordmau5 buffer Thu Apr 26 19:30:38 2012
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement