Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- Start of Lordmau5 buffer: Thu Apr 26 19:30:38 2012
- Session Ident: Lordmau5 (EsperNet, FransWillem) (~chatzilla@HSI-KBW-046-005-029-023.hsi8.kabel-badenwuerttemberg.de)
- [19:16] <Lordmau5> Franswillem?
- [19:16] <Lordmau5> Have one question to you
- [19:16] <FransWillem> Shoot
- [19:17] <Lordmau5> How can i compile the bukkit code for a mod on a easier way?
- [19:17] <Lordmau5> (sry german)
- [19:17] <FransWillem> No worries :)
- [19:17] <FransWillem> So a mod which you have the (MCP-based) source code for, right ?
- [19:17] <Lordmau5> yep :P
- [19:18] <FransWillem> https://github.com/Frans-Willem/BukkitPorting
- [19:18] <Lordmau5> and whats that now?
- [19:18] <FransWillem> A repository with stuff you need :)
- [19:18] <Lordmau5> oh well, epic thing
- [19:18] <FransWillem> What you normally do is compile your mod with MCP in the classpath, right ?
- [19:18] <Lordmau5> not exactly
- [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
- [19:18] <Lordmau5> using eclipse
- [19:19] <Lordmau5> ok
- [19:19] <FransWillem> Ok, wait, explain how you do it first
- [19:19] <FransWillem> and I'll tell you how to adjust it to compile for bukkit :)
- [19:19] <Lordmau5> so i have the mod ready for server
- [19:19] <Lordmau5> it works
- [19:19] <Lordmau5> its an addon for buildcraft made by smbarbour, and he said, i am allowed to port it to bukkit.
- [19:19] <Lordmau5> now i have the sourcecode ready, but what i would do now is
- [19:19] <Lordmau5> switching workspace in eclipse and add the files in the src folder
- [19:20] <Lordmau5> of the workspace
- [19:20] <FransWillem> Ah, ok :)
- [19:20] <FransWillem> So let's say you start with a clean workspace
- [19:20] <FransWillem> first, you start a project
- [19:20] <FransWillem> then add the mod files in the src folder
- [19:20] <Lordmau5> ok
- [19:20] <FransWillem> then add the craftbukkit.....MCP.jar in the project folder,
- [19:20] <FransWillem> and then add it to the classpath
- [19:20] <Lordmau5> as library, right?
- [19:21] <FransWillem> Ehm, basically right-click the project, pick java buildm path, pick tab Libraries, and Add JARs
- [19:21] <Lordmau5> yep
- [19:21] <Lordmau5> not add external jars?
- [19:21] <FransWillem> external JARs is good too :)
- [19:21] <Lordmau5> ok :D
- [19:21] <Lordmau5> let me do that one second
- [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
- [19:22] <Lordmau5> ok
- [19:22] <Lordmau5> so now
- [19:22] <FransWillem> And if it's a mod that adds to something else, you should probably add that mod as a JAR too
- [19:22] <Lordmau5> i added the craftbukkit jar
- [19:22] <Lordmau5> as external jar
- [19:22] <Lordmau5> next thing i would do
- [19:22] <Lordmau5> open up the src folder
- [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
- [19:22] <Lordmau5> create folder net.minecraft.src (better package)
- [19:22] <Lordmau5> aah :D
- [19:23] <FransWillem> But after you compile, you're not done yet
- [19:23] <Lordmau5> ok
- [19:23] <FransWillem> Because you compiled against MCPs names, and you want it to run against bukkit's names
- [19:23] <FransWillem> for that we have ApplySrg
- [19:23] <FransWillem> how you run ApplySrg is usually like this:
- [19:23] <Lordmau5> waaait
- [19:23] <Lordmau5> one second :P
- [19:24] <Lordmau5> oks
- [19:24] <Lordmau5> pls* xD
- [19:24] <FransWillem> You can read it later :)
- [19:24] <FransWillem> So you create a JAR of your mod as usual
- [19:24] <FransWillem> then you run ApplySrg like this:
- [19:24] <Lordmau5> jar of my mod... what?
- [19:25] <FransWillem> Or a zip file :p
- [19:25] <Lordmau5> dont even know how to do that :S
- [19:25] <FransWillem> How do you normally craete your zipfile ?
- [19:25] <Lordmau5> rightclick desktop
- [19:25] <Lordmau5> create zip file
- [19:26] <Lordmau5> call it something like
- [19:26] <FransWillem> Yeha, that's fine :)
- [19:26] <Lordmau5> mod_MODNAME.zip
- [19:26] <Lordmau5> and add the files i need in it
- [19:26] <FransWillem> Just create a zipfile as usual
- [19:26] <FransWillem> then do something like:
- [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
- [19:26] <FransWillem> then the final.zip one should run in craftbukkit
- [19:28] <Lordmau5> . . .
- [19:28] <Lordmau5> ok
- [19:29] <Lordmau5> and this is a "basic" batch file?
- [19:29] <Lordmau5> for windows
- [19:29] <FransWillem> yeah, you can make a batch file of it too
- [19:29] <FransWillem> or you can run it directly from cmd
- [19:29] <Lordmau5> ah ok
- [19:29] <FransWillem> But I really got to run
- [19:29] <Lordmau5> thanks at all :)
- [19:29] <FransWillem> Hope you get it working :)
- [19:29] <Lordmau5> yea, try it :D
- [19:29] <Lordmau5> thanks man
- [19:29] <Lordmau5> and cya :D
- [19:29] <FransWillem> If not, maybe I can help you out tomorrow :)
- [19:29] <Lordmau5> kk
- [19:30] <Lordmau5> cya
- -
- Lordmau5 is ~chatzilla@HSI-KBW-046-005-029-023.hsi8.kabel-badenwuerttemberg.de * New Now Know How
- Lordmau5 on #mcportcentral
- Lordmau5 using optical.esper.net Internet Retro Chat (Oslo, Norway)
- Lordmau5 has been idle 20secs, signed on Thu Apr 26 17:54:08
- Lordmau5 End of /WHOIS list.
- -
- End of Lordmau5 buffer Thu Apr 26 19:30:38 2012
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement