Compare commits

...
173 Commits
Author SHA1 Message Date
Christian 24ec338a51 Fix license and naming 2013-11-09 14:28:54 -05:00
AbrarSyed 4f634855ac added src distribution gradle file 2013-11-09 14:28:54 -05:00
Lex Manos 9f01e3407e Move to install to not clutter root directory with the .bat and .sh files I know are coming. 2013-11-09 14:28:54 -05:00
Lex Manos adeaeb74aa Include eclipse template workspace, for packaging in src distro. 2013-11-09 14:28:54 -05:00
Lex Manos e13c3966e0 Add gradle wrapper 2013-11-09 14:28:53 -05:00
Lex Manos 02c3b4e74b Publish to repo folder for local testing. 2013-11-09 14:28:53 -05:00
AbrarSyed 89a07d3668 Step 3: The Rebirth 2013-11-09 14:28:53 -05:00
Lex Manos b52eb6d699 Step 2: The Reformation 2013-11-09 14:28:53 -05:00
AbrarSyed 3281faf2be Step 1: The Purge 2013-11-09 14:28:53 -05:00
Christian 3d25b4e793 Add in the ability to strip interface references for specific interfaces - this is probably mostly useful for
scala scenarios where sythetic methods are generated and is not a substitute for using Optional.Method where appropriate.
Closes #300
2013-11-09 14:27:15 -05:00
Christian f4532410ec Change a couple of warnings, as a prelude to 1.7- preinit is now required for all GameRegistry activity, and every item and block REQUIRES registration. 2013-11-06 16:18:41 -05:00
Christian 8f87021b0f Fix derp with custom properties. They work now! 2013-11-05 22:23:24 -05:00
Christian bc57ff9e83 Fix recursive API dependency resolution. Allows nested APIs, such as BuildCraft's 2013-10-31 09:39:34 -04:00
Christian de8ab934d8 Fix up duplicate entries 2013-10-30 22:46:19 -04:00
Christian 81fe1c9682 Add in an API marker for API type packages.
This does several things:
1. Packages marked as API will generate a new "modid" (the provides) that can be depended on.
2. Packages marked as API will be searched systemwide, and anything declaring that package (even without the API marker)
will get an implicit dependency on the API package.
3. The API package itself will get a soft dependency on the "owner" package.

@Optional elements can refer to the API packages instead of a concrete mod as well.
2013-10-30 22:20:28 -04:00
Christian 58a299aabc Attempt to inject coremods as tweakers, so both can share a dependency ordering 2013-10-27 13:28:50 -04:00
Christian 243a21a353 Wrapping coremods as tweakers. Part 1. 2013-10-20 11:53:07 +02:00
Christian f0dc530b28 Fix up documentation of VersionCheckHandler - it only ever accepted a String and only works on the NetworkMod annotated class 2013-10-20 11:45:00 +02:00
Christian dac7f590ea Modify ordering of networkmod registration and mod instantiation. This fixes VersionCheckHandler logging an incorrect failure message due
to NPE.
2013-10-20 11:41:28 +02:00
Lex Manos bf54d4d667 Make each mod's EventBus log a child of it's main logger. 2013-10-19 18:24:24 -07:00
Christian da4337efbf Fix up handling the new method signature data for NetworkCheckHandlers 2013-10-14 21:28:15 -04:00
Christian f92962bbbb Use null to empty, so missing values work. *sigh* 2013-10-13 22:36:47 -04:00
Christian 2714da1022 Primitive capability for tweakers to order. Add a "TweakOrder" integer
property to your manifest, or accept the default of zero.
2013-10-12 10:28:11 -04:00
LexManos 96be82343c Merge pull request #280 from mc10/patch-1
Very minor style fixes
2013-10-09 20:56:05 -07:00
Kevin Ji 58577775d2 Very minor style fixes
Replacing tabs with spaces consistently, making brace styles consistent, etc.
2013-10-09 19:53:50 -07:00
Christian fc3e7647d2 Support, and fix up, interface lists for Optional 2013-10-09 13:58:14 -04:00
Lex Manos a381874bb9 Delay sound system backend initalization to speed up startup and prevent race condition on some computers. 2013-10-06 11:13:07 -07:00
Christian 55525f6d2e ModLoader is officially deprecated. It will all cease to be with 1.7. 2013-10-06 11:06:31 -04:00
Christian bc64ceabef Optional shouldn't be constructable itself. It's purely a wrapper thing. 2013-10-06 10:56:47 -04:00
Christian 63ba3aa009 Add in support for Optional interfaces and methods. Be gone coremods! 2013-10-04 17:20:05 -04:00
Christian 5265e34a35 Fix null killing the server 2013-09-29 15:51:38 -04:00
Lex Manos 35ab9f52b0 Fix md5s for new checksums.sha1 in scala libraries. 2013-09-28 19:47:32 -07:00
Christian 9b55f1f48f Attempt at a shared modlist implementation - should allow visibility between liteloader and fml for "mod list display" 2013-09-27 10:45:20 -04:00
Christian e356f4d713 Cross-modsystem compatibility fix with thanks to Mumfrey @ liteloader 2013-09-27 10:01:39 -04:00
Christian bfc25bc5da Add to both the classloader and the parent 2013-09-26 13:01:00 -04:00
Christian 9f0f9e7288 Fix deobf tweaker 2013-09-26 10:11:29 -04:00
Christian ce6404fd5b TYPOS!!! 2013-09-26 09:33:48 -04:00
Christian 8f18a3de9a Separate deobf tweaker so it runs last. Should fix problems with cascaded tweakers
expecting an obf environment.
2013-09-26 09:23:25 -04:00
Christian 9815d8c379 Update for launchwrapper 1.8 2013-09-25 16:40:59 -04:00
Christian 1d902df581 Use the negative cache in latest legacylauncher. 2013-09-25 11:46:11 -04:00
Christian 8e26c99de3 Add debugging for deobfuscation
Add negative caching for field and method maps. Should shortcut some work

Fix handling the case where a class doesn't exist, but still needs deobf

Ask the patch manager for the bytes for the class, not the classLoader

Fix up some more places where we should look for a patched class

Fix problem with empty source classes and runtime deobfuscation
2013-09-25 07:37:25 -04:00
Lex Manos fc8c3bef03 Update to new installer that uses xz compression and better support for non-standard jvms 2013-09-24 23:21:17 -07:00
Christian a4de22c1ad And use the parent that's actually going to be valid. *sigh* 2013-09-24 08:42:13 -04:00
Christian 70cffe6982 Herpaderp. Make addURL accessible. *sigh* 2013-09-24 07:33:11 -04:00
Christian 39620f1e41 Fix injection of tweaker into system 2013-09-23 13:33:16 -04:00
cpw 0e80fcb8f7 Merge pull request #284 from smcv/uninit
Fix NPE when loading second single-player world
2013-09-22 18:24:56 -07:00
Simon McVittie 4a94c2c71b Fix NPE when loading second single-player world
After leaving a single-player world, getServer() can return null, resulting
in the stack trace below, "Fatal errors were detected during the
transition from SERVER_STOPPING to SERVER_ABOUT_TO_START",
"The ForgeModLoader state engine has become corrupted" and the client
getting stuck forever.

Exception in thread "Server thread" java.lang.NullPointerException
at cpw.mods.fml.client.FMLClientHandler.serverStopped(FMLClientHandler.java:620)
at cpw.mods.fml.common.FMLCommonHandler.handleServerStopped(FMLCommonHandler.java:468)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583)
2013-09-22 16:56:24 +01:00
Christian 79c39f8b7c Fix classpath for launchwrapper 1.7 2013-09-21 16:15:05 -04:00
Christian f6190e8752 Update workspaces for 1.6.4 2013-09-20 17:23:18 -04:00
Christian 0950b9fc84 Fix up a deep crash in the early server init hanging the client 2013-09-20 17:12:01 -04:00
Christian 25981706ef Update for MC 1.6.4 2013-09-20 16:25:12 -04:00
Lex Manos 82d896a35e Make final transformers actually work on methods as well. 2013-09-19 12:59:12 -07:00
Christian e7dd728f95 Format the log messages through MessageFormat. Thanks CovertJaguar for the pointer. Closes #282 2013-09-19 08:23:56 -04:00
Lex Manos 8f2e675581 Update the src distro's eclipse workspace. 2013-09-18 15:21:56 -07:00
Christian ff75416a32 Update mc_versions data and commands patch and eclipse workspace 2013-09-18 18:01:04 -04:00
Christian 95afc95b24 Update mcp mod info 2013-09-18 17:02:41 -04:00
Christian 34493b0d99 Update for real 1.6.3 update 2013-09-18 16:59:28 -04:00
Christian e77d2547ad Update for pre-ninja 1.6.3 update 2013-09-18 16:33:11 -04:00
Christian 40a34af431 Merge branch 'master' into newtweak 2013-09-18 14:49:53 -04:00
Christian 352117fd78 Update for new installer and thank you. 2013-09-17 21:56:25 -04:00
Christian 81328b6684 Add in support for using a mirror list and provide checksums for packed download of libs 2013-09-15 22:58:39 -04:00
Christian b5af446d71 Fix sidedness derp in LanguageRegistry. 2013-09-13 19:04:25 -05:00
Christian d0c6e92900 Update MCP data 2013-09-03 17:56:09 -04:00
Christian 2a9c485edc Remove @SideOnly from 70318 (getDistance) it makes no sense that it's not on the server. 2013-09-02 12:24:17 -04:00
Christian a13598b17e Use java 1.6 compatible method of closing the zip file. Stops stupid compile error. 2013-09-02 00:12:36 -04:00
Christian 40b54013b4 Allow server side lang file injection, hopefully 2013-08-27 22:45:10 -04:00
Christian 1c9a853868 Allow coremods to properly inject asset readers. 2013-08-27 12:31:37 -04:00
Christian da70cdd35a Update tweaker for new Launcher API 2013-08-23 10:42:26 -04:00
Christian b993cf4a98 More exception handling for less derpiness. 2013-08-20 20:46:18 -04:00
Christian ac065ff5f7 Reset the IWorldGenerator seed for each mod, before calling. That should mean worldgen is consistent
and not dependent on mod ordering, or mod sideeffects.
2013-08-19 14:56:01 -04:00
Christian 913f6f6d36 Try and use the relaunch log, which should be classloaded.. 2013-08-19 14:55:37 -04:00
Christian 9468e41bbf Fix up scala refs, for better results 2013-08-18 18:58:36 -04:00
Christian ffdd056a18 Check keys, not values *sigh* 2013-08-17 13:27:43 -04:00
Christian f157e7a6ec And more coremod logging 2013-08-17 13:14:55 -04:00
Christian 4a9d0f9bd5 Add in some log information 2013-08-17 13:10:28 -04:00
Christian 0398916666 And actually instantiate the collection *sigh* 2013-08-17 12:57:15 -04:00
Christian dec9a3924d Add in "FMLCorePluginContainsMod" in the manifest. If this value is
present, FML will attempt to parse your mod jar file as a normal mod
file as well, instantiating mod containers there.
2013-08-17 12:48:38 -04:00
Christian 2470120680 Clean up a couple of resources. Also, don't parse jars just because
they're in the mods dir
2013-08-17 11:40:15 -04:00
Christian ba90b61607 Make sure we only add args to the argument list if a tweaker hasn't already.
Should fix LiteLoader compatibility issue.
2013-08-16 16:28:55 -04:00
Christian 9a5e24e338 Fix stupid derp is stupid. Closes #275 and means sp614x can do his thing 2013-08-16 16:18:50 -04:00
LexManos 29ef3d5ab4 Update installer. 2013-08-06 11:42:38 -07:00
LexManos f46a538b41 Merge pull request #268 from Bo98/sh-args-fix
Fixed install.sh not passing arguments to install.py
2013-08-04 15:32:06 -07:00
Bo 182aa9c0cb Fixed install.sh not passing arguments to install.py 2013-08-03 17:43:57 +01:00
cpw 1857064afa Merge pull request #266 from grompe/patch-1
Add missing SideOnly in BaseMod
2013-08-01 04:21:22 -07:00
Grom PE cb05c8c4aa Add missing SideOnly in BaseMod
NetClientHandler exists only on client side and thus method using it should be annotated with SideOnly.
2013-08-01 14:19:30 +07:00
cpw f275a24b43 Add in some reverse lookup methods for game registry data 2013-07-29 22:05:22 +02:00
cpw 1d84e8063e Temporarily add a version of 'reobfuscate.py' that will resolve complex
reobfuscation graph issues with specialsource. Copy it over 'reobfuscate.py'
in the mcp runtime dir. Hopefully will have an MCP/specialsource fix in
the coming days.
2013-07-28 22:38:26 +02:00
cpw 57befa89bb Fix keybindings being derped 2013-07-28 20:52:12 +02:00
LexManos 10b16d32da Use json 2.9.1 nightly for OSX in release json like vanilla does. 2013-07-17 12:21:26 -07:00
LexManos 3f21a2c1b4 Stupid spaces and windows escaping -.- 2013-07-16 14:34:43 -07:00
LexManos b2958c9066 Add quotes for paths with spaces -.- 2013-07-16 13:35:14 -07:00
LexManos 9520978b81 Use a temporary file for recompile's command line to combat command length to long issues. 2013-07-16 13:08:26 -07:00
LexManos 4981aa3421 Fix potential NPE in villager skin registry. 2013-07-16 10:32:29 -07:00
LexManos c48b48ee15 Fix server launching. 2013-07-15 10:57:44 -07:00
Christian 9947ba8503 Fix logo handling. no more NPE if the logo can't be found. Also, fix location of mcp logo now. 2013-07-14 13:40:55 -04:00
Christian a3f48734ff Fix up jar sanity check code. FML validation of the jar works now and doesn't derp classloading. 2013-07-14 13:11:32 -04:00
Christian 0378355c37 The server.classpath generates the runtime manifest, so it needs the
non-debug asm jars.
2013-07-14 11:12:42 -04:00
LexManos c625ef3009 Update Forge signature for new private key 2013-07-12 03:05:20 -07:00
LexManos d4b30422b6 Update build and eclipse workspaces for debug asm. 2013-07-12 00:22:11 -07:00
Christian 6de36d78f5 Coremods now have a primitive dependency capability. Also, we search mods dir for special
"TweakClass" manifests. These are using the vanilla tweak mechanism to inject into
Minecraft. Helpful for other "platform" systems, when you don't want to have to deal
with json changes!
2013-07-11 23:23:33 -04:00
LexManos 7348929819 Kill release time scala libraries, to be re-evaluated after all movement is done and shit is fixed. May require manual instalation for mods that use scala. 2013-07-11 15:24:54 -07:00
LexManos b9f4b02cb0 Kill mcp's truncate method, for more useful logs. 2013-07-10 15:23:21 -07:00
Christian 20e93a412e Fix up logos in the mod screen. Clean up some unnecessary casts and suppressions, use the -debug asm
library at dev time, since it contains full symbols and code in compiled form.
2013-07-10 15:47:13 -04:00
Christian e44e8b3112 Force a global asset scan prior to mod construction : you should be able to
reference assets anywhere in your mod now.
2013-07-10 00:42:40 -04:00
Christian bab4d87ce7 Update FML for new stealth update for 1.6.2 2013-07-09 15:00:28 -04:00
cpw bc9d1fe657 Merge pull request #254 from CaptainShadows/patch-1
@InstanceFactory was set to look for Fields instead of methods
2013-07-09 07:19:24 -07:00
Christian d4d522c597 And don't forget to remove the test code 2013-07-09 08:31:40 -04:00
Christian 97269a5e3d Decode the file URL. Hopefully will make things work more.. 2013-07-09 08:30:47 -04:00
LexManos c913258ca3 Disable signature check of client for now, it's broken. 2013-07-09 05:04:11 -07:00
LexManos c7ab872c85 Temporarily disable GuiModList's Mod logos. 2013-07-09 03:27:49 -07:00
LexManos e91431fb70 Don't validate signatures on servers, they are not signed. 2013-07-09 03:27:29 -07:00
LexManos dfa3a2665d Add MC Version to installed version name. 2013-07-09 03:27:01 -07:00
LexManos 4fa375683f Fix NPE in new debug line when patch targets don't exist. 2013-07-09 01:21:50 -07:00
Christian 0db4624b27 Don't initialize the server. 2013-07-08 22:31:15 -04:00
Christian c997f2adbc FML now verifies that the minecraft jar is correct and intact. This is intended to discourage those who think that
modifying the minecraft jar is still acceptable.
2013-07-08 22:10:06 -04:00
Christian 26e5f4b4ff Test server-siding ResourceLocation 2013-07-08 19:31:00 -04:00
Christian 2336002f20 The game is going to exit in face of patch mismatch, unless you force it to run with fml.ignorePatchDiscrepancies in the system properties. 2013-07-08 14:34:03 -04:00
Christian e88a0cd13f Update for stealth update. Thanks mojang! 2013-07-08 13:19:55 -04:00
Christian dbf5fe38ce We now generate an adler32 checksum for each patched file and verify at load time that they match.
Mismatch won't crash, but will emit a big warning..
2013-07-08 13:19:14 -04:00
Christian c47d08c89d Tweak debug data on patched classes 2013-07-08 12:28:32 -04:00
Captain Shadows 7af5c21d74 @InstanceFactory was set to look for Fields instead of methods
"fix it" to now match the javadoc :P

if it was set like that so modders wouldn't use it, it might be better to just say so in the documentation
2013-07-08 00:07:54 -04:00
LexManos 6f96d89e2b Update eclipse workspaces for 1.6.2 2013-07-07 13:11:22 -07:00
Christian 111b0216fd Add the jsons for 1.6.2 2013-07-07 16:05:53 -04:00
Christian 1d0384f8f6 Update for 1.6.2 and MCP 8.04 2013-07-07 15:49:11 -04:00
Christian adc8972277 Add cascadedTweaks. This will allow simple coexistence for any other mod framework using
the tweaker system as well. Hi Voxel and LiteLoader!
2013-07-06 22:26:03 -04:00
cpw 5990e29af7 Merge pull request #247 from jk-5/patch-1
Pull request for #232
2013-07-06 18:54:54 -07:00
Christian 2676c8999c Update mcp data. fixes #248 2013-07-06 21:25:36 -04:00
Christian 3a200e901e Fix coremod injection into main system. Should stop double-dipping coremods. 2013-07-06 20:51:00 -04:00
Jeffrey Kog c97ac284a5 Update ModLoaderFuelHelper.java 2013-07-04 08:33:03 +02:00
LexManos 54e06e841d Move Resource refreshing until affter postInit. 2013-07-03 22:29:10 -07:00
LexManos 7ce84491d1 Fix missing argument and startclient/startserver support. 2013-07-03 19:30:30 -07:00
LexManos 532bee7ce1 Update to new MCP bugfix version, Fixes: Missing Armor/Item rendering, and Boss health mapping issues. 2013-07-03 18:23:38 -07:00
LexManos e24f949517 Fix eclipse workspaces and launch configurations. 2013-07-03 18:22:57 -07:00
LexManos 4545beb49d Add deobf-data to setup env. 2013-07-03 18:22:06 -07:00
Christian 3f4bf61ae6 Update key 2013-07-03 08:28:59 -04:00
Christian 155e846818 Add in support for mods/<mcversion> as a mod location. Also drop coremods as a location. They go in mods too now. 2013-07-02 23:03:01 -04:00
Christian ba3707af22 More javadoc cleanup 2013-07-02 19:39:02 -04:00
Christian ad79b9ed86 Fix up some deprecation warnings, and clean up coremod code that's going
away.
2013-07-02 19:27:50 -04:00
Christian 5f7df5e742 Revert "Keep these on our servers until the launcher is actually fixed -.-"
This reverts commit f1b533ad87.
2013-07-02 19:03:06 -04:00
Christian 7aa7221756 Fix transformer search 2013-07-02 18:40:23 -04:00
cpw 8844554da6 Merge pull request #243 from jrtc27/modclassloader
Fixed ClassCastException when loading ModLoader mods
2013-07-02 15:32:35 -07:00
James Clarke 6f0eedc9a6 Fixed ClassCastException when loading ModLoader mods 2013-07-02 20:48:00 +01:00
Christian f21cd286ca Resource packs, part two. FML mods are now resource packs. Vanilla will scan anything under 'assets'
and turn it into a resource prefix. Use resourcelocations to look stuff up.
2013-07-02 11:11:50 -04:00
LexManos f1b533ad87 Keep these on our servers until the launcher is actually fixed -.- 2013-07-01 23:26:40 -07:00
Christian 5a97d183df Remember to update your patches!!!! 2013-07-02 02:14:31 -04:00
Christian fbd57b3264 Mods are now loaded as resource packs. Vanilla will scan for valid prefixes based on subdirs of 'assets' which
can then be referenced as ResourceLocations with the "<prefix>:path" notation.
2013-07-02 01:39:40 -04:00
Christian efc369ee83 Fix EventHandler annotation. 2013-07-02 01:08:51 -04:00
Christian 91ecf71109 Fix -rel json 2013-07-02 01:02:02 -04:00
LexManos 9b6525e805 Point scala downloads to our servers, Launcher doesn't like standard maven repos. 2013-07-01 21:53:13 -07:00
LexManos dc7d02ebf6 Fix json syntax error. 2013-07-01 20:33:26 -07:00
Christian 7037184a4e Fix up release JSON 2013-07-01 23:14:31 -04:00
Christian bf38d94756 Update json samples 2013-07-01 22:58:08 -04:00
LexManos 3d17434510 Build installer package for the new client launcher. 2013-07-01 19:40:19 -07:00
LexManos 29d6c875d0 Add FML Installer logo crated by @ZaverSLO https://twitter.com/ZaverSLO/status/349947190300508162 2013-07-01 19:38:44 -07:00
LexManos 902772ed0c Revert common folder fix, Common folder does nothing, feel free to delete it after first load. 2013-07-01 16:25:11 -07:00
LexManos 1229c4c4ea Fix src distrabution, and got rid of pesky common folder in eclipse workspace. src is now installable. 2013-07-01 15:50:49 -07:00
Christian 7fecf2ad6b Update mcp URL. 2013-07-01 11:06:20 -04:00
Christian c418da353f Cleanup coremod code, server side working now. 2013-06-30 22:51:56 -04:00
LexManos 110cf372eb Add deobf data to merge-common, worspace is now actually runnable! 2013-06-30 19:41:51 -07:00
LexManos 7a004087f7 Add deobf data to src dist.
Dont create deobf jar as we ship the lzma
Added *.lzma to .gitignore
2013-06-30 19:15:53 -07:00
LexManos 70cfe24e67 Fix wrong project name in distro eclipse launch. 2013-06-30 18:33:26 -07:00
LexManos 8960f6869f Add windows lzma executable
http://tukaani.org/xz/
He states that most things are under public domain, But I couldn't find an exact reference to this executable.
I'm going to assume it under public domain and distribuiting it here is fine. If not someone please direct me to the apropriate license and I will act accordingly.
2013-06-30 18:31:24 -07:00
Christian 71a92de5d9 Client launch for eclipse 2013-06-30 21:06:33 -04:00
Christian 3f15cd54c2 Functional client @ 1.6.1 2013-06-30 21:02:23 -04:00
Christian 12c928c538 Tweak commands patch 2013-06-30 19:33:47 -04:00
Christian 7406b38d8a 1.6.1 2013-06-30 16:50:30 -04:00
Christian ef646d3146 Merge branch '16launch' 2013-06-30 13:20:46 -04:00
Christian 18371bd8c9 Some fixes for updated mcp code 2013-06-30 13:17:20 -04:00
Christian e35e4b16ff More fixups 2013-06-30 09:04:50 -04:00
LexManos 3711da9c45 Another typo 2013-06-30 03:55:26 -07:00
LexManos 6a318ddb78 Fix typo in new packages. 2013-06-30 01:01:55 -07:00
LexManos 2766f9a293 Push conf folder for 1.6, Relied heavily on a yet-unreleased version of MCP. 2013-06-29 22:48:24 -07:00
Christian 2e3f2461fa More fixes, binpatching works 2013-06-29 15:16:18 -04:00
355 changed files with 38954 additions and 44786 deletions

No files matched your search

+4
View File
@@ -1,9 +1,13 @@
* text eol=lf
*.bat text eol=crlf
*.patch text eol=lf
*.java text eol=lf
*.gradle text eol=crlf
*.png binary
*.exe binary
*.dll binary
*.jar binary
*.lzma binary
*.zip binary
*.pyd binary
*.cfg text eol=lf
+15 -16
View File
@@ -1,17 +1,16 @@
#eclipse
/bin
/minecraft_server
/mods
/fmlbuild.properties
/fmlversion.properties
/difflist.txt
/target
fmlbranding.properties
/fernflower.zip
/commands.py.bck
/mcp*.zip
/mcp
/eclipse
/deobfuscation_data*.zip
/binpatch
/mcp_data/
/map_client.txt
/.settings
/.classpath
#idea
/.idea
*.iml
#gradle
/build
/.gradle
#occupational hazards
/eclipse/
/repo/
File renamed without changes.
-69
View File
@@ -1,69 +0,0 @@
{
"id": "FML152",
"time": "2013-03-20T12:00:00-04:00",
"releaseTime": "2013-03-20T12:00:00-04:00",
"type": "release",
"minecraftArguments": "${auth_player_name} ${auth_session} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"libraries": [
{
"name": "cpw.mods:fml:5.2"
},
{
"name": "net.minecraft:launchwrapper:1.3"
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "org.ow2.asm:asm-all:4.1"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0"
},
{
"name": "net.java.jinput:jinput:2.0.5"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47"
},
{
"name": "com.google.guava:guava:14.0"
},
{
"name": "net.java.jutils:jutils:1.0.0"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
View File
File renamed without changes.
-14
View File
@@ -1,14 +0,0 @@
import os, sys
def main():
fml_dir = os.path.abspath(sys.argv[1])
work_dir = os.path.normpath(sys.argv[2])
mcp_dir = os.path.normpath(sys.argv[3])
sys.path.append(os.path.join(fml_dir, 'install'))
from fml import apply_fml_patches
apply_fml_patches(fml_dir, mcp_dir, work_dir, False)
if __name__ == '__main__':
main()
+106
View File
@@ -0,0 +1,106 @@
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT'
}
}
import static net.minecraftforge.gradle.dev.FmlDevPlugin.*
apply plugin: 'maven'
apply plugin: 'fmldev'
repositories {
flatDir {
name "fileRepo"
dirs "repo"
}
}
minecraft {
version = '1.6.4'
fmlDir = projectDir.getAbsolutePath();
mainClass = 'cpw.mods.fml.relauncher.ServerLaunchWrapper'
installerVersion = "1.4"
}
group = 'cpw.mods'
version = getVersionFromGit(project)
jenkins {
job = 'fml'
}
uploadArchives {
repositories {
if (project.hasProperty("filesmaven")) {
logger.info('Publishing to files server')
mavenDeployer {
configuration = configurations.deployerJars
repository(url: project.filesmaven.url) {
authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key)
}
pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'ForgeModLoader'
url 'https://github.com/MinecraftForge/FML'
scm {
url 'https://github.com/MinecraftForge/FML'
connection 'scm:git:git://github.com/MinecraftForge/FML.git'
developerConnection 'scm:git:[email protected]:MinecraftForge/FML.git'
}
issueManagement {
system 'github'
url 'https://github.com/MinecraftForge/FML/issues'
}
licenses {
license {
name 'GNU Lesser Public License (LGPL), Version 2.1'
url 'http://www.gnu.org/licenses/lgpl-2.1.txt'
distribution 'repo'
}
}
developers {
developer {
id 'cpw'
name 'cpw'
roles { role 'developer' }
}
}
developers {
developer {
id 'LexManos'
name 'Lex Manos'
roles { role 'developer' }
}
}
}
}
}
} else {
logger.info('Publishing to repo folder')
mavenDeployer {
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
}
}
}
}
-408
View File
@@ -1,408 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
30 Mar 2012 13:35:40
FML
The Forge Mod Loader
cpw
====================================================================== -->
<project name="FML" default="jenkinsbuild">
<description>The Forge Mod Loader</description>
<target name="writeversion" depends="buildenvsetup">
<exec executable="${python.exe}" dir="${basedir}" failonerror="true">
<arg value="${basedir}/getversion.py" />
<arg value="${mcp.home}" />
</exec>
<propertyfile file="fmlversion.properties">
<entry key="fmlbuild.build.number" type="int" value="${version.build}" />
<entry key="fmlbuild.deobfuscation.hash" type="string" value="${deobf.checksum}" />
</propertyfile>
</target>
<target name="buildenvsetup">
<tstamp>
<format pattern="yyMMddHHmmss" property="timestamp" />
</tstamp>
<property environment="env" />
<property name="modname" value="fml" />
<condition property="mcp.home" value="${env.WORKSPACE}/mcp" else="${basedir}/mcp">
<isset property="env.WORKSPACE" />
</condition>
<property name="fml.python.dir" location="${basedir}/python" />
<condition property="python.exe" value="${fml.python.dir}/python_fml" else="python">
<os family="Windows" />
</condition>
<condition property="mcp.exists">
<available file="${mcp.home}/runtime/commands.py" />
</condition>
<condition property="signature.exists">
<available file="${env.JENKINS_HOME}/fmlsigned.properties" />
</condition>
<property name="mcp.obfoutput" location="${mcp.home}/reobf" />
<property name="client.mcp.obfoutput" location="${mcp.obfoutput}/minecraft" />
<property name="mcp.srcdir" location="${mcp.home}/src" />
<property name="client.mcp.srcdir" location="${mcp.srcdir}/minecraft" />
<property name="clean.mcp.srcdir" location="${mcp.home}/src-base" />
<property name="patch.mcp.srcdir" location="${mcp.home}/src-work" />
<property name="tmp.mcp.srcdir" location="${mcp.home}/src-tmp" />
<property name="renamed.mcp.srcdir" location="${mcp.home}/src-renamed" />
<property name="common.src.dir" location="${basedir}/common" />
<property name="client.src.dir" location="${basedir}/client" />
<property name="patch.src.dir" location="${basedir}/patches" />
<property name="fml.conf.dir" location="${basedir}/conf" />
<condition property="version.build" value="${env.BUILD_NUMBER}" else="1">
<isset property="env.BUILD_NUMBER" />
</condition>
<available file="eclipse" property="eclipse.exists" />
</target>
<target name="makeversion" depends="buildenvsetup">
<antcall target="writeversion" />
<property file="fmlversion.properties" />
<property name="build.number" value="${fmlbuild.major.number}.${fmlbuild.minor.number}.${fmlbuild.revision.number}" />
<property name="version.major" value="${fmlbuild.major.number}" />
<property name="version.minor" value="${fmlbuild.minor.number}" />
<property name="version.rev" value="${fmlbuild.revision.number}" />
<property name="version.minecraft" value="${fmlbuild.mcversion}" />
<property name="version.branch" value="${fmlbuild.branch}" />
<property name="version" value="${version.major}.${version.minor}.${version.rev}.${version.build}" />
</target>
<target name="makeclean" depends="buildenvsetup" if="mcp.exists">
<exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${mcp.home}/runtime/cleanup.py" />
<arg value="-f" />
</exec>
</target>
<target name="clean" depends="buildenvsetup,makeclean" if="mcp.exists">
<exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${basedir}/decompile.py" />
<arg value="--mcp-dir" />
<arg value="${mcp.home}" />
<arg value="--fml-dir" />
<arg value="${basedir}" />
<arg value="--gen-conf" />
</exec>
</target>
<target name="reobfuscate" depends="buildenvsetup,recompile">
<exec executable="${python.exe}" dir="${mcp.home}" failonerror="true">
<arg value="${mcp.home}/runtime/reobfuscate.py" />
</exec>
<fail message="Reobfuscation failed">
<condition>
<not>
<and>
<available file="${mcp.home}/temp/client.md5" />
<available file="${mcp.home}/temp/client_reobf.md5" />
</and>
</not>
</condition>
</fail>
<exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${basedir}/generatechangedfilelist.py" />
<arg value="${mcp.home}" />
<arg value="${basedir}/difflist.txt" />
</exec>
</target>
<target name="recompile" depends="buildenvsetup">
<exec executable="${python.exe}" dir="${mcp.home}" failonerror="true">
<arg value="${mcp.home}/runtime/recompile.py" />
</exec>
<fail message="Compilation failed">
<condition>
<not>
<available file="${mcp.home}/bin/minecraft/net/minecraft/client/Minecraft.class" />
</not>
</condition>
</fail>
</target>
<target name="merge-client" depends="buildenvsetup">
<copy todir="${client.mcp.srcdir}" overwrite="true" verbose="true">
<fileset dir="${client.src.dir}" includes="**/*.java" />
</copy>
</target>
<target name="merge-common">
<copy todir="${client.mcp.srcdir}" overwrite="true" verbose="true">
<fileset dir="${common.src.dir}" includes="**/*.java" />
</copy>
</target>
<target name="merge-source" depends="buildenvsetup,merge-client,merge-common" />
<target name="build-universal" depends="buildenvsetup,merge-client,merge-common,reobfuscate,makeversion,makebinpatches">
<condition property="universal.jarname" value="${modname}-universal-${version.minecraft}-${version}" else="${modname}-universal-${version.minecraft}-${version}-${version.branch}">
<equals arg1="${version.branch}" arg2="master" />
</condition>
<mkdir dir="${basedir}/target" />
<jar destfile="${basedir}/target/${universal.jarname}.zip" duplicate="preserve">
<manifest>
<attribute name="Main-Class" value="cpw.mods.fml.relauncher.ServerLaunchWrapper" />
<attribute name="Class-Path" value="minecraft_server.jar:lib/guava-14.0-rc3.jar:lib/bcprov-jdk15on-148-src.zip:lib/asm-debug-all-4.1.jar:lib/scala-library.jar:lib/argo-3.2-src.jar" />
</manifest>
<fileset dir="${client.mcp.obfoutput}" includes="**/*.class" excludes="*.class,net/minecraft/**/*.class" />
</jar>
<antcall target="signjar" />
<zip update="true" destfile="${basedir}/target/${universal.jarname}.zip">
<zipfileset dir="${basedir}/binpatch" prefix="binpatch" includes="**/*.binpatch"/>
<fileset dir="${client.mcp.obfoutput}" includes="*.class" />
<zipfileset dir="${basedir}" includes="fmlversion.properties" />
<zipfileset dir="${basedir}" includes="LICENSE-fml.txt" />
<zipfileset dir="${common.src.dir}" includes="mcpmod.info" />
<zipfileset dir="${client.src.dir}" includes="mcp.png" />
<zipfileset dir="${basedir}" includes="install/CREDITS-fml.txt" fullpath="CREDITS-fml.txt" />
<zipfileset dir="${common.src.dir}" includes="*.cfg" />
<mappedresources>
<concat>
<fileset dir="${basedir}/install" includes="README.txt" />
<filterchain>
<replacetokens>
<token key="MAJOR" value="${version.major}" />
<token key="MINOR" value="${version.minor}" />
<token key="REV" value="${version.rev}" />
<token key="BUILD" value="${version.build}" />
<token key="MCVERSION" value="${version.minecraft}" />
</replacetokens>
</filterchain>
</concat>
<mergemapper to="README-fml.txt" />
</mappedresources>
</zip>
</target>
<target name="build-source-pack" depends="makeversion">
<property name="srcpack.jarname" value="${modname}-src-${version.minecraft}-${version}-${version.branch}" />
<zip destfile="${basedir}/target/${srcpack.jarname}.zip">
<zipfileset dir="${basedir}" includes="LICENSE-fml.txt,difflist.txt,commands.patch,mcp_merge.cfg,mc_versions.cfg" prefix="fml" />
<zipfileset dir="${common.src.dir}" includes="**/*.java" prefix="fml/common" />
<zipfileset dir="${client.src.dir}" includes="**/*.java" prefix="fml/client" />
<zipfileset dir="${client.src.dir}" includes="mcp.png" prefix="fml/client" />
<zipfileset dir="${basedir}" includes="fmlversion.properties" prefix="fml/common" />
<zipfileset dir="${common.src.dir}" includes="*.cfg" prefix="fml/common" />
<zipfileset dir="${common.src.dir}" includes="mcpmod.info" prefix="fml/common" />
<zipfileset dir="${patch.src.dir}" includes="**/*.patch" prefix="fml/patches" />
<zipfileset dir="${fml.conf.dir}" prefix="fml/conf" />
<zipfileset dir="${fml.python.dir}" prefix="fml/python" />
<mappedresources>
<concat>
<fileset dir="${basedir}/install" includes="README.txt" />
<filterchain>
<replacetokens>
<token key="MAJOR" value="${version.major}" />
<token key="MINOR" value="${version.minor}" />
<token key="REV" value="${version.rev}" />
<token key="BUILD" value="${version.build}" />
<token key="MCVERSION" value="${version.minecraft}" />
</replacetokens>
</filterchain>
</concat>
<mergemapper to="fml/README-fml.txt" />
</mappedresources>
<zipfileset dir="${basedir}/install" excludes="README.txt,fml.pyc" prefix="fml" />
</zip>
</target>
<target name="build-deobf-data" depends="makeversion">
<mkdir dir="build-tmp-deobf" />
<copy todir="build-tmp-deobf">
<mappedresources>
<fileset dir="${mcp.home}/conf" includes="packaged.srg" />
<globmapper from="packaged.srg" to="deobfuscation_data-${version.minecraft}" />
</mappedresources>
</copy>
<exec executable="lzma">
<arg line="build-tmp-deobf/deobfuscation_data-${version.minecraft}"/>
<arg line="-v"/>
</exec>
<copy todir="${basedir}">
<fileset dir="build-tmp-deobf" includes="*.lzma" />
</copy>
<antcall target="writeversion" />
<delete dir="build-tmp-deobf" />
<zip destfile="deobfuscation_data-${version.minecraft}.jar" basedir="${basedir}">
<include name="deobfuscation_data-${version.minecraft}.lzma"/>
</zip>
</target>
<target name="build" depends="buildenvsetup,merge-client,merge-common,build-deobf-data,build-universal,build-source-pack" />
<target name="jenkinsbuild" depends="buildenvsetup,jenkinsfmldecompile,patch,build" />
<target name="patch" depends="buildenvsetup">
<exec executable="${python.exe}" dir="${basedir}">
<arg value="${basedir}/applypatches.py" />
<arg value="${basedir}" />
<arg value="${mcp.srcdir}" />
<arg value="${mcp.home}" />
</exec>
</target>
<target name="setupenvironment" depends="buildenvsetup">
<input message="This will clean the mcp environment at ${mcp.home} and backup any src-work folder there (src-base will be erased). Continue?" validargs="y,n" addproperty="do.continue" />
<condition property="do.not.continue">
<equals arg1="n" arg2="${do.continue}" />
</condition>
<fail if="do.not.continue">You have decided not to continue. This script will stop now.</fail>
<echo>Preparing the MCP environment at ${mcp.home}</echo>
<antcall target="fmldecompile" />
<echo>Moving old patched sources at ${patch.mcp.srcdir} out of the way</echo>
<move todir="${mcp.home}/src-work${timestamp}" failonerror="false" verbose="true">
<fileset dir="${patch.mcp.srcdir}" />
</move>
<echo>Deleting old patch references at ${clean.mcp.srcdir}</echo>
<delete dir="${clean.mcp.srcdir}" failonerror="false" />
<echo>Creating new patch references at ${clean.mcp.srcdir}</echo>
<copy todir="${clean.mcp.srcdir}">
<fileset dir="${mcp.srcdir}" />
</copy>
<antcall target="cleanargo" />
<antcall target="patch" />
<echo>Creating clean patched references at ${patch.mcp.srcdir}</echo>
<copy todir="${patch.mcp.srcdir}">
<fileset dir="${mcp.srcdir}" />
</copy>
<antcall target="writeversion" />
<antcall target="makeeclipse" />
<echo>Setup complete! You should now be able to open ${basedir}/eclipse as a workspace in eclipse and import/refresh the FML project</echo>
</target>
<target name="fmldecompile" depends="buildenvsetup,makeclean">
<exec executable="${python.exe}" dir="${basedir}">
<arg value="${basedir}/decompile.py" />
<arg value="--mcp-dir" />
<arg value="${mcp.home}" />
<arg value="--fml-dir" />
<arg value="${basedir}" />
<arg value="--gen-conf" />
</exec>
</target>
<target name="jenkinsfmldecompile" depends="buildenvsetup,makeclean">
<exec executable="${python.exe}" dir="${basedir}">
<arg value="${basedir}/decompile.py" />
<arg value="--mcp-dir" />
<arg value="${mcp.home}" />
<arg value="--fml-dir" />
<arg value="${basedir}" />
</exec>
</target>
<target name="repatch" depends="buildenvsetup,checkpatches">
<echo>Moving old patched sources at ${mcp.home}/src-work out of the way</echo>
<move todir="${mcp.home}/src-work${timestamp}" failonerror="false" verbose="true">
<fileset dir="${patch.mcp.srcdir}" />
</move>
<delete dir="${mcp.srcdir}" />
<copy todir="${mcp.srcdir}">
<fileset dir="${clean.mcp.srcdir}" />
</copy>
<antcall target="cleanargo" />
<antcall target="patch" />
<copy todir="${patch.mcp.srcdir}">
<fileset dir="${mcp.srcdir}" />
</copy>
</target>
<target name="repatchclean" depends="buildenvsetup">
<delete dir="${mcp.srcdir}" />
<copy todir="${mcp.srcdir}">
<fileset dir="${clean.mcp.srcdir}" />
</copy>
<antcall target="cleanargo" />
<antcall target="patch" />
</target>
<target name="cleanargo" depends="buildenvsetup">
<delete dir="${client.mcp.srcdir}/argo" />
<delete dir="${client.mcp.srcdir}/org" />
</target>
<target name="checkpatches" depends="buildenvsetup">
<uptodate property="checkUptodate.uptodate">
<srcfiles dir="${patch.mcp.srcdir}" includes="**/*.java">
<present targetdir="${patch.src.dir}">
<globmapper from="*.java" to="*.java.patch" />
</present>
</srcfiles>
<globmapper from="*.java" to="${patch.src.dir}/*.java.patch" />
</uptodate>
<fail unless="checkUptodate.uptodate">
A patch is out of date. Update your patches!
</fail>
</target>
<target name="updatepatches" depends="buildenvsetup">
<exec executable="${python.exe}" dir="${basedir}">
<arg value="${basedir}/update_patches.py" />
<arg value="${mcp.home}" />
<arg value="${basedir}" />
</exec>
</target>
<target name="makeeclipse" depends="buildenvsetup" unless="eclipse.exists">
<echo>
Extracting fresh eclipse workspace to ${basedir}/eclipse
</echo>
<unzip src="${basedir}/eclipse-workspace-dev.zip" dest="${basedir}" />
</target>
<target name="makerenamedsource" depends="buildenvsetup,repatch,merge-client,merge-common,reobfuscate">
<copy todir="${tmp.mcp.srcdir}">
<fileset dir="${mcp.srcdir}" />
</copy>
<exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${mcp.home}/runtime/updatenames.py" />
<arg value="-f" />
</exec>
<copy todir="${renamed.mcp.srcdir}">
<fileset dir="${mcp.srcdir}" />
</copy>
<move todir="${mcp.srcdir}">
<fileset dir="${tmp.mcp.srcdir}" />
</move>
</target>
<target name="signjar" depends="buildenvsetup,makeversion" if="signature.exists">
<condition property="universal.jarname" value="${modname}-universal-${version.minecraft}-${version}" else="${modname}-universal-${version.minecraft}-${version}-${version.branch}">
<equals arg1="${version.branch}" arg2="master" />
</condition>
<property file="${env.JENKINS_HOME}/fmlsigned.properties" prefix="sign" />
<echo>${env.JENKINS_HOME} ${universal.jarname} ${sign.KEYPASS}</echo>
<signjar alias="FML" jar="${basedir}/target/${universal.jarname}.zip" keypass="${sign.KEYPASS}" keystore="${env.JENKINS_HOME}/${sign.KEYSTORE}" storepass="${sign.STOREPASS}" verbose="true" />
</target>
<target name="makebinpatches" depends="buildenvsetup,makeversion">
<delete dir="${basedir}/binpatch" verbose="true"/>
<java classname="cpw.mods.fml.common.patcher.GenDiffSet">
<classpath>
<pathelement path="${mcp.obfoutput}/minecraft"/>
<fileset dir="${mcp.home}/lib" includes="guava-14.0-rc3.jar,asm-debug-all-4.1.jar"/>
</classpath>
<arg path="${mcp.home}/jars/versions/${version.minecraft}/${version.minecraft}.jar.backup"/>
<arg path="${mcp.obfoutput}/minecraft"/>
<arg path="${basedir}/deobfuscation_data-${version.minecraft}.lzma"/>
<arg path="${basedir}/binpatch/client"/>
<arg value="false"/>
</java>
<java classname="cpw.mods.fml.common.patcher.GenDiffSet">
<classpath>
<pathelement path="${mcp.obfoutput}/minecraft"/>
<fileset dir="${mcp.home}/lib" includes="guava-14.0-rc3.jar,asm-debug-all-4.1.jar"/>
</classpath>
<arg path="${mcp.home}/jars/minecraft_server.${version.minecraft}.jar.backup"/>
<arg path="${mcp.obfoutput}/minecraft"/>
<arg path="${basedir}/deobfuscation_data-${version.minecraft}.lzma"/>
<arg path="${basedir}/binpatch/server"/>
<arg value="true"/>
</java>
</target>
</project>
@@ -1,637 +0,0 @@
/*
* The FML Forge Mod Loader suite. Copyright (C) 2012 cpw
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package cpw.mods.fml.server;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.Properties;
import java.util.Random;
import java.util.logging.Logger;
import org.bukkit.Material;
import net.minecraft.server.Block;
import net.minecraft.server.Item;
import net.minecraft.server.LocaleLanguage;
import net.minecraft.server.MLProp;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.BaseMod;
import net.minecraft.server.BiomeBase;
import net.minecraft.server.EntityItem;
import net.minecraft.server.EntityHuman;
import net.minecraft.server.IChunkProvider;
import net.minecraft.server.ICommandListener;
import net.minecraft.server.IInventory;
import net.minecraft.server.ItemStack;
import net.minecraft.server.NetworkManager;
import net.minecraft.server.Packet1Login;
import net.minecraft.server.Packet250CustomPayload;
import net.minecraft.server.Packet3Chat;
import net.minecraft.server.BukkitRegistry;
import net.minecraft.server.SidedProxy;
import net.minecraft.server.World;
import net.minecraft.server.WorldType;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.IFMLSidedHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.ModMetadata;
import cpw.mods.fml.common.ProxyInjector;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.common.modloader.ModLoaderModContainer;
import cpw.mods.fml.common.modloader.ModProperty;
import cpw.mods.fml.common.registry.FMLRegistry;
/**
* Handles primary communication from hooked code into the system
*
* The FML entry point is {@link #onPreLoad(MinecraftServer)} called from {@link MinecraftServer}
*
* Obfuscated code should focus on this class and other members of the "server" (or "client") code
*
* The actual mod loading is handled at arms length by {@link Loader}
*
* It is expected that a similar class will exist for each target environment: Bukkit and Client side.
*
* It should not be directly modified.
*
* @author cpw
*
*/
public class FMLBukkitHandler implements IFMLSidedHandler
{
/**
* The singleton
*/
private static final FMLBukkitHandler INSTANCE = new FMLBukkitHandler();
/**
* A reference to the server itself
*/
private MinecraftServer server;
/**
* A handy list of the default overworld biomes
*/
private BiomeBase[] defaultOverworldBiomes;
FMLBukkitProfiler profiler;
/**
* Called to start the whole game off from {@link MinecraftServer#startServer}
* @param minecraftServer
*/
public void onPreLoad(MinecraftServer minecraftServer)
{
try
{
Class.forName("BaseModMp", false, getClass().getClassLoader());
MinecraftServer.log.severe(""
+ "Forge Mod Loader has detected that this server has an ModLoaderMP installed alongside Forge Mod Loader.\n"
+ "This will cause a serious problem with compatibility. To protect your worlds, this minecraft server will now shutdown.\n"
+ "You should follow the installation instructions of either Minecraft Forge of Forge Mod Loader and NOT install ModLoaderMP \n"
+ "into the minecraft_server.jar file "
+ "before this server will be allowed to start up.\n\nFailure to do so will simply result in more startup failures.\n\n"
+ "The authors of Minecraft Forge and Forge Mod Loader strongly suggest you talk to your mod's authors and get them to\nupdate their "
+ "requirements. ModLoaderMP is not compatible with Minecraft Forge on the server and they will need to update their mod\n"
+ "for Minecraft Forge and other server compatibility, unless they are Minecraft Forge mods, in which case they already\n"
+ "don't need ModLoaderMP and the mod author simply has failed to update his requirements and should be informed appropriately.\n\n"
+ "The authors of Forge Mod Loader would like to be compatible with ModLoaderMP but it is closed source and owned by SDK.\n"
+ "SDK, the author of ModLoaderMP, has a standing invitation to submit compatibility patches \n"
+ "to the open source community project that is Forge Mod Loader so that this incompatibility doesn't last. \n"
+ "Users who wish to enjoy mods of both types are "
+ "encouraged to request of SDK that he submit a\ncompatibility patch to the Forge Mod Loader project at \n"
+ "http://github.com/cpw/FML.\nPosting on the minecraft forums at\nhttp://www.minecraftforum.net/topic/86765- (the MLMP thread)\n"
+ "may encourage him in this effort. However, I ask that your requests be polite.\n"
+ "Now, the server has to shutdown so you can reinstall your minecraft_server.jar\nproperly, until such time as we can work together.");
throw new RuntimeException(
"This FML based server has detected an installation of ModLoaderMP alongside. This will cause serious compatibility issues, so the server will now shut down.");
}
catch (ClassNotFoundException e)
{
// We're safe. continue
}
server = minecraftServer;
FMLCommonHandler.instance().beginLoading(this);
FMLRegistry.registerRegistry(new BukkitRegistry());
Loader.instance().loadMods();
}
/**
* Called a bit later on during server initialization to finish loading mods
*/
public void onLoadComplete()
{
Loader.instance().initializeMods();
for (Item i : Item.byId) {
if (i!=null && Material.getMaterial(i.id).name().startsWith("X")) {
Material.setMaterialName(i.id, i.l());
}
}
}
public void onWorldLoadTick()
{
FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.WORLDLOAD));
}
/**
* Every tick just before world and other ticks occur
*/
public void onPreWorldTick(World world)
{
FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.WORLD),world);
}
/**
* Every tick just after world and other ticks occur
*/
public void onPostWorldTick(World world)
{
FMLCommonHandler.instance().tickEnd(EnumSet.of(TickType.WORLD), world);
}
/**
* Get the server instance
*
* @return
*/
public MinecraftServer getServer()
{
return server;
}
/**
* Get a handle to the server's logger instance
*/
public Logger getMinecraftLogger()
{
return MinecraftServer.log;
}
/**
* Called from ChunkProviderServer when a chunk needs to be populated
*
* To avoid polluting the worldgen seed, we generate a new random from the world seed and
* generate a seed from that
*
* @param chunkProvider
* @param chunkX
* @param chunkZ
* @param world
* @param generator
*/
public void onChunkPopulate(IChunkProvider chunkProvider, int chunkX, int chunkZ, World world, IChunkProvider generator)
{
FMLCommonHandler.instance().handleWorldGeneration(chunkX, chunkZ, world.getSeed(), world, generator, chunkProvider);
}
/**
* Called from the furnace to lookup fuel values
*
* @param itemId
* @param itemDamage
* @return
*/
public int fuelLookup(int itemId, int itemDamage)
{
int fv = 0;
for (ModContainer mod : Loader.getModList())
{
fv = Math.max(fv, mod.lookupFuelValue(itemId, itemDamage));
}
return fv;
}
/**
* Is the offered class and instance of BaseMod and therefore a ModLoader mod?
*/
public boolean isModLoaderMod(Class<?> clazz)
{
return BaseMod.class.isAssignableFrom(clazz);
}
/**
* Load the supplied mod class into a mod container
*/
public ModContainer loadBaseModMod(Class<?> clazz, File canonicalFile)
{
@SuppressWarnings("unchecked")
Class <? extends BaseMod > bmClazz = (Class <? extends BaseMod >) clazz;
return new ModLoaderModContainer(bmClazz, canonicalFile);
}
/**
* Called to notify that an item was picked up from the world
*
* @param entityItem
* @param entityPlayer
*/
public void notifyItemPickup(EntityItem entityItem, EntityHuman entityPlayer)
{
for (ModContainer mod : Loader.getModList())
{
if (mod.wantsPickupNotification())
{
mod.getPickupNotifier().notifyPickup(entityItem, entityPlayer);
}
}
}
/**
* Raise an exception
*
* @param exception
* @param message
* @param stopGame
*/
public void raiseException(Throwable exception, String message, boolean stopGame)
{
FMLCommonHandler.instance().getFMLLogger().throwing("FMLHandler", "raiseException", exception);
throw new RuntimeException(exception);
}
/**
* Attempt to dispense the item as an entity other than just as a the item itself
*
* @param world
* @param x
* @param y
* @param z
* @param xVelocity
* @param zVelocity
* @param item
* @return
*/
public boolean tryDispensingEntity(World world, double x, double y, double z, byte xVelocity, byte zVelocity, ItemStack item)
{
for (ModContainer mod : Loader.getModList())
{
if (mod.wantsToDispense() && mod.getDispenseHandler().dispense(x, y, z, xVelocity, zVelocity, world, item))
{
return true;
}
}
return false;
}
/**
* @return the instance
*/
public static FMLBukkitHandler instance()
{
return INSTANCE;
}
/**
* Build a list of default overworld biomes
*
* @return
*/
public BiomeBase[] getDefaultOverworldBiomes()
{
if (defaultOverworldBiomes == null)
{
ArrayList<BiomeBase> biomes = new ArrayList<BiomeBase>(20);
for (int i = 0; i < 23; i++)
{
if ("Sky".equals(BiomeBase.biomes[i].y) || "Hell".equals(BiomeBase.biomes[i].y))
{
continue;
}
biomes.add(BiomeBase.biomes[i]);
}
defaultOverworldBiomes = new BiomeBase[biomes.size()];
biomes.toArray(defaultOverworldBiomes);
}
return defaultOverworldBiomes;
}
/**
* Called when an item is crafted
*
* @param player
* @param craftedItem
* @param craftingGrid
*/
public void onItemCrafted(EntityHuman player, ItemStack craftedItem, IInventory craftingGrid)
{
for (ModContainer mod : Loader.getModList())
{
if (mod.wantsCraftingNotification())
{
mod.getCraftingHandler().onCrafting(player, craftedItem, craftingGrid);
}
}
}
/**
* Called when an item is smelted
*
* @param player
* @param smeltedItem
*/
public void onItemSmelted(EntityHuman player, ItemStack smeltedItem)
{
for (ModContainer mod : Loader.getModList())
{
if (mod.wantsCraftingNotification())
{
mod.getCraftingHandler().onSmelting(player, smeltedItem);
}
}
}
/**
* Called when a chat packet is received
*
* @param chat
* @param player
* @return true if you want the packet to stop processing and not echo to the rest of the world
*/
public boolean handleChatPacket(Packet3Chat chat, EntityHuman player)
{
for (ModContainer mod : Loader.getModList())
{
if (mod.wantsNetworkPackets() && mod.getNetworkHandler().onChat(chat, player))
{
return true;
}
}
return false;
}
/**
* Called when a packet 250 packet is received from the player
*
* @param packet
* @param player
*/
public void handlePacket250(Packet250CustomPayload packet, EntityHuman player)
{
if ("REGISTER".equals(packet.tag) || "UNREGISTER".equals(packet.tag))
{
handleClientRegistration(packet, player);
return;
}
ModContainer mod = FMLCommonHandler.instance().getModForChannel(packet.tag);
if (mod != null)
{
mod.getNetworkHandler().onPacket250Packet(packet, player);
}
}
/**
* Handle register requests for packet 250 channels
*
* @param packet
*/
private void handleClientRegistration(Packet250CustomPayload packet, EntityHuman player)
{
if (packet.data==null) {
return;
}
try
{
for (String channel : new String(packet.data, "UTF8").split("\0"))
{
// Skip it if we don't know it
if (FMLCommonHandler.instance().getModForChannel(channel) == null)
{
continue;
}
if ("REGISTER".equals(packet.tag))
{
FMLCommonHandler.instance().activateChannel(player, channel);
}
else
{
FMLCommonHandler.instance().deactivateChannel(player, channel);
}
}
}
catch (UnsupportedEncodingException e)
{
getMinecraftLogger().warning("Received invalid registration packet");
}
}
/**
* Handle a login
*
* @param loginPacket
* @param networkManager
*/
public void handleLogin(Packet1Login loginPacket, NetworkManager networkManager)
{
Packet250CustomPayload packet = new Packet250CustomPayload();
packet.tag = "REGISTER";
packet.data = FMLCommonHandler.instance().getPacketRegistry();
packet.length = packet.data.length;
if (packet.length>0) {
networkManager.queue(packet);
}
}
public void announceLogin(EntityHuman player) {
for (ModContainer mod : Loader.getModList())
{
if (mod.wantsPlayerTracking())
{
mod.getPlayerTracker().onPlayerLogin(player);
}
}
}
@Override
public File getMinecraftRootDirectory()
{
try {
return server.a(".").getCanonicalFile();
} catch (IOException ioe) {
return new File(".");
}
}
/**
* @param var2
* @return
*/
public boolean handleServerCommand(String command, String player, ICommandListener listener)
{
for (ModContainer mod : Loader.getModList()) {
if (mod.wantsConsoleCommands() && mod.getConsoleHandler().handleCommand(command, player, listener)) {
return true;
}
}
return false;
}
/**
* @param player
*/
public void announceLogout(EntityHuman player)
{
for (ModContainer mod : Loader.getModList())
{
if (mod.wantsPlayerTracking())
{
mod.getPlayerTracker().onPlayerLogout(player);
}
}
}
/**
* @param p_28168_1_
*/
public void announceDimensionChange(EntityHuman player)
{
for (ModContainer mod : Loader.getModList())
{
if (mod.wantsPlayerTracking())
{
mod.getPlayerTracker().onPlayerChangedDimension(player);
}
}
}
/**
* @param biome
*/
public void addBiomeToDefaultWorldGenerator(BiomeBase biome)
{
WorldType.NORMAL.addNewBiome(biome);
}
/**
* @param biome
*/
public void removeBiomeFromDefaultWorldGenerator(BiomeBase biome)
{
WorldType.NORMAL.removeBiome(biome);
}
@Override
public Object getMinecraftInstance() {
return server;
}
@Override
public String getCurrentLanguage()
{
return LocaleLanguage.a().getCurrentLanguage();
}
@Override
public Properties getCurrentLanguageTable()
{
return LocaleLanguage.a().getCurrentLanguageTable();
}
@Override
public String getObjectName(Object instance)
{
String objectName;
if (instance instanceof Item) {
objectName=((Item)instance).getName();
} else if (instance instanceof Block) {
objectName=((Block)instance).getName();
} else if (instance instanceof ItemStack) {
objectName=Item.byId[((ItemStack)instance).id].a((ItemStack)instance);
} else {
throw new IllegalArgumentException(String.format("Illegal object for naming %s",instance));
}
objectName+=".name";
return objectName;
}
@Override
public ModMetadata readMetadataFrom(InputStream input, ModContainer mod) throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void profileStart(String profileLabel) {
if (profiler!=null)
{
profiler.start(profileLabel);
}
}
@Override
public void profileEnd() {
if (profiler!=null)
{
profiler.end();
}
}
@Override
public ModProperty getModLoaderPropertyFor(Field f) {
if (f.isAnnotationPresent(MLProp.class)) {
MLProp prop = f.getAnnotation(MLProp.class);
return new ModProperty(prop.info(), prop.min(), prop.max(), prop.name());
}
return null;
}
@Override
public List<String> getAdditionalBrandingInformation() {
return null;
}
@Override
public Side getSide() {
return Side.BUKKIT;
}
@Override
public ProxyInjector findSidedProxyOn(cpw.mods.fml.common.modloader.BaseMod mod) {
for (Field f : mod.getClass().getDeclaredFields())
{
if (f.isAnnotationPresent(SidedProxy.class))
{
SidedProxy sp = f.getAnnotation(SidedProxy.class);
return new ProxyInjector(sp.clientSide(), sp.serverSide(), sp.bukkitSide(), f);
}
}
return null;
}
public void onServerPostTick() {
FMLCommonHandler.instance().tickEnd(EnumSet.of(TickType.GAME));
}
public void onServerPreTick() {
FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.GAME));
}
}
@@ -1,131 +0,0 @@
package cpw.mods.fml.server;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableMultiset;
import com.google.common.collect.Lists;
import com.google.common.collect.Multiset;
import com.google.common.collect.Multiset.Entry;
import com.google.common.collect.Multisets;
import com.google.common.collect.TreeMultiset;
import com.google.common.primitives.Ints;
public class FMLBukkitProfiler {
private static FMLBukkitProfiler lastInstance;
private static long endTime;
private LinkedList<String> profiles = new LinkedList<String>();
private TreeMultiset<String> hitCounter = TreeMultiset.create();
private TreeMultiset<String> timings = TreeMultiset.create();
private long timestamp;
public static long beginProfiling(int seconds)
{
long now = System.currentTimeMillis();
if (lastInstance == null)
{
lastInstance = new FMLBukkitProfiler();
FMLBukkitHandler.instance().profiler = lastInstance;
endTime = now + seconds * 1000;
}
if (endTime > now)
{
return (endTime - now) / 1000;
}
else
{
return 0;
}
}
public static long endProfiling()
{
FMLBukkitHandler.instance().profiler = null;
return endTime - System.currentTimeMillis();
}
public static void resetProfiling()
{
endProfiling();
lastInstance = null;
}
public void start(String profileLabel)
{
profiles.push(profileLabel);
timestamp = System.nanoTime();
}
public void end()
{
int timing = (int)((System.nanoTime() - timestamp)/1000L);
String label = Joiner.on('.').join(profiles);
profiles.pop();
hitCounter.add(label);
timings.add(label,timing);
if (System.currentTimeMillis()>endTime)
{
endProfiling();
}
}
public static String[] dumpProfileData(int count)
{
if (lastInstance == null)
{
return new String[] { "No profile data available" };
}
if (endTime > System.currentTimeMillis())
{
return new String[] { String.format("Timing is being gathered for another %d seconds", endTime - System.currentTimeMillis()) };
}
return lastInstance.profileData(count);
}
private String[] profileData(int count) {
List<Entry<String>> sortedTiming = getEntriesSortedByFrequency(timings, false);
ArrayList<String> timeLine = new ArrayList<String>();
double totalTime = timings.size();
for (Entry<String> hit : sortedTiming)
{
if (--count == 0)
{
break;
}
timeLine.add(String.format("%s : %d microseconds, %d invocations. %.2f %% of overall time",hit.getElement(), hit.getCount(), hitCounter.count(hit.getElement()), 100.0 * hit.getCount()/totalTime));
}
return timeLine.toArray(new String[0]);
}
/*
* Code from http://stackoverflow.com/questions/4345633/simplest-way-to-iterate-through-a-multiset-in-the-order-of-element-frequency
*/
private enum EntryComp implements Comparator<Multiset.Entry<?>>{
DESCENDING{
@Override
public int compare(final Entry<?> a, final Entry<?> b){
return Ints.compare(b.getCount(), a.getCount());
}
},
ASCENDING{
@Override
public int compare(final Entry<?> a, final Entry<?> b){
return Ints.compare(a.getCount(), b.getCount());
}
},
}
private static <E> List<Entry<E>> getEntriesSortedByFrequency(final Multiset<E> ms, final boolean ascending) {
final List<Entry<E>> entryList = Lists.newArrayList(ms.entrySet());
Collections.sort(entryList, ascending ? EntryComp.ASCENDING : EntryComp.DESCENDING);
return entryList;
}
}
-409
View File
@@ -1,409 +0,0 @@
/*
* The FML Forge Mod Loader suite. Copyright (C) 2012 cpw
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraft.server;
import java.util.Map;
import java.util.Random;
import org.bukkit.craftbukkit.generator.NetherChunkGenerator;
import org.bukkit.craftbukkit.generator.NormalChunkGenerator;
import cpw.mods.fml.common.TickType;
public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
{
// CALLBACK MECHANISMS
/**
* @param minecraftInstance
* @return
*/
public final boolean doTickInGame(TickType tick, boolean tickEnd, Object minecraftInstance, Object... data)
{
if (tick==TickType.GAME && tickEnd) {
return onTickInGame((MinecraftServer)minecraftInstance);
} else {
return true;
}
}
@Override
public final void onCrafting(Object... craftingParameters)
{
takenFromCrafting((EntityHuman)craftingParameters[0], (ItemStack)craftingParameters[1], (IInventory)craftingParameters[2]);
}
@Override
public final void onSmelting(Object... smeltingParameters)
{
takenFromFurnace((EntityHuman)smeltingParameters[0], (ItemStack)smeltingParameters[1]);
}
@Override
public final boolean dispense(double x, double y, double z, byte xVelocity, byte zVelocity, Object... data)
{
return dispenseEntity((World)data[0], x, y, z, xVelocity, zVelocity, (ItemStack)data[1]);
}
@Override
public final boolean onChat(Object... data)
{
return onChatMessageReceived((EntityHuman)data[1], (Packet3Chat)data[0]);
}
@Override
public final void onServerLogin(Object handler) {
// NOOP
}
public final void onServerLogout() {
// NOOP
}
@Override
public final void onPlayerLogin(Object player)
{
onClientLogin((EntityHuman) player);
}
@Override
public final void onPlayerLogout(Object player)
{
onClientLogout((EntityHuman)player);
}
@Override
public final void onPlayerChangedDimension(Object player)
{
onClientDimensionChanged((EntityHuman)player);
}
@Override
public final void onPacket250Packet(Object... data)
{
onPacket250Received((EntityHuman)data[1], (Packet250CustomPayload)data[0]);
}
@Override
public final void notifyPickup(Object... pickupData)
{
EntityItem item = (EntityItem) pickupData[0];
EntityHuman player = (EntityHuman) pickupData[1];
onItemPickup(player, item.itemStack);
}
@Override
public final void generate(Random random, int chunkX, int chunkZ, Object... additionalData)
{
World w = (World) additionalData[0];
IChunkProvider cp = (IChunkProvider) additionalData[1];
if (cp instanceof ChunkProviderHell || cp instanceof NetherChunkGenerator)
{
generateNether(w, random, chunkX << 4, chunkZ << 4);
}
else if (cp instanceof ChunkProviderGenerate || cp instanceof NormalChunkGenerator)
{
generateSurface(w, random, chunkX << 4, chunkZ << 4);
}
}
/**
* NO-OP on client side
*/
@Override
public final boolean handleCommand(String command, Object... data)
{
return onServerCommand(command, (String)data[0], (ICommandListener)data[1]);
}
@Override
public void onRegisterAnimations() {
// NOOP on servers
}
@Override
public void onRenderHarvest(@SuppressWarnings("rawtypes") Map renderers) {
// NOOP on servers
}
// BASEMOD API
/**
* Override if you wish to provide a fuel item for the furnace and return the fuel value of the item
*
* @param id
* @param metadata
* @return
*/
public int addFuel(int id, int metadata)
{
return 0;
}
public void addRenderer(Map<Class<? extends Entity>, Object> renderers)
{
}
/**
* Override if you wish to perform some action other than just dispensing the item from the dispenser
*
* @param world
* @param x
* @param y
* @param z
* @param xVel
* @param zVel
* @param item
* @return
*/
public boolean dispenseEntity(World world, double x, double y, double z, int xVel, int zVel, ItemStack item)
{
return false;
}
/**
* Override if you wish to generate Nether (Hell biome) blocks
*
* @param world
* @param random
* @param chunkX
* @param chunkZ
*/
public void generateNether(World world, Random random, int chunkX, int chunkZ)
{
}
/**
* Override if you wish to generate Overworld (not hell or the end) blocks
*
* @param world
* @param random
* @param chunkX
* @param chunkZ
*/
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
}
/**
* Return the name of your mod. Defaults to the class name
*
* @return
*/
public String getName()
{
return getClass().getSimpleName();
}
/**
* Get your mod priorities
*
* @return
*/
public String getPriorities()
{
return "";
}
/**
* Return the version of your mod
*
* @return
*/
public abstract String getVersion();
public void keyboardEvent(Object event)
{
}
/**
* Load your mod
*/
public abstract void load();
/**
* Finish loading your mod
*/
public void modsLoaded()
{
}
/**
* Handle item pickup
*
* @param player
* @param item
*/
public void onItemPickup(EntityHuman player, ItemStack item)
{
}
/**
* Ticked every game tick if you have subscribed to tick events through {@link ModLoader#setInGameHook(BaseMod, boolean, boolean)}
*
* @param minecraftServer the server
* @return true to continue receiving ticks
*/
public boolean onTickInGame(MinecraftServer minecraftServer)
{
return false;
}
public boolean onTickInGUI(float tick, Object game, Object gui)
{
return false;
}
/**
* Only implemented on the client side
* {@link #onChatMessageReceived(EntityPlayer, Packet3Chat)}
*
* @param text
*/
public void receiveChatPacket(String text)
{
}
/**
* Only called on the client side
* {@link #onPacket250Received(EntityPlayer, Packet250CustomPayload)}
*
* @param packet
*/
public void receiveCustomPacket(Packet250CustomPayload packet)
{
}
public void registerAnimation(Object game)
{
}
public void renderInvBlock(Object renderer, Block block, int metadata, int modelID)
{
}
public boolean renderWorldBlock(Object renderer, IBlockAccess world, int x, int y, int z, Block block, int modelID)
{
return false;
}
/**
* Called when someone crafts an item from a crafting table
*
* @param player
* @param item
* @param matrix
*/
public void takenFromCrafting(EntityHuman player, ItemStack item, IInventory matrix)
{
}
/**
* Called when someone takes a smelted item from a furnace
*
* @param player
* @param item
*/
public void takenFromFurnace(EntityHuman player, ItemStack item)
{
}
/**
* The identifier string for the mod- used in client<->server negotiation
*/
@Override
public String toString()
{
return getName() + " " + getVersion();
}
/**
* Called when a 250 packet is received on a channel registered to this mod
*
* @param source
* @param payload
*/
public void onPacket250Received(EntityHuman source, Packet250CustomPayload payload)
{
}
/**
* Called when a chat message is received. Return true to stop further processing
*
* @param source
* @param chat
* @return true if you want to consume the message so it is not available for further processing
*/
public boolean onChatMessageReceived(EntityHuman source, Packet3Chat chat)
{
return false;
}
/**
* Called when a server command is received
* @param command
* @return true if you want to consume the message so it is not available for further processing
*/
public boolean onServerCommand(String command, String sender, ICommandListener listener)
{
return false;
}
/**
* Called when a new client logs in.
*
* @param player
*/
public void onClientLogin(EntityHuman player)
{
}
/**
* Called when a client logs out of the server.
*
* @param player
*/
public void onClientLogout(EntityHuman player)
{
}
/**
*
* Called when a client changes dimensions on the server.
*
* @param player
*/
public void onClientDimensionChanged(EntityHuman player)
{
}
// Spare client junk
// -------
// void addRenderer(Map<Class<? extends Entity>, Render> renderers);
// void registerAnimation(Minecraft game);
// void renderInvBlock(RenderBlocks renderer, Block block, int metadata, int modelID);
// boolean renderWorldBlock(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block, int modelID);
// boolean onTickInGUI(float tick, Minecraft game, GuiScreen gui);
// void keyboardEvent(KeyBinding event);
@Override
public void keyBindingEvent(Object keybinding) {
// NOOP on server
}
}
@@ -1,164 +0,0 @@
package net.minecraft.server;
import java.util.Iterator;
import java.util.List;
import net.minecraft.src.BiomeGenBase;
import cpw.mods.fml.common.registry.IMinecraftRegistry;
import cpw.mods.fml.server.FMLBukkitHandler;
public class BukkitRegistry implements IMinecraftRegistry
{
@Override
public void addRecipe(net.minecraft.src.ItemStack output, Object... params)
{
CraftingManager.getInstance().registerShapedRecipe((ItemStack) output, params);
}
@Override
public void addShapelessRecipe(net.minecraft.src.ItemStack output, Object... params)
{
CraftingManager.getInstance().registerShapelessRecipe((ItemStack) output, params);
}
@SuppressWarnings("unchecked")
@Override
public void addRecipe(net.minecraft.src.IRecipe recipe)
{
CraftingManager.getInstance().getRecipies().add(recipe);
}
@Override
public void addSmelting(int input, net.minecraft.src.ItemStack output)
{
FurnaceRecipes.getInstance().registerRecipe(input, (ItemStack) output);
}
@Override
public void registerBlock(net.minecraft.src.Block block)
{
registerBlock(block, ItemBlock.class);
}
@Override
public void registerBlock(net.minecraft.src.Block block, Class <? extends net.minecraft.src.ItemBlock > itemclass)
{
try
{
assert block != null : "registerBlock: block cannot be null";
assert itemclass != null : "registerBlock: itemclass cannot be null";
int blockItemId = ((Block)block).id - 256;
itemclass.getConstructor(int.class).newInstance(blockItemId);
}
catch (Exception e)
{
//HMMM
}
}
@SuppressWarnings("unchecked")
@Override
public void registerEntityID(Class <? extends net.minecraft.src.Entity > entityClass, String entityName, int id)
{
EntityTypes.addNewEntityListMapping((Class<? extends Entity>) entityClass, entityName, id);
}
@SuppressWarnings("unchecked")
@Override
public void registerEntityID(Class <? extends net.minecraft.src.Entity > entityClass, String entityName, int id, int backgroundEggColour, int foregroundEggColour)
{
EntityTypes.addNewEntityListMapping((Class<? extends Entity>) entityClass, entityName, id, backgroundEggColour, foregroundEggColour);
}
@SuppressWarnings("unchecked")
@Override
public void registerTileEntity(Class <? extends net.minecraft.src.TileEntity > tileEntityClass, String id)
{
TileEntity.addNewTileEntityMapping((Class<? extends TileEntity>) tileEntityClass, id);
}
@Override
public void addBiome(BiomeGenBase biome)
{
FMLBukkitHandler.instance().addBiomeToDefaultWorldGenerator((BiomeBase) biome);
}
@Override
public void addSpawn(Class <? extends net.minecraft.src.EntityLiving > entityClass, int weightedProb, int min, int max, net.minecraft.src.EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
BiomeBase[] realBiomes=(BiomeBase[]) biomes;
for (BiomeBase biome : realBiomes)
{
@SuppressWarnings("unchecked")
List<BiomeMeta> spawns = ((BiomeBase)biome).getMobs((EnumCreatureType)typeOfCreature);
for (BiomeMeta entry : spawns)
{
//Adjusting an existing spawn entry
if (entry.a == entityClass)
{
entry.d = weightedProb;
entry.b = min;
entry.c = max;
break;
}
}
spawns.add(new BiomeMeta(entityClass, weightedProb, min, max));
}
}
@Override
@SuppressWarnings("unchecked")
public void addSpawn(String entityName, int weightedProb, int min, int max, net.minecraft.src.EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = EntityTypes.getEntityToClassMapping().get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
addSpawn((Class <? extends net.minecraft.src.EntityLiving >) entityClazz, weightedProb, min, max, spawnList, biomes);
}
}
@Override
public void removeBiome(BiomeGenBase biome)
{
FMLBukkitHandler.instance().removeBiomeFromDefaultWorldGenerator((BiomeBase)biome);
}
@Override
public void removeSpawn(Class <? extends net.minecraft.src.EntityLiving > entityClass, net.minecraft.src.EnumCreatureType typeOfCreature, BiomeGenBase... biomesO)
{
BiomeBase[] biomes=(BiomeBase[]) biomesO;
for (BiomeBase biome : biomes)
{
@SuppressWarnings("unchecked")
List<BiomeMeta> spawns = ((BiomeBase)biome).getMobs((EnumCreatureType) typeOfCreature);
Iterator<BiomeMeta> entries = spawns.iterator();
while (entries.hasNext())
{
BiomeMeta entry = entries.next();
if (entry.a == entityClass)
{
entries.remove();
}
}
}
}
@Override
@SuppressWarnings("unchecked")
public void removeSpawn(String entityName, net.minecraft.src.EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = EntityTypes.getEntityToClassMapping().get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
removeSpawn((Class <? extends net.minecraft.src.EntityLiving >) entityClazz, spawnList, biomes);
}
}
}
-48
View File
@@ -1,48 +0,0 @@
/*
* The FML Forge Mod Loader suite. Copyright (C) 2012 cpw
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraft.server;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.RetentionPolicy.*;
import static java.lang.annotation.ElementType.*;
/**
* @author cpw
*
*/
@Retention(value = RUNTIME)
@Target(value = FIELD)
public @interface MLProp
{
/**
* Adds additional help to top of configuration file.
*/
String info() default "";
/**
* Maximum value allowed if field is a number.
*/
double max() default Double.MAX_VALUE;
/**
* Minimum value allowed if field is a number.
*/
double min() default Double.MIN_VALUE;
/**
* Overrides the field name for property key.
*/
String name() default "";
}
-780
View File
@@ -1,780 +0,0 @@
/*
* The FML Forge Mod Loader suite. Copyright (C) 2012 cpw
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraft.server;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ReflectionHelper;
import cpw.mods.fml.common.modloader.ModLoaderHelper;
import cpw.mods.fml.common.modloader.ModLoaderModContainer;
import cpw.mods.fml.common.registry.FMLRegistry;
import cpw.mods.fml.server.FMLBukkitHandler;
public class ModLoader
{
/**
* Not used on the server.
*
* @param achievement
* @param name
* @param description
*/
public static void addAchievementDesc(Achievement achievement, String name, String description)
{
String achName=achievement.getName();
addLocalization(achName, name);
addLocalization(achName+".desc", description);
}
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
*
* {@link FMLCommonHandler#fuelLookup(int, int)}
*
* @param id
* @param metadata
* @return
*/
@Deprecated
public static int addAllFuel(int id, int metadata)
{
return 0;
}
public static void addAllRenderers(Map<Class<? extends Entity>, Object> renderers)
{
}
public static void addAnimation(Object anim)
{
}
/**
* This method is unimplemented in server versions to date.
*
* @param armor
* @return
*/
public static int addArmor(String armor)
{
return 0;
}
/**
* This method adds the supplied biome to the set of candidate biomes for the default world generator type.
*
* @param biome
*/
public static void addBiome(BiomeBase biome)
{
FMLRegistry.addBiome(biome);
}
/**
* Add localization for the specified string
*
* @param key
* @param value
*/
public static void addLocalization(String key, String value)
{
addLocalization(key, "en_US", value);
}
/**
* Add localization for the specified string
*
* @param key
* @param lang
* @param value
*/
public static void addLocalization(String key, String lang, String value)
{
FMLCommonHandler.instance().addStringLocalization(key, lang, value);
}
/**
* Name the specified minecraft object with the supplied name
*
* @param instance
* @param name
*/
public static void addName(Object instance, String name)
{
addName(instance,"en_US",name);
}
/**
* Unimplemented on the server as it does not generate names
*
* @param instance
* @param lang
* @param name
*/
public static void addName(Object instance, String lang, String name)
{
FMLCommonHandler.instance().addNameForObject(instance, lang, name);
}
/**
* Unimplemented on the server as it does not render textures
*
* @param fileToOverride
* @param fileToAdd
* @return
*/
public static int addOverride(String fileToOverride, String fileToAdd)
{
return 0;
}
/**
* Unimplemented on the server as it does not render textures
*
* @param path
* @param overlayPath
* @param index
*/
public static void addOverride(String path, String overlayPath, int index)
{
// NOOP
}
/**
* Add a Shaped Recipe
*
* @param output
* @param params
*/
public static void addRecipe(ItemStack output, Object... params)
{
FMLRegistry.addRecipe(output, params);
}
/**
* Add a shapeless recipe
*
* @param output
* @param params
*/
public static void addShapelessRecipe(ItemStack output, Object... params)
{
FMLRegistry.addShapelessRecipe(output, params);
}
/**
* Add a new product to be smelted
*
* @param input
* @param output
*/
public static void addSmelting(int input, ItemStack output)
{
FMLRegistry.addSmelting(input, output);
}
/**
* Add a mob to the spawn list
*
* @param entityClass
* @param weightedProb
* @param min
* @param max
* @param spawnList
*/
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType spawnList)
{
FMLRegistry.addSpawn(entityClass, weightedProb, min, max, spawnList, FMLBukkitHandler.instance().getDefaultOverworldBiomes());
}
/**
* Add a mob to the spawn list
* @param entityClass
* @param weightedProb
* @param min
* @param max
* @param spawnList
* @param biomes
*/
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType spawnList, BiomeBase... biomes)
{
FMLRegistry.addSpawn(entityClass, weightedProb, min, max, spawnList, biomes);
}
/**
* Add a mob to the spawn list
*
* @param entityName
* @param weightedProb
* @param min
* @param max
* @param spawnList
*/
public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType spawnList)
{
FMLRegistry.addSpawn(entityName, weightedProb, min, max, spawnList, FMLBukkitHandler.instance().getDefaultOverworldBiomes());
}
/**
* Add a mob to the spawn list
* @param entityName
* @param weightedProb
* @param min
* @param max
* @param spawnList
* @param biomes
*/
public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType spawnList, BiomeBase... biomes)
{
FMLRegistry.addSpawn(entityName, weightedProb, min, max, spawnList, biomes);
}
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
* {@link FMLBukkitHandler#tryDispensingEntity(World, double, double, double, byte, byte, ItemStack)}
*
* @param world
* @param x
* @param y
* @param z
* @param xVel
* @param zVel
* @param item
* @return
*/
@Deprecated
public static boolean dispenseEntity(World world, double x, double y, double z, int xVel, int zVel, ItemStack item)
{
return false;
}
/**
* Remove a container and drop all the items in it on the ground around
*
* @param world
* @param x
* @param y
* @param z
*/
public static void genericContainerRemoval(World world, int x, int y, int z)
{
TileEntity te = world.getTileEntity(x, y, z);
if (!(te instanceof IInventory))
{
return;
}
IInventory inv = (IInventory)te;
for (int l = 0; l < inv.getSize(); l++)
{
ItemStack itemstack = inv.getItem(l);
if (itemstack == null)
{
continue;
}
float f = world.random.nextFloat() * 0.8F + 0.1F;
float f1 = world.random.nextFloat() * 0.8F + 0.1F;
float f2 = world.random.nextFloat() * 0.8F + 0.1F;
while (itemstack.count > 0)
{
int i1 = world.random.nextInt(21) + 10;
if (i1 > itemstack.count)
{
i1 = itemstack.count ;
}
itemstack.count -= i1;
EntityItem entityitem = new EntityItem(world, (float)te.x + f, (float)te.y + f1, (float)te.z + f2, new ItemStack(itemstack.id, i1, itemstack.getData()));
float f3 = 0.05F;
entityitem.motX = (float)world.random.nextGaussian() * f3;
entityitem.motY = (float)world.random.nextGaussian() * f3 + 0.2F;
entityitem.motZ = (float)world.random.nextGaussian() * f3;
if (itemstack.hasTag())
{
entityitem.itemStack.setTag((NBTTagCompound)itemstack.getTag().clone());
}
world.addEntity(entityitem);
}
}
}
/**
* Get a list of all BaseMod loaded into the system
* {@link ModLoaderModContainer#findAll}
*
* @return
*/
public static List<BaseMod> getLoadedMods()
{
return ModLoaderModContainer.findAll(BaseMod.class);
}
/**
* Get a logger instance {@link FMLCommonHandler#getFMLLogger()}
*
* @return
*/
public static Logger getLogger()
{
return FMLCommonHandler.instance().getFMLLogger();
}
public static Object getMinecraftInstance()
{
return getMinecraftServerInstance();
}
/**
* Get the minecraft server instance
* {@link FMLServerHandler#getServer()}
* @return
*/
public static MinecraftServer getMinecraftServerInstance()
{
return FMLBukkitHandler.instance().getServer();
}
/**
* Get a value from a field using reflection
* {@link ReflectionHelper#getPrivateValue(Class, Object, int)}
*
* @param instanceclass
* @param instance
* @param fieldindex
* @return
*/
public static <T, E> T getPrivateValue(Class <? super E > instanceclass, E instance, int fieldindex)
{
return ReflectionHelper.getPrivateValue(instanceclass, instance, fieldindex);
}
/**
* Get a value from a field using reflection
* {@link ReflectionHelper#getPrivateValue(Class, Object, String)}
*
* @param instanceclass
* @param instance
* @param field
* @return
*/
public static <T, E> T getPrivateValue(Class <? super E > instanceclass, E instance, String field)
{
return ReflectionHelper.getPrivateValue(instanceclass, instance, field);
}
/**
* Stubbed method on the server to return a unique model id
*
*/
public static int getUniqueBlockModelID(BaseMod mod, boolean inventoryRenderer)
{
return -1;
}
/**
* Get a new unique entity id
* {@link Entity#getNextId()}
*
* @return
*/
public static int getUniqueEntityId()
{
return FMLCommonHandler.instance().nextUniqueEntityListId();
}
public static int getUniqueSpriteIndex(String path)
{
return -1;
}
/**
* To properly implement packet 250 protocol you should always check your
* channel is active prior to sending the packet
*
* @param player
* @param channel
* @return
*/
public static boolean isChannelActive(EntityPlayer player, String channel)
{
return FMLCommonHandler.instance().isChannelActive(channel, player);
}
public static boolean isGUIOpen(Class<?> gui)
{
return false;
}
/**
* Is the named mod loaded?
* {@link Loader#isModLoaded(String)}
*
* @param modname
* @return
*/
public static boolean isModLoaded(String modname)
{
return Loader.isModLoaded(modname);
}
/**
* Implemented elsewhere
*/
@Deprecated
public static void loadConfig()
{
}
public static Object loadImage(Object renderEngine, String path) throws Exception
{
return null;
}
/**
* Call in from elsewhere. Unimplemented here.
* @param player
* @param item
*/
@Deprecated
public static void onItemPickup(EntityPlayer player, ItemStack item)
{
}
/**
* Call in from elsewhere. Unimplemented here.
*/
@Deprecated
public static void onTick(float tick, Object game)
{
}
public static void openGUI(EntityPlayer player, Object gui)
{
// NOOP
}
@Deprecated
public static void populateChunk(IChunkProvider generator, int chunkX, int chunkZ, World world)
{
}
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
* {@link FMLBukkitHandler#handlePacket250(Packet250CustomPayload, EntityHuman)}
*
* @param packet
*/
@Deprecated
public static void receivePacket(Packet250CustomPayload packet)
{
}
@Deprecated
public static Object[] registerAllKeys(Object[] keys)
{
return keys;
}
@Deprecated
public static void registerAllTextureOverrides(Object cache)
{
}
/**
* Register a new block
*
* @param block
*/
public static void registerBlock(Block block)
{
FMLRegistry.registerBlock(block);
}
/**
* Register a new block
*
* @param block
* @param itemclass
*/
public static void registerBlock(Block block, Class <? extends ItemBlock > itemclass)
{
FMLRegistry.registerBlock(block, itemclass);
}
/**
* Register a new entity ID
*
* @param entityClass
* @param entityName
* @param id
*/
public static void registerEntityID(Class <? extends Entity > entityClass, String entityName, int id)
{
FMLRegistry.registerEntityID(entityClass, entityName, id);
}
/**
* Register a new entity ID
*
* @param entityClass
* @param entityName
* @param id
* @param background
* @param foreground
*/
public static void registerEntityID(Class <? extends Entity > entityClass, String entityName, int id, int background, int foreground)
{
FMLRegistry.registerEntityID(entityClass, entityName, id, background, foreground);
}
public static void registerKey(BaseMod mod, Object keyHandler, boolean allowRepeat)
{
// NOOP
}
/**
* Register the mod for packets on this channel. This only registers the
* channel with Forge Mod Loader, not with clients connecting- use
* BaseMod.onClientLogin to tell them about your custom channel
* {@link FMLCommonHandler#registerChannel(cpw.mods.fml.common.ModContainer, String)}
*
* @param mod
* @param channel
*/
public static void registerPacketChannel(BaseMod mod, String channel)
{
FMLCommonHandler.instance().registerChannel(ModLoaderModContainer.findContainerFor(mod), channel);
}
/**
* Register a new tile entity class
*
* @param tileEntityClass
* @param id
*/
public static void registerTileEntity(Class <? extends TileEntity > tileEntityClass, String id)
{
FMLRegistry.registerTileEntity(tileEntityClass, id);
}
public static void registerTileEntity(Class<? extends TileEntity> tileEntityClass, String id, Object renderer)
{
FMLRegistry.instance().registerTileEntity(tileEntityClass, id);
}
/**
* Remove a biome from the list of generated biomes
*
* @param biome
*/
public static void removeBiome(BiomeBase biome)
{
FMLRegistry.removeBiome(biome);
}
/**
* Remove a spawn
*
* @param entityClass
* @param spawnList
*/
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType spawnList)
{
FMLRegistry.removeSpawn(entityClass, spawnList, FMLBukkitHandler.instance().getDefaultOverworldBiomes());
}
/**
* Remove a spawn
*
* @param entityClass
* @param spawnList
* @param biomes
*/
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType spawnList, BiomeBase... biomes)
{
FMLRegistry.removeSpawn(entityClass, spawnList, biomes);
}
/**
* Remove a spawn
*
* @param entityName
* @param spawnList
*/
public static void removeSpawn(String entityName, EnumCreatureType spawnList)
{
FMLRegistry.removeSpawn(entityName, spawnList, FMLBukkitHandler.instance().getDefaultOverworldBiomes());
}
/**
* Remove a spawn
*
* @param entityName
* @param spawnList
* @param biomes
*/
public static void removeSpawn(String entityName, EnumCreatureType spawnList, BiomeBase... biomes)
{
FMLRegistry.removeSpawn(entityName, spawnList, biomes);
}
@Deprecated
public static boolean renderBlockIsItemFull3D(int modelID)
{
return false;
}
@Deprecated
public static void renderInvBlock(Object renderer, Block block, int metadata, int modelID)
{
// NOOP
}
@Deprecated
public static boolean renderWorldBlock(Object renderer, IBlockAccess world, int x, int y, int z, Block block, int modelID)
{
return false;
}
/**
* Configuration is handled elsewhere
* {@link ModLoaderModContainer}
*/
@Deprecated
public static void saveConfig()
{
}
/**
* Send a chat message to the server
* {@link FMLServerHandler#handleChatPacket(Packet3Chat, EntityPlayer)}
*
* @param text
*/
@Deprecated
public static void serverChat(String text)
{
//TODO
}
@Deprecated
public static void serverLogin(Object handler, Packet1Login loginPacket)
{
//TODO
}
/**
* Indicate that you want to receive ticks
*
* @param mod receiving the events
* @param enable indicates whether you want to recieve them or not
* @param useClock Not used in server side: all ticks are sent on the server side (no render subticks)
*/
public static void setInGameHook(BaseMod mod, boolean enable, boolean useClock)
{
ModLoaderHelper.updateStandardTicks(mod, enable, useClock);
}
public static void setInGUIHook(BaseMod mod, boolean enable, boolean useClock)
{
ModLoaderHelper.updateGUITicks(mod, enable, useClock);
}
/**
* Set a private field to a value using reflection
* {@link ReflectionHelper#setPrivateValue(Class, Object, int, Object)}
*
* @param instanceclass
* @param instance
* @param fieldindex
* @param value
*/
public static <T, E> void setPrivateValue(Class <? super T > instanceclass, T instance, int fieldindex, E value)
{
ReflectionHelper.setPrivateValue(instanceclass, instance, fieldindex, value);
}
/**
* Set a private field to a value using reflection
* {@link ReflectionHelper#setPrivateValue(Class, Object, String, Object)}
*
* @param instanceclass
* @param instance
* @param field
* @param value
*/
public static <T, E> void setPrivateValue(Class <? super T > instanceclass, T instance, String field, E value)
{
ReflectionHelper.setPrivateValue(instanceclass, instance, field, value);
}
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
* {@link FMLBukkitHandler#onItemCrafted(EntityHuman, ItemStack, IInventory)}
*
* @param player
* @param item
* @param matrix
*/
@Deprecated
public static void takenFromCrafting(EntityHuman player, ItemStack item, IInventory matrix)
{
}
/**
* This method is a call in hook from modified external code. Implemented elsewhere.
* {@link FMLBukkitHandler#onItemSmelted(EntityHuman, ItemStack)}
*
* @param player
* @param item
*/
@Deprecated
public static void takenFromFurnace(EntityHuman player, ItemStack item)
{
}
/**
* Throw the offered exception. Likely will stop the game.
* {@link FMLBukkitHandler#raiseException(Throwable, String, boolean)}
* @param message
* @param e
*/
public static void throwException(String message, Throwable e)
{
FMLBukkitHandler.instance().raiseException(e, message, true);
}
/**
* To properly implement packet 250 protocol you should always check your channel
* is active prior to sending the packet
*
* @param player
* @param channel
* @return
*/
public static boolean isChannelActive(EntityHuman player, String channel)
{
return FMLCommonHandler.instance().isChannelActive(channel, player);
}
}
@@ -1,46 +0,0 @@
/*
* The FML Forge Mod Loader suite.
* Copyright (C) 2012 cpw
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraft.server;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author cpw
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface SidedProxy
{
/**
* The name of the client side class to load and populate
* @return
*/
String clientSide() default "";
/**
* The name of the server side class to load and populate
* @return
*/
String serverSide() default "";
/**
* The name of the a special bukkit plugin class to load and populate
*/
String bukkitSide() default "";
}
@@ -1,5 +0,0 @@
package net.minecraft.src;
public interface BiomeGenBase {
}
-5
View File
@@ -1,5 +0,0 @@
package net.minecraft.src;
public interface Block {
}
-5
View File
@@ -1,5 +0,0 @@
package net.minecraft.src;
public interface Entity {
}
@@ -1,5 +0,0 @@
package net.minecraft.src;
public interface EntityLiving {
}
@@ -1,5 +0,0 @@
package net.minecraft.src;
public interface EnumCreatureType {
}
-5
View File
@@ -1,5 +0,0 @@
package net.minecraft.src;
public interface IRecipe {
}
-5
View File
@@ -1,5 +0,0 @@
package net.minecraft.src;
public interface ItemBlock {
}
-5
View File
@@ -1,5 +0,0 @@
package net.minecraft.src;
public interface ItemStack {
}
-5
View File
@@ -1,5 +0,0 @@
package net.minecraft.src;
public interface TileEntity {
}
-43
View File
@@ -1,43 +0,0 @@
import sys
import os, os.path, shutil
import fnmatch
import re
def main():
sys.stdout.flush()
for x in range(1, len(sys.argv)):
cleanup_source(sys.argv[x])
count = 0
def cleanup_source(path):
path = os.path.normpath(path)
regex_cases_before = re.compile(r'((case|default).+\r?\n)\r?\n', re.MULTILINE) #Fixes newline after case before case body
regex_cases_after = re.compile(r'\r?\n(\r?\n[ \t]+(case|default))', re.MULTILINE) #Fixes newline after case body before new case
def updatefile(src_file):
global count
tmp_file = src_file + '.tmp'
count = 0
with open(src_file, 'r') as fh:
buf = fh.read()
def fix_cases(match):
global count
count += 1
return match.group(1)
buf = regex_cases_before.sub(fix_cases, buf)
buf = regex_cases_after.sub(fix_cases, buf)
if count > 0:
with open(tmp_file, 'w') as fh:
fh.write(buf)
shutil.move(tmp_file, src_file)
for path, _, filelist in os.walk(path, followlinks=True):
sub_dir = os.path.relpath(path, path)
for cur_file in fnmatch.filter(filelist, '*.java'):
src_file = os.path.normpath(os.path.join(path, cur_file))
updatefile(src_file)
if __name__ == '__main__':
main()
-87
View File
@@ -1,87 +0,0 @@
--- commands.py
+++ commands.py
@@ -142,6 +142,8 @@
fieldnames = csvreader.fieldnames
return set(fieldnames)
+def commands_sanity_check():
+ print ' Commands patch applied successfully'
class Commands(object):
"""Contains the commands and initialisation for a full mcp run"""
@@ -980,6 +982,8 @@
binlk = {CLIENT: self.binclient, SERVER: self.binserver}
testlk = {CLIENT: self.testclient, SERVER: self.testserver}
+ if side == SERVER and not os.path.exists(os.path.join(binlk[side], os.path.normpath(testlk[side] + '.class'))):
+ return self.checkbins(CLIENT)
if not os.path.exists(os.path.join(binlk[side], os.path.normpath(testlk[side] + '.class'))):
return False
return True
@@ -1311,6 +1315,9 @@
pathbinlk = {CLIENT: self.binclient, SERVER: self.binserver}
pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver}
pathlog = {CLIENT: self.clientrecomplog, SERVER: self.serverrecomplog}
+
+ if side == SERVER: #Warn about server because FML recombines it into client
+ self.logger.info('Server side recompiling might be skipped, this is normal, do not complain to FML/Forge team about server side.')
if not os.path.exists(pathbinlk[side]):
os.makedirs(pathbinlk[side])
@@ -1368,7 +1375,7 @@
raise
def startserver(self):
- classpath = [self.binserver] + self.cpathserver
+ classpath = [self.binclient, self.srcclient] + self.cpathserver
classpath = [os.path.join('..', p) for p in classpath]
classpath = os.pathsep.join(classpath)
os.chdir(self.dirjars)
@@ -1376,7 +1383,7 @@
self.runmc(forkcmd)
def startclient(self):
- classpath = [self.binclient] + self.cpathclient
+ classpath = [self.binclient, self.srcclient] + self.cpathclient
classpath = [os.path.join('..', p) for p in classpath]
classpath = os.pathsep.join(classpath)
natives = os.path.join('..', self.dirnatives)
@@ -1733,7 +1740,7 @@
self.runcmd(forkcmd)
return True
- def gathermd5s(self, side, reobf=False):
+ def gathermd5s(self, side, reobf=False, skip_fml=False):
if not reobf:
md5lk = {CLIENT: self.md5client, SERVER: self.md5server}
else:
@@ -1748,6 +1755,9 @@
class_path = ''
else:
class_path += '/'
+ if skip_fml:
+ if class_path.startswith('cpw/'):
+ continue
for class_file in fnmatch.filter(filelist, '*.class'):
class_name = class_path + os.path.splitext(class_file)[0]
bin_file = os.path.normpath(os.path.join(path, class_file))
@@ -1920,6 +1930,9 @@
sys.exit(1)
for entry in newfiles:
+ if 'commands.py' in entry[0]: #FML, Disable updating of Commands.py
+ print 'Update to runtime/commands.py found, but disbled due to using fml'
+ continue
if entry[3] == 'U':
self.logger.info('Retrieving file from server : %s', entry[0])
cur_file = os.path.normpath(entry[0])
@@ -1940,6 +1953,9 @@
md5reoblk = {CLIENT: self.md5reobfclient, SERVER: self.md5reobfserver}
outpathlk = {CLIENT: self.srcmodclient, SERVER: self.srcmodserver}
src = {CLIENT: self.srcclient, SERVER: self.srcserver}
+
+ if side == SERVER: #Noop out server side stuff
+ return
# HINT: We need a table for the old md5 and the new ones
md5table = {}
@@ -1,98 +0,0 @@
package cpw.mods.fml.common.launcher;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.google.common.base.Throwables;
import com.google.common.collect.ObjectArrays;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
import net.minecraft.launchwrapper.ITweaker;
import net.minecraft.launchwrapper.LaunchClassLoader;
public class FMLTweaker implements ITweaker {
private List<String> args;
private File gameDir;
private File assetsDir;
private String profile;
private static URI jarLocation;
private String[] array;
@Override
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile)
{
this.args = args;
this.gameDir = (gameDir == null ? new File(".") : gameDir);
this.assetsDir = assetsDir;
this.profile = profile;
try
{
jarLocation = getClass().getProtectionDomain().getCodeSource().getLocation().toURI();
}
catch (URISyntaxException e)
{
Logger.getLogger("FMLTWEAK").log(Level.SEVERE, "Missing URI information for FML tweak");
throw Throwables.propagate(e);
}
}
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
classLoader.addTransformerExclusion("cpw.mods.fml.repackage.");
classLoader.addTransformerExclusion("cpw.mods.fml.relauncher.");
classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers.");
FMLLaunchHandler.configureForClientLaunch(classLoader, this);
}
@Override
public String getLaunchTarget()
{
return "net.minecraft.client.main.Main";
}
@Override
public String[] getLaunchArguments()
{
String[] array = args.toArray(new String[args.size()]);
if (gameDir != null)
{
array = ObjectArrays.concat(gameDir.getAbsolutePath(),array);
array = ObjectArrays.concat("--gameDir",array);
}
if (assetsDir != null)
{
array = ObjectArrays.concat(assetsDir.getAbsolutePath(),array);
array = ObjectArrays.concat("--assetsDir",array);
}
if (profile != null)
{
array = ObjectArrays.concat(profile,array);
array = ObjectArrays.concat("--version",array);
}
else
{
array = ObjectArrays.concat("UnknownFMLProfile",array);
array = ObjectArrays.concat("--version",array);
}
return array;
}
public File getGameDir()
{
return gameDir;
}
public static URI getJarLocation()
{
return jarLocation;
}
}
@@ -1,145 +0,0 @@
package cpw.mods.fml.common.patcher;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.net.URISyntaxException;
import java.security.CodeSource;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.regex.Pattern;
import com.google.common.base.Joiner;
import com.google.common.base.Strings;
import com.google.common.base.Throwables;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteStreams;
import com.google.common.io.Files;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.launcher.FMLTweaker;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.repackage.com.nothome.delta.GDiffPatcher;
public class ClassPatchManager {
public static final ClassPatchManager INSTANCE = new ClassPatchManager();
private GDiffPatcher patcher = new GDiffPatcher();
private ListMultimap<String, ClassPatch> patches;
private ClassPatchManager()
{
}
public byte[] applyPatch(String name, String mappedName, byte[] inputData)
{
if (patches == null)
{
return inputData;
}
List<ClassPatch> list = patches.get(name);
if (list.isEmpty())
{
return inputData;
}
for (ClassPatch patch: list)
{
if (!patch.targetClassName.equals(mappedName))
{
FMLLog.warning("Binary patch found %s for wrong class %s", patch.targetClassName, mappedName);
}
if (!patch.existsAtTarget && (inputData == null || inputData.length == 0))
{
inputData = new byte[0];
}
else if (!patch.existsAtTarget)
{
FMLLog.warning("Patcher expecting empty class data file for %s, but received non-empty", patch.targetClassName);
}
synchronized (patcher)
{
try
{
inputData = patcher.patch(inputData, patch.patch);
}
catch (IOException e)
{
FMLLog.log(Level.SEVERE, e, "Encountered problem runtime patching class %s", name);
continue;
}
}
}
FMLLog.fine("Successfully applied runtime patches for %s", mappedName);
return inputData;
}
public void setup(Side side)
{
Pattern binpatchMatcher = Pattern.compile(String.format("binpatch/%s/.*.binpatch", side.toString().toLowerCase(Locale.ENGLISH)));
JarFile fmlJar;
try
{
FMLRelaunchLog.fine("FML URI is %s", FMLTweaker.getJarLocation());
File fmlJarFile = new File(FMLTweaker.getJarLocation());
if (!fmlJarFile.exists() || !fmlJarFile.isFile())
{
FMLRelaunchLog.log(Level.INFO, "Not found an FML jar, I assume you're developing FML. Hi cpw or Lex!");
patches = ArrayListMultimap.create();
return;
}
fmlJar = new JarFile(fmlJarFile);
}
catch (Exception e)
{
FMLRelaunchLog.log(Level.SEVERE, e, "Error occurred reading binary patches. Problems may occur");
throw Throwables.propagate(e);
}
patches = ArrayListMultimap.create();
for (JarEntry entry : Collections.list(fmlJar.entries()))
{
if (binpatchMatcher.matcher(entry.getName()).matches())
{
ClassPatch cp = readPatch(entry, fmlJar);
if (cp != null)
{
patches.put(cp.sourceClassName, cp);
}
}
}
FMLLog.fine("Read %d binary patches from %s", patches.size(), fmlJar.getName());
FMLLog.fine("Patch list :\n\t%s", Joiner.on("\t\n").join(patches.asMap().entrySet()));
}
private ClassPatch readPatch(JarEntry patchEntry, JarFile jarFile)
{
FMLLog.finest("Reading patch data from %s in file %s", patchEntry.getName(), jarFile.getName());
ByteArrayDataInput input;
try
{
input = ByteStreams.newDataInput(ByteStreams.toByteArray(jarFile.getInputStream(patchEntry)));
}
catch (IOException e)
{
FMLLog.log(Level.WARNING, e, "Unable to read binpatch file %s - ignoring", patchEntry.getName());
return null;
}
String name = input.readUTF();
String sourceClassName = input.readUTF();
String targetClassName = input.readUTF();
boolean exists = input.readBoolean();
int patchLength = input.readInt();
byte[] patchBytes = new byte[patchLength];
input.readFully(patchBytes);
return new ClassPatch(name, sourceClassName, targetClassName, exists, patchBytes);
}
}
@@ -1,5 +0,0 @@
package cpw.mods.fml.common.patcher;
public class ClassPatchingTransformer {
}
@@ -1,38 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
public class CoreFMLLibraries implements ILibrarySet
{
private static String[] libraries = { "argo-small-3.2.jar","guava-14.0-rc3.jar","asm-all-4.1.jar", "bcprov-jdk15on-148.jar", FMLInjectionData.debfuscationDataName(), "scala-library.jar" };
private static String[] checksums = { "58912ea2858d168c50781f956fa5b59f0f7c6b51", "931ae21fa8014c3ce686aaa621eae565fefb1a6a", "054986e962b88d8660ae4566475658469595ef58", "960dea7c9181ba0b17e8bab0c06a43f0a5f04e65", FMLInjectionData.deobfuscationDataHash, "458d046151ad179c85429ed7420ffb1eaf6ddf85" };
@Override
public String[] getLibraries()
{
return libraries;
}
@Override
public String[] getHashes()
{
return checksums;
}
@Override
public String getRootURL()
{
return System.getProperty("fml.core.libraries.mirror", "http://files.minecraftforge.net/fmllibs/%s");
}
}
@@ -1,630 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InterruptedIOException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileChannel.MapMode;
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.logging.Level;
import net.minecraft.launchwrapper.LaunchClassLoader;
import cpw.mods.fml.common.CertificateHelper;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions;
public class CoreModManager
{
private static String[] rootPlugins = { "cpw.mods.fml.relauncher.FMLCorePlugin" , "net.minecraftforge.classloading.FMLForgePlugin" };
private static List<String> loadedLibraries = new ArrayList<String>();
private static Map<IFMLLoadingPlugin, File> pluginLocations;
private static List<IFMLLoadingPlugin> loadPlugins;
private static List<ILibrarySet> libraries;
private static boolean deobfuscatedEnvironment;
public static void handleLaunch(File mcDir, LaunchClassLoader classLoader)
{
try
{
// Are we in a 'decompiled' environment?
byte[] bs = classLoader.getClassBytes("net.minecraft.world.World");
if (bs != null)
{
FMLRelaunchLog.info("Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation");
deobfuscatedEnvironment = true;
}
}
catch (IOException e1)
{
}
if (!deobfuscatedEnvironment)
{
FMLRelaunchLog.fine("Enabling runtime deobfuscation");
}
pluginLocations = new HashMap<IFMLLoadingPlugin, File>();
loadPlugins = new ArrayList<IFMLLoadingPlugin>();
for (String s : rootPlugins)
{
try
{
FMLRelaunchLog.finest("Adding coremod for loading %s", s);
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) Class.forName(s, true, classLoader).newInstance();
loadPlugins.add(plugin);
}
catch (Exception e)
{
// HMMM
}
}
if (loadPlugins.isEmpty())
{
throw new RuntimeException("A fatal error has occured - no valid fml load plugin was found - this is a completely corrupt FML installation.");
}
downloadMonitor.updateProgressString("All core mods are successfully located");
// Now that we have the root plugins loaded - lets see what else might be around
String commandLineCoremods = System.getProperty("fml.coreMods.load","");
for (String s : commandLineCoremods.split(","))
{
if (s.isEmpty())
{
continue;
}
FMLRelaunchLog.info("Found a command line coremod : %s", s);
try
{
classLoader.addTransformerExclusion(s);
Class<?> coreModClass = Class.forName(s, true, classLoader);
TransformerExclusions trExclusions = coreModClass.getAnnotation(IFMLLoadingPlugin.TransformerExclusions.class);
if (trExclusions!=null)
{
for (String st : trExclusions.value())
{
classLoader.addTransformerExclusion(st);
}
}
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) coreModClass.newInstance();
loadPlugins.add(plugin);
if (plugin.getLibraryRequestClass()!=null)
{
for (String libName : plugin.getLibraryRequestClass())
{
libraries.add((ILibrarySet) Class.forName(libName, true, classLoader).newInstance());
}
}
}
catch (Throwable e)
{
FMLRelaunchLog.log(Level.SEVERE,e,"Exception occured trying to load coremod %s",s);
throw new RuntimeException(e);
}
}
discoverCoreMods(mcDir, classLoader, loadPlugins, libraries);
List<Throwable> caughtErrors = new ArrayList<Throwable>();
try
{
File libDir;
try
{
libDir = setupLibDir(mcDir);
}
catch (Exception e)
{
caughtErrors.add(e);
return;
}
libraries = new ArrayList<ILibrarySet>();
for (ILibrarySet lib : libraries)
{
for (int i=0; i<lib.getLibraries().length; i++)
{
boolean download = false;
String libName = lib.getLibraries()[i];
String targFileName = libName.lastIndexOf('/')>=0 ? libName.substring(libName.lastIndexOf('/')) : libName;
String checksum = lib.getHashes()[i];
File libFile = new File(libDir, targFileName);
if (!libFile.exists())
{
try
{
downloadFile(libFile, lib.getRootURL(), libName, checksum);
download = true;
}
catch (Throwable e)
{
caughtErrors.add(e);
continue;
}
}
if (libFile.exists() && !libFile.isFile())
{
caughtErrors.add(new RuntimeException(String.format("Found a file %s that is not a normal file - you should clear this out of the way", libName)));
continue;
}
if (!download)
{
try
{
FileInputStream fis = new FileInputStream(libFile);
FileChannel chan = fis.getChannel();
MappedByteBuffer mappedFile = chan.map(MapMode.READ_ONLY, 0, libFile.length());
String fileChecksum = generateChecksum(mappedFile);
fis.close();
// bad checksum and I did not download this file
if (!checksum.equals(fileChecksum))
{
caughtErrors.add(new RuntimeException(String.format("The file %s was found in your lib directory and has an invalid checksum %s (expecting %s) - it is unlikely to be the correct download, please move it out of the way and try again.", libName, fileChecksum, checksum)));
continue;
}
}
catch (Exception e)
{
FMLRelaunchLog.log(Level.SEVERE, e, "The library file %s could not be validated", libFile.getName());
caughtErrors.add(new RuntimeException(String.format("The library file %s could not be validated", libFile.getName()),e));
continue;
}
}
if (!download)
{
downloadMonitor.updateProgressString("Found library file %s present and correct in lib dir", libName);
}
else
{
downloadMonitor.updateProgressString("Library file %s was downloaded and verified successfully", libName);
}
try
{
classLoader.addURL(libFile.toURI().toURL());
loadedLibraries.add(libName);
}
catch (MalformedURLException e)
{
caughtErrors.add(new RuntimeException(String.format("Should never happen - %s is broken - probably a somehow corrupted download. Delete it and try again.", libFile.getName()), e));
}
}
}
}
finally
{
if (downloadMonitor.shouldStopIt())
{
return;
}
if (!caughtErrors.isEmpty())
{
FMLRelaunchLog.severe("There were errors during initial FML setup. " +
"Some files failed to download or were otherwise corrupted. " +
"You will need to manually obtain the following files from " +
"these download links and ensure your lib directory is clean. ");
for (ILibrarySet set : libraries)
{
for (String file : set.getLibraries())
{
FMLRelaunchLog.severe("*** Download "+set.getRootURL(), file);
}
}
FMLRelaunchLog.severe("<===========>");
FMLRelaunchLog.severe("The following is the errors that caused the setup to fail. " +
"They may help you diagnose and resolve the issue");
for (Throwable t : caughtErrors)
{
if (t.getMessage()!=null)
{
FMLRelaunchLog.severe(t.getMessage());
}
}
FMLRelaunchLog.severe("<<< ==== >>>");
FMLRelaunchLog.severe("The following is diagnostic information for developers to review.");
for (Throwable t : caughtErrors)
{
FMLRelaunchLog.log(Level.SEVERE, t, "Error details");
}
throw new RuntimeException("A fatal error occured and FML cannot continue");
}
}
for (IFMLLoadingPlugin plug : loadPlugins)
{
if (plug.getASMTransformerClass()!=null)
{
for (String xformClass : plug.getASMTransformerClass())
{
FMLRelaunchLog.finest("Registering transformer %s", xformClass);
classLoader.registerTransformer(xformClass);
}
}
}
// Deobfuscation transformer, always last
if (!deobfuscatedEnvironment)
{
classLoader.registerTransformer("cpw.mods.fml.common.asm.transformers.DeobfuscationTransformer");
}
downloadMonitor.updateProgressString("Running coremod plugins");
Map<String,Object> data = new HashMap<String,Object>();
data.put("mcLocation", mcDir);
data.put("coremodList", loadPlugins);
data.put("runtimeDeobfuscationEnabled", !deobfuscatedEnvironment);
for (IFMLLoadingPlugin plugin : loadPlugins)
{
downloadMonitor.updateProgressString("Running coremod plugin %s", plugin.getClass().getSimpleName());
data.put("coremodLocation", pluginLocations.get(plugin));
plugin.injectData(data);
String setupClass = plugin.getSetupClass();
if (setupClass != null)
{
try
{
IFMLCallHook call = (IFMLCallHook) Class.forName(setupClass, true, classLoader).newInstance();
Map<String,Object> callData = new HashMap<String, Object>();
callData.put("mcLocation", mcDir);
callData.put("classLoader", classLoader);
callData.put("coremodLocation", pluginLocations.get(plugin));
callData.put("deobfuscationFileName", FMLInjectionData.debfuscationDataName());
call.injectData(callData);
call.call();
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
downloadMonitor.updateProgressString("Coremod plugin %s run successfully", plugin.getClass().getSimpleName());
String modContainer = plugin.getModContainerClass();
if (modContainer != null)
{
FMLInjectionData.containers.add(modContainer);
}
}
try
{
downloadMonitor.updateProgressString("Validating minecraft");
Class<?> loaderClazz = Class.forName("cpw.mods.fml.common.Loader", true, classLoader);
Method m = loaderClazz.getMethod("injectData", Object[].class);
m.invoke(null, (Object)FMLInjectionData.data());
m = loaderClazz.getMethod("instance");
m.invoke(null);
downloadMonitor.updateProgressString("Minecraft validated, launching...");
downloadBuffer = null;
}
catch (Exception e)
{
// Load in the Loader, make sure he's ready to roll - this will initialize most of the rest of minecraft here
System.out.println("A CRITICAL PROBLEM OCCURED INITIALIZING MINECRAFT - LIKELY YOU HAVE AN INCORRECT VERSION FOR THIS FML");
throw new RuntimeException(e);
}
}
private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader, List<IFMLLoadingPlugin> loadPlugins, List<ILibrarySet> libraries)
{
downloadMonitor.updateProgressString("Discovering coremods");
File coreMods = setupCoreModDir(mcDir);
FilenameFilter ff = new FilenameFilter()
{
@Override
public boolean accept(File dir, String name)
{
return name.endsWith(".jar");
}
};
File[] coreModList = coreMods.listFiles(ff);
Arrays.sort(coreModList);
for (File coreMod : coreModList)
{
downloadMonitor.updateProgressString("Found a candidate coremod %s", coreMod.getName());
JarFile jar;
Attributes mfAttributes;
try
{
jar = new JarFile(coreMod);
if (jar.getManifest() == null)
{
FMLRelaunchLog.warning("Found an un-manifested jar file in the coremods folder : %s, it will be ignored.", coreMod.getName());
continue;
}
mfAttributes = jar.getManifest().getMainAttributes();
}
catch (IOException ioe)
{
FMLRelaunchLog.log(Level.SEVERE, ioe, "Unable to read the coremod jar file %s - ignoring", coreMod.getName());
continue;
}
String fmlCorePlugin = mfAttributes.getValue("FMLCorePlugin");
if (fmlCorePlugin == null)
{
FMLRelaunchLog.severe("The coremod %s does not contain a valid jar manifest- it will be ignored", coreMod.getName());
continue;
}
// String className = fmlCorePlugin.replace('.', '/').concat(".class");
// JarEntry ent = jar.getJarEntry(className);
// if (ent ==null)
// {
// FMLLog.severe("The coremod %s specified %s as it's loading class but it does not include it - it will be ignored", coreMod.getName(), fmlCorePlugin);
// continue;
// }
// try
// {
// Class<?> coreModClass = Class.forName(fmlCorePlugin, false, classLoader);
// FMLLog.severe("The coremods %s specified a class %s that is already present in the classpath - it will be ignored", coreMod.getName(), fmlCorePlugin);
// continue;
// }
// catch (ClassNotFoundException cnfe)
// {
// // didn't find it, good
// }
try
{
classLoader.addURL(coreMod.toURI().toURL());
}
catch (MalformedURLException e)
{
FMLRelaunchLog.log(Level.SEVERE, e, "Unable to convert file into a URL. weird");
continue;
}
try
{
downloadMonitor.updateProgressString("Loading coremod %s", coreMod.getName());
classLoader.addTransformerExclusion(fmlCorePlugin);
Class<?> coreModClass = Class.forName(fmlCorePlugin, true, classLoader);
MCVersion requiredMCVersion = coreModClass.getAnnotation(IFMLLoadingPlugin.MCVersion.class);
String version = "";
if (requiredMCVersion == null)
{
FMLRelaunchLog.log(Level.WARNING, "The coremod %s does not have a MCVersion annotation, it may cause issues with this version of Minecraft", fmlCorePlugin);
}
else
{
version = requiredMCVersion.value();
}
if (!"".equals(version) && !FMLInjectionData.mccversion.equals(version))
{
FMLRelaunchLog.log(Level.SEVERE, "The coremod %s is requesting minecraft version %s and minecraft is %s. It will be ignored.", fmlCorePlugin, version, FMLInjectionData.mccversion);
continue;
}
else if (!"".equals(version))
{
FMLRelaunchLog.log(Level.FINE, "The coremod %s requested minecraft version %s and minecraft is %s. It will be loaded.", fmlCorePlugin, version, FMLInjectionData.mccversion);
}
TransformerExclusions trExclusions = coreModClass.getAnnotation(IFMLLoadingPlugin.TransformerExclusions.class);
if (trExclusions!=null)
{
for (String st : trExclusions.value())
{
classLoader.addTransformerExclusion(st);
}
}
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) coreModClass.newInstance();
loadPlugins.add(plugin);
pluginLocations .put(plugin, coreMod);
if (plugin.getLibraryRequestClass()!=null)
{
for (String libName : plugin.getLibraryRequestClass())
{
libraries.add((ILibrarySet) Class.forName(libName, true, classLoader).newInstance());
}
}
downloadMonitor.updateProgressString("Loaded coremod %s", coreMod.getName());
}
catch (ClassNotFoundException cnfe)
{
FMLRelaunchLog.log(Level.SEVERE, cnfe, "Coremod %s: Unable to class load the plugin %s", coreMod.getName(), fmlCorePlugin);
}
catch (ClassCastException cce)
{
FMLRelaunchLog.log(Level.SEVERE, cce, "Coremod %s: The plugin %s is not an implementor of IFMLLoadingPlugin", coreMod.getName(), fmlCorePlugin);
}
catch (InstantiationException ie)
{
FMLRelaunchLog.log(Level.SEVERE, ie, "Coremod %s: The plugin class %s was not instantiable", coreMod.getName(), fmlCorePlugin);
}
catch (IllegalAccessException iae)
{
FMLRelaunchLog.log(Level.SEVERE, iae, "Coremod %s: The plugin class %s was not accessible", coreMod.getName(), fmlCorePlugin);
}
}
}
/**
* @param mcDir the minecraft home directory
* @return the lib directory
*/
private static File setupLibDir(File mcDir)
{
File libDir = new File(mcDir,"lib");
try
{
libDir = libDir.getCanonicalFile();
}
catch (IOException e)
{
throw new RuntimeException(String.format("Unable to canonicalize the lib dir at %s", mcDir.getName()),e);
}
if (!libDir.exists())
{
libDir.mkdir();
}
else if (libDir.exists() && !libDir.isDirectory())
{
throw new RuntimeException(String.format("Found a lib file in %s that's not a directory", mcDir.getName()));
}
return libDir;
}
/**
* @param mcDir the minecraft home directory
* @return the coremod directory
*/
private static File setupCoreModDir(File mcDir)
{
File coreModDir = new File(mcDir,"coremods");
try
{
coreModDir = coreModDir.getCanonicalFile();
}
catch (IOException e)
{
throw new RuntimeException(String.format("Unable to canonicalize the coremod dir at %s", mcDir.getName()),e);
}
if (!coreModDir.exists())
{
coreModDir.mkdir();
}
else if (coreModDir.exists() && !coreModDir.isDirectory())
{
throw new RuntimeException(String.format("Found a coremod file in %s that's not a directory", mcDir.getName()));
}
return coreModDir;
}
private static void downloadFile(File libFile, String rootUrl,String realFilePath, String hash)
{
try
{
URL libDownload = new URL(String.format(rootUrl,realFilePath));
downloadMonitor.updateProgressString("Downloading file %s", libDownload.toString());
FMLRelaunchLog.info("Downloading file %s", libDownload.toString());
URLConnection connection = libDownload.openConnection();
connection.setConnectTimeout(5000);
connection.setReadTimeout(5000);
connection.setRequestProperty("User-Agent", "FML Relaunch Downloader");
int sizeGuess = connection.getContentLength();
performDownload(connection.getInputStream(), sizeGuess, hash, libFile);
downloadMonitor.updateProgressString("Download complete");
FMLRelaunchLog.info("Download complete");
}
catch (Exception e)
{
if (downloadMonitor.shouldStopIt())
{
FMLRelaunchLog.warning("You have stopped the downloading operation before it could complete");
return;
}
if (e instanceof RuntimeException) throw (RuntimeException)e;
FMLRelaunchLog.severe("There was a problem downloading the file %s automatically. Perhaps you " +
"have an environment without internet access. You will need to download " +
"the file manually or restart and let it try again\n", libFile.getName());
libFile.delete();
throw new RuntimeException("A download error occured", e);
}
}
public static List<String> getLibraries()
{
return loadedLibraries;
}
private static ByteBuffer downloadBuffer = ByteBuffer.allocateDirect(1 << 23);
static IDownloadDisplay downloadMonitor;
private static void performDownload(InputStream is, int sizeGuess, String validationHash, File target)
{
if (sizeGuess > downloadBuffer.capacity())
{
throw new RuntimeException(String.format("The file %s is too large to be downloaded by FML - the coremod is invalid", target.getName()));
}
downloadBuffer.clear();
int bytesRead, fullLength = 0;
downloadMonitor.resetProgress(sizeGuess);
try
{
downloadMonitor.setPokeThread(Thread.currentThread());
byte[] smallBuffer = new byte[1024];
while ((bytesRead = is.read(smallBuffer)) >= 0) {
downloadBuffer.put(smallBuffer, 0, bytesRead);
fullLength += bytesRead;
if (downloadMonitor.shouldStopIt())
{
break;
}
downloadMonitor.updateProgress(fullLength);
}
is.close();
downloadMonitor.setPokeThread(null);
downloadBuffer.limit(fullLength);
downloadBuffer.position(0);
}
catch (InterruptedIOException e)
{
// We were interrupted by the stop button. We're stopping now.. clear interruption flag.
Thread.interrupted();
return;
}
catch (IOException e)
{
throw new RuntimeException(e);
}
try
{
String cksum = generateChecksum(downloadBuffer);
if (cksum.equals(validationHash))
{
downloadBuffer.position(0);
FileOutputStream fos = new FileOutputStream(target);
fos.getChannel().write(downloadBuffer);
fos.close();
}
else
{
throw new RuntimeException(String.format("The downloaded file %s has an invalid checksum %s (expecting %s). The download did not succeed correctly and the file has been deleted. Please try launching again.", target.getName(), cksum, validationHash));
}
}
catch (Exception e)
{
if (e instanceof RuntimeException) throw (RuntimeException)e;
throw new RuntimeException(e);
}
}
private static String generateChecksum(ByteBuffer buffer)
{
return CertificateHelper.getFingerprint(buffer);
}
}
@@ -1,152 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
import java.awt.Dialog.ModalityType;
import java.awt.Dimension;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.Box;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JProgressBar;
import cpw.mods.fml.common.FMLLog;
public class Downloader extends JOptionPane implements IDownloadDisplay
{
private JDialog container;
private JLabel currentActivity;
private JProgressBar progress;
boolean stopIt;
Thread pokeThread;
private Box makeProgressPanel()
{
Box box = Box.createVerticalBox();
box.add(Box.createRigidArea(new Dimension(0,10)));
JLabel welcomeLabel = new JLabel("<html><b><font size='+1'>FML is setting up your minecraft environment</font></b></html>");
box.add(welcomeLabel);
welcomeLabel.setAlignmentY(LEFT_ALIGNMENT);
welcomeLabel = new JLabel("<html>Please wait, FML has some tasks to do before you can play</html>");
welcomeLabel.setAlignmentY(LEFT_ALIGNMENT);
box.add(welcomeLabel);
box.add(Box.createRigidArea(new Dimension(0,10)));
currentActivity = new JLabel("Currently doing ...");
box.add(currentActivity);
box.add(Box.createRigidArea(new Dimension(0,10)));
progress = new JProgressBar(0, 100);
progress.setStringPainted(true);
box.add(progress);
box.add(Box.createRigidArea(new Dimension(0,30)));
return box;
}
public JDialog makeDialog()
{
setMessageType(JOptionPane.INFORMATION_MESSAGE);
setMessage(makeProgressPanel());
setOptions(new Object[] { "Stop" });
addPropertyChangeListener(new PropertyChangeListener()
{
@Override
public void propertyChange(PropertyChangeEvent evt)
{
if (evt.getSource() == Downloader.this && evt.getPropertyName()==VALUE_PROPERTY)
{
requestClose("This will stop minecraft from launching\nAre you sure you want to do this?");
}
}
});
container = new JDialog(null, "Hello", ModalityType.MODELESS);
container.setResizable(false);
container.setLocationRelativeTo(null);
container.add(this);
this.updateUI();
container.pack();
container.setMinimumSize(container.getPreferredSize());
container.setVisible(true);
container.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
container.addWindowListener(new WindowAdapter()
{
@Override
public void windowClosing(WindowEvent e)
{
requestClose("Closing this window will stop minecraft from launching\nAre you sure you wish to do this?");
}
});
return container;
}
protected void requestClose(String message)
{
int shouldClose = JOptionPane.showConfirmDialog(container, message, "Are you sure you want to stop?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if (shouldClose == JOptionPane.YES_OPTION)
{
container.dispose();
}
stopIt = true;
if (pokeThread != null)
{
pokeThread.interrupt();
}
}
public void updateProgressString(String progressUpdate, Object... data)
{
FMLLog.finest(progressUpdate, data);
if (currentActivity!=null)
{
currentActivity.setText(String.format(progressUpdate,data));
}
}
public void resetProgress(int sizeGuess)
{
if (progress!=null)
{
progress.getModel().setRangeProperties(0, 0, 0, sizeGuess, false);
}
}
public void updateProgress(int fullLength)
{
if (progress!=null)
{
progress.getModel().setValue(fullLength);
}
}
public void makeHeadless()
{
container = null;
progress = null;
currentActivity = null;
}
@Override
public void setPokeThread(Thread currentThread)
{
this.pokeThread = currentThread;
}
@Override
public boolean shouldStopIt()
{
return stopIt;
}
}
@@ -1,68 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
import java.util.logging.Level;
public class DummyDownloader implements IDownloadDisplay
{
@Override
public void resetProgress(int sizeGuess)
{
// TODO Auto-generated method stub
}
@Override
public void setPokeThread(Thread currentThread)
{
// TODO Auto-generated method stub
}
@Override
public void updateProgress(int fullLength)
{
// TODO Auto-generated method stub
}
@Override
public boolean shouldStopIt()
{
// TODO Auto-generated method stub
return false;
}
@Override
public void updateProgressString(String string, Object... data)
{
FMLRelaunchLog.log(Level.FINE, string, data);
}
@Override
public Object makeDialog()
{
// TODO Auto-generated method stub
return null;
}
@Override
public void makeHeadless()
{
// TODO Auto-generated method stub
}
}
@@ -1,34 +0,0 @@
/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* cpw - implementation
*/
package cpw.mods.fml.relauncher;
import javax.swing.JDialog;
public interface IDownloadDisplay
{
void resetProgress(int sizeGuess);
void setPokeThread(Thread currentThread);
void updateProgress(int fullLength);
boolean shouldStopIt();
void updateProgressString(String string, Object ... data);
Object makeDialog();
void makeHeadless();
}
@@ -1,32 +0,0 @@
package cpw.mods.fml.relauncher;
import java.io.File;
import java.net.URLClassLoader;
import java.util.logging.Level;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.launchwrapper.LaunchClassLoader;
import com.google.common.base.Throwables;
public class ServerLaunchWrapper {
/**
* @param args
*/
public static void main(String[] args)
{
new ServerLaunchWrapper().run(args);
}
private ServerLaunchWrapper()
{
}
private void run(String[] args)
{
Launch.main(args);
}
}
-76
View File
@@ -1,76 +0,0 @@
#Main FML Access Transformer configuration file
# TileEntity addMapping
public ash.a(Ljava/lang/Class;Ljava/lang/String;)V #MD:TileEntity/func_70306_a
# EntityList addMappings
public np.a(Ljava/lang/Class;Ljava/lang/String;I)V #MD:EntityList/func_75618_a
public np.a(Ljava/lang/Class;Ljava/lang/String;III)V #MD:EntityList/func_75614_a
public np.b #FD:EntityList/field_75625_b #nameToClassMap
public np.c #FD:EntityList/field_75626_c #classToNameMap
public np.d #FD:EntityList/field_75623_d #idToClassMap
# RenderEngine
#public bba.h #FD:RenderEngine/field_78367_h #textureList # -- MISSING MAPPING # -- MISSING MAPPING
#public bge.g #FD:RenderEngine/field_78366_k #texturePack # -- MISSING MAPPING
# RenderManager
public bfx.q #FD:RenderManager/field_78729_o #renderers
# RenderBlocks - everything
public bfd.* #FD:RenderBlocks/*
public bfd.*() #MD:RenderBlocks/*
#RenderPlayer
#public-f bht.h #FD:RenderPlayer/field_77110_j #armorlist # -- MISSING MAPPING
#RenderBiped
public-f bgg.l #FD:RenderBiped/field_82424_k #armorlist
#StringTranslate
#public bp.b #FD:StringTranslate/field_74815_b # -- MISSING MAPPING
#public bp.e #FD:StringTranslate/field_74813_d # -- MISSING MAPPING
# TileEntityRenderer
public bip.m #FD:TileEntityRenderer/field_76966_m
# CraftingManager - make the add recipe methods public
public zz.a(Lxy;[Ljava/lang/Object;)Laac; #MD:CraftingManager/func_92103_a
public zz.b(Lxy;[Ljava/lang/Object;)V #MD:CraftingManager/func_77596_b
# WeightedRandomItem
public mf.a #FD:WeightedRandomItem/field_76292_a #probability
# ItemStack
#public+f tv.c #FD:ItemStack/field_77993_c #itemId
# StatBase
public kq.a #FD:StatBase/field_75978_a #statName
# NetLoginHandler
public ju.a(Lju;Z)Z #MD:NetLoginHandler/func_72531_a #'complete connection'
public ju.g #FD:NetLoginHandler/field_72543_h #userName
# EntityPlayerMP getNextWindowId
public jr.bJ()V #MD:EntityPlayerMP/func_71117_bO
public jr.bX #FD:EntityPlayerMP/field_71139_cq
# EntityAITaskEntry
public pq #CL:EntityAITaskEntry
# EntityAITasks
public pp.a #FD:EntityAITasks/field_75782_a #taskList
# BlockChest
public anc.m(Labq;III)Z #MD:BlockChest/func_72292_n #isOcelotBlockingChest
# EntityLiving
#public ng.aU #FD:EntityLiving/field_70736_aM #carryoverDamage # -- MISSING MAPPING
public oc.c #FD:EntityLiving/field_70714_bg #tasks
#public ng.bG #FD:EntityLiving/field_70703_bu #isJumping # -- MISSING MAPPING
# EntityAIOcelotSit
protected qc.a(Labq;III)Z #MD:EntityAIOcelotSit/func_75398_a #nearestSittableBlock
protected qc.f()Z #MD:EntityAIOcelotSit/func_75399_f #isblocksittable
# CallableMinecraftVersion - sanity check the MC version
public c #CL:CallableMinecraftVersion
public c.<init>(Lb;)V #MD:CallableMinecraftVersion/<init>(Lnet/minecraft/src/CrashReport;) #constructor
# EntityAnimal
public rl.bp #FD:EntityAnimal/field_70881_d #inLove
# WorldType
public aca.<init>(ILjava/lang/String;)V #MD:WorldType/<init>(ILjava/lang/String;)
public aca.<init>(ILjava/lang/String;I)V #MD:WorldType/<init>(ILjava/lang/String;I)
# ComponentVillage
public aje #CL:ComponentVillage
# EntityVillager - minmax lists
public tv.a(Labg;ILjava/util/Random;F)V #MD:EntityVillager/func_70948_a #addBuy
public tv.b(Labg;ILjava/util/Random;F)V #MD:EntityVillager/func_70949_b #addSell
public tv.bB #FD:EntityVillager/field_70958_bB
public tv.bC #FD:EntityVillager/field_70960_bC
# GuiButtonMerchant
public axn #CL:GuiButtonMerchant
protected aun.a #FD:GuiYesNo/field_73942_a #guiScreen
# Minecraft
public atm.C #FD:Minecraft/field_71425_J #running
public atm.M #FD:Minecraft/field_71446_o # textureManager
+1922 -1906
View File
File diff suppressed because it is too large. Load diff
+7383 -2273
View File
File diff suppressed because it is too large. Load diff
+18604 -17976
View File
File diff suppressed because it is too large. Load diff
+13 -13
View File
@@ -34,12 +34,12 @@ ReobfClientSrg = %(DirTemp)s/client_ro_srg.srg
ReobfServerSrg = %(DirTemp)s/server_ro_srg.srg
[JAR]
DirNatives = %(DirJars)s/versions/1.6/natives
Json = %(DirJars)s/versions/1.6/1.6.json
Client = %(DirJars)s/versions/1.6/1.6.jar
Server = %(DirJars)s/minecraft_server.1.6.jar
MD5Client = 6a64a2136e3a3fe4d29b0a0df30b25fc
MD5Server = 7c03305c8bf97a8e8f3cdb147fc90607
DirNatives = %(DirJars)s/bin/natives
Client = %(DirJars)s/bin/minecraft.jar
Server = %(DirJars)s/minecraft_server.jar
LWJGL = %(DirJars)s/bin/jinput.jar,%(DirJars)s/bin/lwjgl.jar,%(DirJars)s/bin/lwjgl_util.jar
MD5Client = 2e5044f5359e82245551167a237f3167
MD5Server = ba3145656b1480122bd8759cecd7b7a1
[RETROGUARD]
Location = %(DirRuntime)s/bin/retroguard.jar
@@ -79,7 +79,7 @@ BinClientTemp = %(DirTempBin)s/minecraft
BinServerTemp = %(DirTempBin)s/minecraft_server
SrcClient = %(DirSrc)s/minecraft
SrcServer = %(DirSrc)s/minecraft_server
TestClient = net/minecraft/client/Minecraft
TestClient = net/minecraft/client/main/Main
TestServer = net/minecraft/server/MinecraftServer
[PATCHES]
@@ -96,8 +96,8 @@ BinClient = %(DirBin)s/minecraft
BinServer = %(DirBin)s/minecraft_server
LogClient = %(DirLogs)s/client_compile.log
LogServer = %(DirLogs)s/server_compile.log
ClassPathClient = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/versions/1.6/1.6.jar
ClassPathServer = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/minecraft_server.1.6.jar
ClassPathClient =
ClassPathServer =
ClientFixes = %(DirConf)s/patches
FixStart = Start
IgnorePkg = paulscode,com,isom,ibxm,de/matthiasmann/twl,org,javax/xml,javax/ws,argo
@@ -127,8 +127,8 @@ LogFile = %(DirLogs)s/mcp.log
LogFileErr = %(DirLogs)s/mcperr.log
UpdateUrl =
IgnoreUpdate = %(DirBin)s,%(DirLib)s,%(DirLogs)s,%(DirModSrc)s,%(DirReobf)s,%(DirSrc)s,%(DirTemp)s,%(DirEclipse)s/Client/bin,%(DirEclipse)s/Server/bin,%(DirJars)s/world,%(DirJars)s/saves,%(DirJars)s/resources
RGIndex = 130000
ParamIndex = 30000
RGIndex = 143000
ParamIndex = 43000
[ASTYLE]
AstyleConfig = %(DirConf)s/astyle.cfg
@@ -159,5 +159,5 @@ CmdFernflower = %s -Xmx512M -jar %s -din=0 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir
CmdExceptor = %s -jar %s {input} {output} {conf} {log}
CmdRecomp = %s -encoding UTF-8 -Xlint:-options -deprecation -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
CmdRecompScala = %s -encoding UTF-8 -deprecation -target:jvm-1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
CmdStartSrv = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" net.minecraft.server.MinecraftServer
CmdStartClt = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} Start
CmdStartSrv = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" cpw.mods.fml.relauncher.ServerLaunchWrapper {extraargs}
CmdStartClt = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} net.minecraft.launchwrapper.Launch --tweakClass cpw.mods.fml.common.launcher.FMLTweaker --version FML_DEV {extraargs}
+1704 -1527
View File
File diff suppressed because it is too large. Load diff
-8820
View File
File diff suppressed because it is too large. Load diff
+28 -16
View File
@@ -151,6 +151,7 @@ CallableTexturePack,net/minecraft/client
CallableType2,net/minecraft/client
CallableUpdatingScreenName,net/minecraft/client
Minecraft,net/minecraft/client
MinecraftINNER13,net/minecraft/client
StatStringFormatKeyInv,net/minecraft/client
ThreadClientSleep,net/minecraft/client
ScheduledSound,net/minecraft/client/audio
@@ -164,7 +165,6 @@ AbstractClientPlayer,net/minecraft/client/entity
EntityClientPlayerMP,net/minecraft/client/entity
EntityOtherPlayerMP,net/minecraft/client/entity
EntityPlayerSP,net/minecraft/client/entity
RenderMinecartMobSpawner,net/minecraft/client/entity/render
ChatClickData,net/minecraft/client/gui
ChatLine,net/minecraft/client/gui
FontRenderer,net/minecraft/client/gui
@@ -297,13 +297,15 @@ BackupList,net/minecraft/client/mco
ExceptionMcoHttp,net/minecraft/client/mco
ExceptionMcoService,net/minecraft/client/mco
ExceptionRetryCall,net/minecraft/client/mco
GuiScreenClientOutdated,net/minecraft/client/mco
GuiScreenConfirmationType,net/minecraft/client/mco
McoClient,net/minecraft/client/mco
McoServer,net/minecraft/client/mco
McoServerAddress,net/minecraft/client/mco
McoServerList,net/minecraft/client/mco
McoServerListEmptyAnon,net/minecraft/client/mco
McoServerListUpdateThread,net/minecraft/client/mco
McoServerListUpdateThreadComparer,net/minecraft/client/mco
McoServerListUpdateTask,net/minecraft/client/mco
McoServerListUpdateTaskComparator,net/minecraft/client/mco
PendingInvite,net/minecraft/client/mco
PendingInvitesList,net/minecraft/client/mco
Request,net/minecraft/client/mco
@@ -374,6 +376,8 @@ ThreadConnectToServer,net/minecraft/client/multiplayer
ThreadLanServerFind,net/minecraft/client/multiplayer
ThreadLanServerPing,net/minecraft/client/multiplayer
WorldClient,net/minecraft/client/multiplayer
WorldClientINNER3,net/minecraft/client/multiplayer
WorldClientINNER4,net/minecraft/client/multiplayer
EffectRenderer,net/minecraft/client/particle
EntityAuraFX,net/minecraft/client/particle
EntityBreakingFX,net/minecraft/client/particle
@@ -405,10 +409,6 @@ EntitySnowShovelFX,net/minecraft/client/particle
EntitySpellParticleFX,net/minecraft/client/particle
EntitySplashFX,net/minecraft/client/particle
EntitySuspendFX,net/minecraft/client/particle
RenderCaveSpider,net/minecraft/client/render/entity
RenderHorse,net/minecraft/client/render/entity
RenderLeashKnot,net/minecraft/client/render/entity
RendererLivingEntity,net/minecraft/client/render/entity
ActiveRenderInfo,net/minecraft/client/renderer
CallableMouseLocation,net/minecraft/client/renderer
CallableParticlePositionInfo,net/minecraft/client/renderer
@@ -446,6 +446,7 @@ RenderBat,net/minecraft/client/renderer/entity
RenderBiped,net/minecraft/client/renderer/entity
RenderBlaze,net/minecraft/client/renderer/entity
RenderBoat,net/minecraft/client/renderer/entity
RenderCaveSpider,net/minecraft/client/renderer/entity
RenderChicken,net/minecraft/client/renderer/entity
RenderCow,net/minecraft/client/renderer/entity
RenderCreeper,net/minecraft/client/renderer/entity
@@ -458,13 +459,16 @@ RenderFireball,net/minecraft/client/renderer/entity
RenderFish,net/minecraft/client/renderer/entity
RenderGhast,net/minecraft/client/renderer/entity
RenderGiantZombie,net/minecraft/client/renderer/entity
RenderHorse,net/minecraft/client/renderer/entity
RenderIronGolem,net/minecraft/client/renderer/entity
RenderItem,net/minecraft/client/renderer/entity
RenderLeashKnot,net/minecraft/client/renderer/entity
RenderLightningBolt,net/minecraft/client/renderer/entity
RenderLiving,net/minecraft/client/renderer/entity
RenderMagmaCube,net/minecraft/client/renderer/entity
RenderManager,net/minecraft/client/renderer/entity
RenderMinecart,net/minecraft/client/renderer/entity
RenderMinecartMobSpawner,net/minecraft/client/renderer/entity
RenderMooshroom,net/minecraft/client/renderer/entity
RenderOcelot,net/minecraft/client/renderer/entity
RenderPainting,net/minecraft/client/renderer/entity
@@ -486,6 +490,7 @@ RenderWither,net/minecraft/client/renderer/entity
RenderWolf,net/minecraft/client/renderer/entity
RenderXPOrb,net/minecraft/client/renderer/entity
RenderZombie,net/minecraft/client/renderer/entity
RendererLivingEntity,net/minecraft/client/renderer/entity
AbstractTexture,net/minecraft/client/renderer/texture
DynamicTexture,net/minecraft/client/renderer/texture
IconRegister,net/minecraft/client/renderer/texture
@@ -522,7 +527,6 @@ DefaultResourcePack,net/minecraft/client/resources
FallbackResourceManager,net/minecraft/client/resources
FileResourcePack,net/minecraft/client/resources
FolderResourcePack,net/minecraft/client/resources
FolderResourcePackFilter,net/minecraft/client/resources
FoliageColorReloadListener,net/minecraft/client/resources
GrassColorReloadListener,net/minecraft/client/resources
GuiScreenTemporaryResourcePackSelect,net/minecraft/client/resources
@@ -533,7 +537,6 @@ LanguageManager,net/minecraft/client/resources
Locale,net/minecraft/client/resources
ReloadableResourceManager,net/minecraft/client/resources
Resource,net/minecraft/client/resources
ResourceLocation,net/minecraft/client/resources
ResourceManager,net/minecraft/client/resources
ResourceManagerReloadListener,net/minecraft/client/resources
ResourcePack,net/minecraft/client/resources
@@ -581,6 +584,7 @@ CommandHandler,net/minecraft/command
CommandHelp,net/minecraft/command
CommandKill,net/minecraft/command
CommandNotFoundException,net/minecraft/command
CommandPlaySound,net/minecraft/command
CommandServerBan,net/minecraft/command
CommandServerBanIp,net/minecraft/command
CommandServerBanlist,net/minecraft/command
@@ -600,6 +604,7 @@ CommandServerSay,net/minecraft/command
CommandServerStop,net/minecraft/command
CommandServerTp,net/minecraft/command
CommandServerWhitelist,net/minecraft/command
CommandSetPlayerTimeout,net/minecraft/command
CommandSetSpawnpoint,net/minecraft/command
CommandShowSeed,net/minecraft/command
CommandSpreadPlayers,net/minecraft/command
@@ -759,8 +764,8 @@ EntityAILookIdle,net/minecraft/entity/ai
EntityAIMate,net/minecraft/entity/ai
EntityAIMoveIndoors,net/minecraft/entity/ai
EntityAIMoveThroughVillage,net/minecraft/entity/ai
EntityAIMoveTowardsRestriction,net/minecraft/entity/ai
EntityAIMoveTowardsTarget,net/minecraft/entity/ai
EntityAIMoveTwardsRestriction,net/minecraft/entity/ai
EntityAINearestAttackableTarget,net/minecraft/entity/ai
EntityAINearestAttackableTargetSelector,net/minecraft/entity/ai
EntityAINearestAttackableTargetSorter,net/minecraft/entity/ai
@@ -798,10 +803,8 @@ AttributeInstance,net/minecraft/entity/ai/attributes
AttributeModifier,net/minecraft/entity/ai/attributes
BaseAttribute,net/minecraft/entity/ai/attributes
BaseAttributeMap,net/minecraft/entity/ai/attributes
ClientsideAttributeMap,net/minecraft/entity/ai/attributes
ModifiableAttributeInstance,net/minecraft/entity/ai/attributes
RangedAttribute,net/minecraft/entity/ai/attributes
ReadonlyAttributeInstance,net/minecraft/entity/ai/attributes
ServersideAttributeMap,net/minecraft/entity/ai/attributes
BossStatus,net/minecraft/entity/boss
EntityDragon,net/minecraft/entity/boss
@@ -849,6 +852,8 @@ EntitySnowman,net/minecraft/entity/monster
EntitySpider,net/minecraft/entity/monster
EntityWitch,net/minecraft/entity/monster
EntityZombie,net/minecraft/entity/monster
EntityZombieGroupData,net/minecraft/entity/monster
EntityZombieINNER1,net/minecraft/entity/monster
FilterIMob,net/minecraft/entity/monster
IMob,net/minecraft/entity/monster
ContainerSheep,net/minecraft/entity/passive
@@ -886,6 +891,7 @@ EntitySmallFireball,net/minecraft/entity/projectile
EntitySnowball,net/minecraft/entity/projectile
EntityThrowable,net/minecraft/entity/projectile
EntityWitherSkull,net/minecraft/entity/projectile
AnimalChest,net/minecraft/inventory
Container,net/minecraft/inventory
ContainerBeacon,net/minecraft/inventory
ContainerBrewingStand,net/minecraft/inventory
@@ -894,6 +900,9 @@ ContainerDispenser,net/minecraft/inventory
ContainerEnchantment,net/minecraft/inventory
ContainerFurnace,net/minecraft/inventory
ContainerHopper,net/minecraft/inventory
ContainerHorseInventory,net/minecraft/inventory
ContainerHorseInventorySlotArmor,net/minecraft/inventory
ContainerHorseInventorySlotSaddle,net/minecraft/inventory
ContainerMerchant,net/minecraft/inventory
ContainerPlayer,net/minecraft/inventory
ContainerRepair,net/minecraft/inventory
@@ -920,10 +929,6 @@ SlotEnchantment,net/minecraft/inventory
SlotEnchantmentTable,net/minecraft/inventory
SlotFurnace,net/minecraft/inventory
SlotMerchantResult,net/minecraft/inventory
AnimalChest,net/minecraft/inventroy
ContainerHorseInventory,net/minecraft/inventroy
ContainerHorseInventorySlotArmor,net/minecraft/inventroy
ContainerHorseInventorySlotSaddle,net/minecraft/inventroy
BehaviorDispenseArmor,net/minecraft/item
BehaviorDispenseMinecart,net/minecraft/item
EnumAction,net/minecraft/item
@@ -1066,6 +1071,7 @@ Packet12PlayerLook,net/minecraft/network/packet
Packet130UpdateSign,net/minecraft/network/packet
Packet131MapData,net/minecraft/network/packet
Packet132TileEntityData,net/minecraft/network/packet
Packet133TileEditorOpen,net/minecraft/network/packet
Packet13PlayerLookMove,net/minecraft/network/packet
Packet14BlockDig,net/minecraft/network/packet
Packet15Place,net/minecraft/network/packet
@@ -1113,6 +1119,7 @@ Packet41EntityEffect,net/minecraft/network/packet
Packet42RemoveEntityEffect,net/minecraft/network/packet
Packet43Experience,net/minecraft/network/packet
Packet44UpdateAttributes,net/minecraft/network/packet
Packet44UpdateAttributesSnapshot,net/minecraft/network/packet
Packet4UpdateTime,net/minecraft/network/packet
Packet51MapChunk,net/minecraft/network/packet
Packet51MapChunkData,net/minecraft/network/packet
@@ -1171,6 +1178,7 @@ ScoreboardSaveData,net/minecraft/scoreboard
ServerCommandScoreboard,net/minecraft/scoreboard
ServerCommandTestFor,net/minecraft/scoreboard
ServerScoreboard,net/minecraft/scoreboard
Team,net/minecraft/scoreboard
CallableIsServerModded,net/minecraft/server
CallableServerMemoryStats,net/minecraft/server
CallableServerProfiler,net/minecraft/server
@@ -1290,6 +1298,7 @@ MovementInput,net/minecraft/util
MovementInputFromOptions,net/minecraft/util
MovingObjectPosition,net/minecraft/util
ReportedException,net/minecraft/util
ResourceLocation,net/minecraft/util
ScreenShotHelper,net/minecraft/util
Session,net/minecraft/util
StatCollector,net/minecraft/util
@@ -1474,6 +1483,7 @@ ComponentNetherBridgeThrone,net/minecraft/world/gen/structure
ComponentScatteredFeature,net/minecraft/world/gen/structure
ComponentScatteredFeatureDesertPyramid,net/minecraft/world/gen/structure
ComponentScatteredFeatureJunglePyramid,net/minecraft/world/gen/structure
ComponentScatteredFeaturePieces,net/minecraft/world/gen/structure
ComponentScatteredFeaturePieces2,net/minecraft/world/gen/structure
ComponentScatteredFeatureSwampHut,net/minecraft/world/gen/structure
ComponentStronghold,net/minecraft/world/gen/structure
@@ -1511,6 +1521,8 @@ MapGenMineshaft,net/minecraft/world/gen/structure
MapGenNetherBridge,net/minecraft/world/gen/structure
MapGenStronghold,net/minecraft/world/gen/structure
MapGenStructure,net/minecraft/world/gen/structure
MapGenStructureData,net/minecraft/world/gen/structure
MapGenStructureIO,net/minecraft/world/gen/structure
MapGenVillage,net/minecraft/world/gen/structure
StructureBoundingBox,net/minecraft/world/gen/structure
StructureComponent,net/minecraft/world/gen/structure
1 class package
151 CallableType2 net/minecraft/client
152 CallableUpdatingScreenName net/minecraft/client
153 Minecraft net/minecraft/client
154 MinecraftINNER13 net/minecraft/client
155 StatStringFormatKeyInv net/minecraft/client
156 ThreadClientSleep net/minecraft/client
157 ScheduledSound net/minecraft/client/audio
165 EntityClientPlayerMP net/minecraft/client/entity
166 EntityOtherPlayerMP net/minecraft/client/entity
167 EntityPlayerSP net/minecraft/client/entity
RenderMinecartMobSpawner net/minecraft/client/entity/render
168 ChatClickData net/minecraft/client/gui
169 ChatLine net/minecraft/client/gui
170 FontRenderer net/minecraft/client/gui
297 ExceptionMcoHttp net/minecraft/client/mco
298 ExceptionMcoService net/minecraft/client/mco
299 ExceptionRetryCall net/minecraft/client/mco
300 GuiScreenClientOutdated net/minecraft/client/mco
301 GuiScreenConfirmationType net/minecraft/client/mco
302 McoClient net/minecraft/client/mco
303 McoServer net/minecraft/client/mco
304 McoServerAddress net/minecraft/client/mco
305 McoServerList net/minecraft/client/mco
306 McoServerListEmptyAnon net/minecraft/client/mco
307 McoServerListUpdateThread McoServerListUpdateTask net/minecraft/client/mco
308 McoServerListUpdateThreadComparer McoServerListUpdateTaskComparator net/minecraft/client/mco
309 PendingInvite net/minecraft/client/mco
310 PendingInvitesList net/minecraft/client/mco
311 Request net/minecraft/client/mco
376 ThreadLanServerFind net/minecraft/client/multiplayer
377 ThreadLanServerPing net/minecraft/client/multiplayer
378 WorldClient net/minecraft/client/multiplayer
379 WorldClientINNER3 net/minecraft/client/multiplayer
380 WorldClientINNER4 net/minecraft/client/multiplayer
381 EffectRenderer net/minecraft/client/particle
382 EntityAuraFX net/minecraft/client/particle
383 EntityBreakingFX net/minecraft/client/particle
409 EntitySpellParticleFX net/minecraft/client/particle
410 EntitySplashFX net/minecraft/client/particle
411 EntitySuspendFX net/minecraft/client/particle
RenderCaveSpider net/minecraft/client/render/entity
RenderHorse net/minecraft/client/render/entity
RenderLeashKnot net/minecraft/client/render/entity
RendererLivingEntity net/minecraft/client/render/entity
412 ActiveRenderInfo net/minecraft/client/renderer
413 CallableMouseLocation net/minecraft/client/renderer
414 CallableParticlePositionInfo net/minecraft/client/renderer
446 RenderBiped net/minecraft/client/renderer/entity
447 RenderBlaze net/minecraft/client/renderer/entity
448 RenderBoat net/minecraft/client/renderer/entity
449 RenderCaveSpider net/minecraft/client/renderer/entity
450 RenderChicken net/minecraft/client/renderer/entity
451 RenderCow net/minecraft/client/renderer/entity
452 RenderCreeper net/minecraft/client/renderer/entity
459 RenderFish net/minecraft/client/renderer/entity
460 RenderGhast net/minecraft/client/renderer/entity
461 RenderGiantZombie net/minecraft/client/renderer/entity
462 RenderHorse net/minecraft/client/renderer/entity
463 RenderIronGolem net/minecraft/client/renderer/entity
464 RenderItem net/minecraft/client/renderer/entity
465 RenderLeashKnot net/minecraft/client/renderer/entity
466 RenderLightningBolt net/minecraft/client/renderer/entity
467 RenderLiving net/minecraft/client/renderer/entity
468 RenderMagmaCube net/minecraft/client/renderer/entity
469 RenderManager net/minecraft/client/renderer/entity
470 RenderMinecart net/minecraft/client/renderer/entity
471 RenderMinecartMobSpawner net/minecraft/client/renderer/entity
472 RenderMooshroom net/minecraft/client/renderer/entity
473 RenderOcelot net/minecraft/client/renderer/entity
474 RenderPainting net/minecraft/client/renderer/entity
490 RenderWolf net/minecraft/client/renderer/entity
491 RenderXPOrb net/minecraft/client/renderer/entity
492 RenderZombie net/minecraft/client/renderer/entity
493 RendererLivingEntity net/minecraft/client/renderer/entity
494 AbstractTexture net/minecraft/client/renderer/texture
495 DynamicTexture net/minecraft/client/renderer/texture
496 IconRegister net/minecraft/client/renderer/texture
527 FallbackResourceManager net/minecraft/client/resources
528 FileResourcePack net/minecraft/client/resources
529 FolderResourcePack net/minecraft/client/resources
FolderResourcePackFilter net/minecraft/client/resources
530 FoliageColorReloadListener net/minecraft/client/resources
531 GrassColorReloadListener net/minecraft/client/resources
532 GuiScreenTemporaryResourcePackSelect net/minecraft/client/resources
537 Locale net/minecraft/client/resources
538 ReloadableResourceManager net/minecraft/client/resources
539 Resource net/minecraft/client/resources
ResourceLocation net/minecraft/client/resources
540 ResourceManager net/minecraft/client/resources
541 ResourceManagerReloadListener net/minecraft/client/resources
542 ResourcePack net/minecraft/client/resources
584 CommandHelp net/minecraft/command
585 CommandKill net/minecraft/command
586 CommandNotFoundException net/minecraft/command
587 CommandPlaySound net/minecraft/command
588 CommandServerBan net/minecraft/command
589 CommandServerBanIp net/minecraft/command
590 CommandServerBanlist net/minecraft/command
604 CommandServerStop net/minecraft/command
605 CommandServerTp net/minecraft/command
606 CommandServerWhitelist net/minecraft/command
607 CommandSetPlayerTimeout net/minecraft/command
608 CommandSetSpawnpoint net/minecraft/command
609 CommandShowSeed net/minecraft/command
610 CommandSpreadPlayers net/minecraft/command
764 EntityAIMate net/minecraft/entity/ai
765 EntityAIMoveIndoors net/minecraft/entity/ai
766 EntityAIMoveThroughVillage net/minecraft/entity/ai
767 EntityAIMoveTowardsRestriction net/minecraft/entity/ai
768 EntityAIMoveTowardsTarget net/minecraft/entity/ai
EntityAIMoveTwardsRestriction net/minecraft/entity/ai
769 EntityAINearestAttackableTarget net/minecraft/entity/ai
770 EntityAINearestAttackableTargetSelector net/minecraft/entity/ai
771 EntityAINearestAttackableTargetSorter net/minecraft/entity/ai
803 AttributeModifier net/minecraft/entity/ai/attributes
804 BaseAttribute net/minecraft/entity/ai/attributes
805 BaseAttributeMap net/minecraft/entity/ai/attributes
ClientsideAttributeMap net/minecraft/entity/ai/attributes
806 ModifiableAttributeInstance net/minecraft/entity/ai/attributes
807 RangedAttribute net/minecraft/entity/ai/attributes
ReadonlyAttributeInstance net/minecraft/entity/ai/attributes
808 ServersideAttributeMap net/minecraft/entity/ai/attributes
809 BossStatus net/minecraft/entity/boss
810 EntityDragon net/minecraft/entity/boss
852 EntitySpider net/minecraft/entity/monster
853 EntityWitch net/minecraft/entity/monster
854 EntityZombie net/minecraft/entity/monster
855 EntityZombieGroupData net/minecraft/entity/monster
856 EntityZombieINNER1 net/minecraft/entity/monster
857 FilterIMob net/minecraft/entity/monster
858 IMob net/minecraft/entity/monster
859 ContainerSheep net/minecraft/entity/passive
891 EntitySnowball net/minecraft/entity/projectile
892 EntityThrowable net/minecraft/entity/projectile
893 EntityWitherSkull net/minecraft/entity/projectile
894 AnimalChest net/minecraft/inventory
895 Container net/minecraft/inventory
896 ContainerBeacon net/minecraft/inventory
897 ContainerBrewingStand net/minecraft/inventory
900 ContainerEnchantment net/minecraft/inventory
901 ContainerFurnace net/minecraft/inventory
902 ContainerHopper net/minecraft/inventory
903 ContainerHorseInventory net/minecraft/inventory
904 ContainerHorseInventorySlotArmor net/minecraft/inventory
905 ContainerHorseInventorySlotSaddle net/minecraft/inventory
906 ContainerMerchant net/minecraft/inventory
907 ContainerPlayer net/minecraft/inventory
908 ContainerRepair net/minecraft/inventory
929 SlotEnchantmentTable net/minecraft/inventory
930 SlotFurnace net/minecraft/inventory
931 SlotMerchantResult net/minecraft/inventory
AnimalChest net/minecraft/inventroy
ContainerHorseInventory net/minecraft/inventroy
ContainerHorseInventorySlotArmor net/minecraft/inventroy
ContainerHorseInventorySlotSaddle net/minecraft/inventroy
932 BehaviorDispenseArmor net/minecraft/item
933 BehaviorDispenseMinecart net/minecraft/item
934 EnumAction net/minecraft/item
1071 Packet130UpdateSign net/minecraft/network/packet
1072 Packet131MapData net/minecraft/network/packet
1073 Packet132TileEntityData net/minecraft/network/packet
1074 Packet133TileEditorOpen net/minecraft/network/packet
1075 Packet13PlayerLookMove net/minecraft/network/packet
1076 Packet14BlockDig net/minecraft/network/packet
1077 Packet15Place net/minecraft/network/packet
1119 Packet42RemoveEntityEffect net/minecraft/network/packet
1120 Packet43Experience net/minecraft/network/packet
1121 Packet44UpdateAttributes net/minecraft/network/packet
1122 Packet44UpdateAttributesSnapshot net/minecraft/network/packet
1123 Packet4UpdateTime net/minecraft/network/packet
1124 Packet51MapChunk net/minecraft/network/packet
1125 Packet51MapChunkData net/minecraft/network/packet
1178 ServerCommandScoreboard net/minecraft/scoreboard
1179 ServerCommandTestFor net/minecraft/scoreboard
1180 ServerScoreboard net/minecraft/scoreboard
1181 Team net/minecraft/scoreboard
1182 CallableIsServerModded net/minecraft/server
1183 CallableServerMemoryStats net/minecraft/server
1184 CallableServerProfiler net/minecraft/server
1298 MovementInputFromOptions net/minecraft/util
1299 MovingObjectPosition net/minecraft/util
1300 ReportedException net/minecraft/util
1301 ResourceLocation net/minecraft/util
1302 ScreenShotHelper net/minecraft/util
1303 Session net/minecraft/util
1304 StatCollector net/minecraft/util
1483 ComponentScatteredFeature net/minecraft/world/gen/structure
1484 ComponentScatteredFeatureDesertPyramid net/minecraft/world/gen/structure
1485 ComponentScatteredFeatureJunglePyramid net/minecraft/world/gen/structure
1486 ComponentScatteredFeaturePieces net/minecraft/world/gen/structure
1487 ComponentScatteredFeaturePieces2 net/minecraft/world/gen/structure
1488 ComponentScatteredFeatureSwampHut net/minecraft/world/gen/structure
1489 ComponentStronghold net/minecraft/world/gen/structure
1521 MapGenNetherBridge net/minecraft/world/gen/structure
1522 MapGenStronghold net/minecraft/world/gen/structure
1523 MapGenStructure net/minecraft/world/gen/structure
1524 MapGenStructureData net/minecraft/world/gen/structure
1525 MapGenStructureIO net/minecraft/world/gen/structure
1526 MapGenVillage net/minecraft/world/gen/structure
1527 StructureBoundingBox net/minecraft/world/gen/structure
1528 StructureComponent net/minecraft/world/gen/structure
+4170 -3738
View File
File diff suppressed because it is too large. Load diff
+164 -111
View File
@@ -1,95 +1,51 @@
diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net\minecraft\client\Minecraft.java
--- minecraft\net\minecraft\client\Minecraft.java Sat Apr 27 01:53:03 2013
+++ minecraft_patched\net\minecraft\client\Minecraft.java Sat Apr 27 01:55:19 2013
@@ -532,9 +532,8 @@
return;
}
- while(true) {
try {
- if(this.field_71425_J) {
+ while(this.field_71425_J) {
if(this.field_71434_R && this.field_71433_S != null) {
this.func_71377_b(this.field_71433_S);
return;
@@ -552,7 +551,6 @@
this.func_71373_a(new GuiMemoryErrorScreen());
System.gc();
}
- continue;
}
} catch (MinecraftError var12) {
;
@@ -570,8 +568,6 @@
this.func_71405_e();
}
- return;
- }
}
private void func_71411_J() {
diff -r -U 3 minecraft\net\minecraft\src\CallableSuspiciousClasses.java minecraft_patched\net\minecraft\src\CallableSuspiciousClasses.java
--- minecraft\net\minecraft\src\CallableSuspiciousClasses.java Sat Apr 27 01:53:04 2013
+++ minecraft_patched\net\minecraft\src\CallableSuspiciousClasses.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\CallableSuspiciousClasses.java Tue Sep 17 13:58:48 2013
+++ minecraft_patched\net\minecraft\src\CallableSuspiciousClasses.java Tue Sep 17 14:01:01 2013
@@ -21,9 +21,14 @@
public String func_85085_a() {
public String func_85085_a() throws SecurityException, NoSuchFieldException, IllegalAccessException, IllegalArgumentException {
StringBuilder var1 = new StringBuilder();
- Field var2 = ClassLoader.class.getDeclaredField("classes");
- var2.setAccessible(true);
+ ArrayList var3;
+ try {
Field var2 = ClassLoader.class.getDeclaredField("classes");
var2.setAccessible(true);
- ArrayList var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ ArrayList var3;
+ try {
+ Field var2 = ClassLoader.class.getDeclaredField("classes");
+ var2.setAccessible(true);
+ var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ } catch(Exception ex) {
+ return "";
+ }
+ var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ } catch(Exception ex) {
+ return "";
+ }
boolean var4 = true;
boolean var5 = !CrashReport.class.getCanonicalName().equals("net.minecraft.CrashReport");
HashMap var6 = new HashMap();
diff -r -U 3 minecraft\net\minecraft\src\CodecMus.java minecraft_patched\net\minecraft\src\CodecMus.java
--- minecraft\net\minecraft\src\CodecMus.java Sat Apr 27 01:53:04 2013
+++ minecraft_patched\net\minecraft\src\CodecMus.java Sat Apr 27 01:55:19 2013
@@ -1,5 +1,6 @@
package net.minecraft.src;
@@ -98,6 +103,10 @@
+import java.io.IOException;
import java.io.InputStream;
import net.minecraft.src.MusInputStream;
import paulscode.sound.codecs.CodecJOrbis;
@@ -7,6 +8,10 @@
public class CodecMus extends CodecJOrbis {
protected InputStream openInputStream() {
- return new MusInputStream(this, this.url, this.urlConnection.getInputStream());
+ try {
+ return new MusInputStream(this, this.url, this.urlConnection.getInputStream());
+ } catch (IOException e) {
+ return null;
+ }
// $FF: synthetic method
public Object call() {
+ try {
return this.func_85085_a();
+ } catch(Exception ex) {
+ return null;
+ }
}
}
diff -r -U 3 minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java minecraft_patched\net\minecraft\src\ComponentStrongholdRightTurn.java
--- minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java Sat Apr 27 01:53:04 2013
+++ minecraft_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\ComponentStrongholdRightTurn.java Tue Sep 17 13:58:48 2013
+++ minecraft_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Tue Sep 17 14:01:01 2013
@@ -11,6 +11,10 @@
public class ComponentStrongholdRightTurn extends ComponentStrongholdLeftTurn {
+ public ComponentStrongholdRightTurn(int p_i3843_1_, Random p_i3843_2_, StructureBoundingBox p_i3843_3_, int p_i3843_4_) {
+ super(p_i3843_1_, p_i3843_2_, p_i3843_3_, p_i3843_4_);
+ public ComponentStrongholdRightTurn(int p_i2074_1_, Random p_i2074_2_, StructureBoundingBox p_i2074_3_, int p_i2074_4_) {
+ super(p_i2074_1_, p_i2074_2_, p_i2074_3_, p_i2074_4_);
+ }
+
public void func_74861_a(StructureComponent p_74861_1_, List p_74861_2_, Random p_74861_3_) {
if(this.field_74885_f != 2 && this.field_74885_f != 3) {
this.func_74989_b((ComponentStrongholdStairs2)p_74861_1_, p_74861_2_, p_74861_3_, 1, 1);
diff -r -U 3 minecraft\net\minecraft\src\DedicatedServer.java minecraft_patched\net\minecraft\src\DedicatedServer.java
--- minecraft\net\minecraft\src\DedicatedServer.java Sat Apr 27 01:53:04 2013
+++ minecraft_patched\net\minecraft\src\DedicatedServer.java Sat Apr 27 01:55:19 2013
@@ -207,7 +207,7 @@
--- minecraft\net\minecraft\src\DedicatedServer.java Tue Sep 17 13:58:48 2013
+++ minecraft_patched\net\minecraft\src\DedicatedServer.java Tue Sep 17 14:01:01 2013
@@ -208,7 +208,7 @@
System.exit(0);
}
@@ -99,21 +55,55 @@ diff -r -U 3 minecraft\net\minecraft\src\DedicatedServer.java minecraft_patched\
this.func_71333_ah();
}
diff -r -U 3 minecraft\net\minecraft\src\EnumChatFormatting.java minecraft_patched\net\minecraft\src\EnumChatFormatting.java
--- minecraft\net\minecraft\src\EnumChatFormatting.java Sat Apr 27 01:53:05 2013
+++ minecraft_patched\net\minecraft\src\EnumChatFormatting.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\EnumChatFormatting.java Tue Sep 17 13:58:49 2013
+++ minecraft_patched\net\minecraft\src\EnumChatFormatting.java Tue Sep 17 14:01:01 2013
@@ -38,7 +38,7 @@
private final String field_96304_B;
private EnumChatFormatting(char p_i10000_3_) {
- this(p_i10000_1_, p_i10000_2_, p_i10000_3_, false);
+ this(p_i10000_3_, false);
private EnumChatFormatting(char p_i1336_3_) {
- this(p_i1336_1_, p_i1336_2_, p_i1336_3_, false);
+ this(p_i1336_3_, false);
}
private EnumChatFormatting(char p_i10001_3_, boolean p_i10001_4_) {
private EnumChatFormatting(char p_i1337_3_, boolean p_i1337_4_) {
diff -r -U 3 minecraft\net\minecraft\src\FileResourcePack.java minecraft_patched\net\minecraft\src\FileResourcePack.java
--- minecraft\net\minecraft\src\FileResourcePack.java Tue Sep 17 13:58:49 2013
+++ minecraft_patched\net\minecraft\src\FileResourcePack.java Tue Sep 17 14:01:01 2013
@@ -84,12 +84,18 @@
protected void finalize() {
this.close();
+ try {
super.finalize();
+ } catch(Throwable t) {
+ }
}
public void close() {
if(this.field_110600_d != null) {
+ try {
this.field_110600_d.close();
+ } catch(Exception ex) {
+ }
this.field_110600_d = null;
}
diff -r -U 3 minecraft\net\minecraft\src\FolderResourcePack.java minecraft_patched\net\minecraft\src\FolderResourcePack.java
--- minecraft\net\minecraft\src\FolderResourcePack.java Tue Sep 17 13:58:49 2013
+++ minecraft_patched\net\minecraft\src\FolderResourcePack.java Tue Sep 17 14:01:01 2013
@@ -29,7 +29,7 @@
HashSet var1 = Sets.newHashSet();
File var2 = new File(this.field_110597_b, "assets/");
if(var2.isDirectory()) {
- File[] var3 = var2.listFiles(DirectoryFileFilter.DIRECTORY);
+ File[] var3 = var2.listFiles((java.io.FileFilter)DirectoryFileFilter.DIRECTORY);
int var4 = var3.length;
for(int var5 = 0; var5 < var4; ++var5) {
diff -r -U 3 minecraft\net\minecraft\src\FontRenderer.java minecraft_patched\net\minecraft\src\FontRenderer.java
--- minecraft\net\minecraft\src\FontRenderer.java Sat Apr 27 01:53:05 2013
+++ minecraft_patched\net\minecraft\src\FontRenderer.java Sat Apr 27 01:55:19 2013
@@ -621,8 +621,6 @@
--- minecraft\net\minecraft\src\FontRenderer.java Tue Sep 17 13:58:49 2013
+++ minecraft_patched\net\minecraft\src\FontRenderer.java Tue Sep 17 14:01:01 2013
@@ -630,8 +630,6 @@
case 10:
--var5;
break;
@@ -122,19 +112,19 @@ diff -r -U 3 minecraft\net\minecraft\src\FontRenderer.java minecraft_patched\net
case 167:
if(var5 < var3 - 1) {
++var5;
@@ -636,6 +634,8 @@
@@ -645,6 +643,8 @@
}
}
break;
+ case 32:
+ var6 = var5;
+ var6 = var5;
default:
var4 += this.func_78263_a(var8);
if(var7) {
diff -r -U 3 minecraft\net\minecraft\src\IntegratedServer.java minecraft_patched\net\minecraft\src\IntegratedServer.java
--- minecraft\net\minecraft\src\IntegratedServer.java Sat Apr 27 01:53:05 2013
+++ minecraft_patched\net\minecraft\src\IntegratedServer.java Sat Apr 27 01:55:19 2013
@@ -101,7 +101,7 @@
--- minecraft\net\minecraft\src\IntegratedServer.java Tue Sep 17 13:58:50 2013
+++ minecraft_patched\net\minecraft\src\IntegratedServer.java Tue Sep 17 14:01:01 2013
@@ -103,7 +103,7 @@
return true;
}
@@ -143,9 +133,60 @@ diff -r -U 3 minecraft\net\minecraft\src\IntegratedServer.java minecraft_patched
boolean var1 = this.field_71348_o;
this.field_71348_o = this.field_71347_n.func_71752_f();
if(!var1 && this.field_71348_o) {
diff -r -U 3 minecraft\net\minecraft\src\Minecraft.java minecraft_patched\net\minecraft\src\Minecraft.java
--- minecraft\net\minecraft\src\Minecraft.java Tue Sep 17 13:58:50 2013
+++ minecraft_patched\net\minecraft\src\Minecraft.java Tue Sep 17 14:01:01 2013
@@ -604,8 +604,8 @@
return;
}
- while(true) {
- try {
+ try {
+ while(this.field_71425_J) {
if(this.field_71425_J) {
if(this.field_71434_R && this.field_71433_S != null) {
this.func_71377_b(this.field_71433_S);
@@ -626,23 +626,20 @@
}
continue;
}
- } catch (MinecraftError var12) {
- ;
- } catch (ReportedException var13) {
- this.func_71396_d(var13.func_71575_a());
- this.func_71398_f();
- var13.printStackTrace();
- this.func_71377_b(var13.func_71575_a());
- } catch (Throwable var14) {
- var2 = this.func_71396_d(new CrashReport("Unexpected error", var14));
- this.func_71398_f();
- var14.printStackTrace();
- this.func_71377_b(var2);
- } finally {
- this.func_71405_e();
}
-
- return;
+ } catch (MinecraftError var12) {
+ } catch (ReportedException var13) {
+ this.func_71396_d(var13.func_71575_a());
+ this.func_71398_f();
+ var13.printStackTrace();
+ this.func_71377_b(var13.func_71575_a());
+ } catch (Throwable var14) {
+ var2 = this.func_71396_d(new CrashReport("Unexpected error", var14));
+ this.func_71398_f();
+ var14.printStackTrace();
+ this.func_71377_b(var2);
+ } finally {
+ this.func_71405_e();
}
}
diff -r -U 3 minecraft\net\minecraft\src\RConThreadClient.java minecraft_patched\net\minecraft\src\RConThreadClient.java
--- minecraft\net\minecraft\src\RConThreadClient.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\RConThreadClient.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\RConThreadClient.java Tue Sep 17 13:58:51 2013
+++ minecraft_patched\net\minecraft\src\RConThreadClient.java Tue Sep 17 14:01:01 2013
@@ -32,8 +32,8 @@
}
@@ -173,22 +214,21 @@ diff -r -U 3 minecraft\net\minecraft\src\RConThreadClient.java minecraft_patched
}
-
- return;
- }
+ } catch (SocketTimeoutException var17) {
+ } catch (IOException var18) {
+ } catch (Exception var19) {
+ System.out.println(var19);
+ } finally {
+ this.func_72653_g();
}
-
+ } catch (SocketTimeoutException var17) {
+ } catch (IOException var18) {
+ } catch (Exception var19) {
+ System.out.println(var19);
+ } finally {
+ this.func_72653_g();
+ }
}
private void func_72654_a(int p_72654_1_, int p_72654_2_, String p_72654_3_) throws IOException {
diff -r -U 3 minecraft\net\minecraft\src\RenderBlocks.java minecraft_patched\net\minecraft\src\RenderBlocks.java
--- minecraft\net\minecraft\src\RenderBlocks.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\RenderBlocks.java Sat Apr 27 01:55:19 2013
@@ -1951,16 +1951,16 @@
--- minecraft\net\minecraft\src\RenderBlocks.java Tue Sep 17 13:58:51 2013
+++ minecraft_patched\net\minecraft\src\RenderBlocks.java Tue Sep 17 14:01:01 2013
@@ -1960,16 +1960,16 @@
float var25 = (float)(p_78589_2_ + 1);
float var26 = (float)(p_78589_4_ + 0);
float var27 = (float)(p_78589_4_ + 1);
@@ -209,7 +249,7 @@ diff -r -U 3 minecraft\net\minecraft\src\RenderBlocks.java minecraft_patched\net
int var29 = 0;
int var30 = 0;
int var31 = 16;
@@ -2006,7 +2006,7 @@
@@ -2016,7 +2016,7 @@
var5.func_78374_a((double)var25, (double)p_78589_3_ + 0.015625D, (double)var26, (double)var9.func_94214_a((double)var31), (double)var9.func_94207_b((double)var30));
var5.func_78374_a((double)var24, (double)p_78589_3_ + 0.015625D, (double)var26, (double)var9.func_94214_a((double)var29), (double)var9.func_94207_b((double)var30));
var5.func_78374_a((double)var24, (double)p_78589_3_ + 0.015625D, (double)var27, (double)var9.func_94214_a((double)var29), (double)var9.func_94207_b((double)var32));
@@ -219,9 +259,9 @@ diff -r -U 3 minecraft\net\minecraft\src\RenderBlocks.java minecraft_patched\net
var5.func_78374_a((double)var25, (double)p_78589_3_ + 0.015625D, (double)var26, (double)var8.func_94212_f(), (double)var8.func_94206_g());
var5.func_78374_a((double)var24, (double)p_78589_3_ + 0.015625D, (double)var26, (double)var8.func_94209_e(), (double)var8.func_94206_g());
diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net\minecraft\src\RenderGlobal.java
--- minecraft\net\minecraft\src\RenderGlobal.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Sat Apr 27 01:55:19 2013
@@ -1449,7 +1449,7 @@
--- minecraft\net\minecraft\src\RenderGlobal.java Tue Sep 17 13:58:51 2013
+++ minecraft_patched\net\minecraft\src\RenderGlobal.java Tue Sep 17 14:01:01 2013
@@ -1445,7 +1445,7 @@
double var15 = this.field_72777_q.field_71451_h.field_70165_t - p_72726_2_;
double var17 = this.field_72777_q.field_71451_h.field_70163_u - p_72726_4_;
double var19 = this.field_72777_q.field_71451_h.field_70161_v - p_72726_6_;
@@ -230,11 +270,26 @@ diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net
if(p_72726_1_.equals("hugeexplosion")) {
this.field_72777_q.field_71452_i.func_78873_a(var21 = new EntityHugeExplodeFX(this.field_72769_h, p_72726_2_, p_72726_4_, p_72726_6_, p_72726_8_, p_72726_10_, p_72726_12_));
} else if(p_72726_1_.equals("largeexplode")) {
diff -r -U 3 minecraft\net\minecraft\src\SoundPoolURLConnection.java minecraft_patched\net\minecraft\src\SoundPoolURLConnection.java
--- minecraft\net\minecraft\src\SoundPoolURLConnection.java Tue Sep 17 13:58:51 2013
+++ minecraft_patched\net\minecraft\src\SoundPoolURLConnection.java Tue Sep 17 14:01:01 2013
@@ -22,7 +22,11 @@
public void connect() {}
public InputStream getInputStream() {
+ try {
return SoundPool.func_110655_a(this.field_110660_a).func_110536_a(this.field_110659_b).func_110527_b();
+ } catch(Exception ex) {
+ return null;
+ }
}
// $FF: synthetic method
diff -r -U 3 minecraft\net\minecraft\src\TcpMasterThread.java minecraft_patched\net\minecraft\src\TcpMasterThread.java
--- minecraft\net\minecraft\src\TcpMasterThread.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\TcpMasterThread.java Sat Apr 27 01:55:19 2013
--- minecraft\net\minecraft\src\TcpMasterThread.java Tue Sep 17 13:58:51 2013
+++ minecraft_patched\net\minecraft\src\TcpMasterThread.java Tue Sep 17 14:01:01 2013
@@ -11,6 +11,7 @@
this.field_74504_a = p_i3285_1_;
this.field_74504_a = p_i1395_1_;
}
+ @SuppressWarnings("deprecation")
@@ -242,15 +297,13 @@ diff -r -U 3 minecraft\net\minecraft\src\TcpMasterThread.java minecraft_patched\
try {
Thread.sleep(5000L);
diff -r -U 3 minecraft\net\minecraft\src\ThreadedFileIOBase.java minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java
--- minecraft\net\minecraft\src\ThreadedFileIOBase.java Sat Apr 27 01:53:07 2013
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Sat Apr 27 01:55:19 2013
@@ -20,7 +20,8 @@
--- minecraft\net\minecraft\src\ThreadedFileIOBase.java Tue Sep 17 13:58:52 2013
+++ minecraft_patched\net\minecraft\src\ThreadedFileIOBase.java Tue Sep 17 14:01:01 2013
@@ -20,6 +20,7 @@
}
public void run() {
- this.func_75736_b();
+ while(true)
+ this.func_75736_b();
+ while(true)
this.func_75736_b();
}
private void func_75736_b() {
+63 -66
View File
@@ -1,42 +1,52 @@
diff -r -U 3 minecraft_server\net\minecraft\src\CallableSuspiciousClasses.java minecraft_server_patched\net\minecraft\src\CallableSuspiciousClasses.java
--- minecraft_server\net\minecraft\src\CallableSuspiciousClasses.java Sat Apr 27 01:54:18 2013
+++ minecraft_server_patched\net\minecraft\src\CallableSuspiciousClasses.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\CallableSuspiciousClasses.java Tue Sep 17 14:00:13 2013
+++ minecraft_server_patched\net\minecraft\src\CallableSuspiciousClasses.java Tue Sep 17 14:01:07 2013
@@ -21,9 +21,14 @@
public String func_85085_a() {
public String func_85085_a() throws SecurityException, NoSuchFieldException, IllegalAccessException, IllegalArgumentException {
StringBuilder var1 = new StringBuilder();
- Field var2 = ClassLoader.class.getDeclaredField("classes");
- var2.setAccessible(true);
+ ArrayList var3;
+ try {
Field var2 = ClassLoader.class.getDeclaredField("classes");
var2.setAccessible(true);
- ArrayList var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ ArrayList var3;
+ try {
+ Field var2 = ClassLoader.class.getDeclaredField("classes");
+ var2.setAccessible(true);
+ var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ } catch(Exception ex) {
+ return "";
+ }
+ var3 = new ArrayList((Vector)var2.get(CrashReport.class.getClassLoader()));
+ } catch(Exception ex) {
+ return "";
+ }
boolean var4 = true;
boolean var5 = !CrashReport.class.getCanonicalName().equals("net.minecraft.CrashReport");
HashMap var6 = new HashMap();
@@ -98,6 +103,10 @@
// $FF: synthetic method
public Object call() {
- return this.func_85085_a();
+ try {
+ return this.func_85085_a();
+ } catch(Exception ex) {
+ return null;
+ }
}
}
diff -r -U 3 minecraft_server\net\minecraft\src\ComponentStrongholdRightTurn.java minecraft_server_patched\net\minecraft\src\ComponentStrongholdRightTurn.java
--- minecraft_server\net\minecraft\src\ComponentStrongholdRightTurn.java Sat Apr 27 01:54:19 2013
+++ minecraft_server_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\ComponentStrongholdRightTurn.java Tue Sep 17 14:00:14 2013
+++ minecraft_server_patched\net\minecraft\src\ComponentStrongholdRightTurn.java Tue Sep 17 14:01:07 2013
@@ -11,6 +11,10 @@
public class ComponentStrongholdRightTurn extends ComponentStrongholdLeftTurn {
+ public ComponentStrongholdRightTurn(int p_i3843_1_, Random p_i3843_2_, StructureBoundingBox p_i3843_3_, int p_i3843_4_) {
+ super(p_i3843_1_, p_i3843_2_, p_i3843_3_, p_i3843_4_);
+ public ComponentStrongholdRightTurn(int p_i2074_1_, Random p_i2074_2_, StructureBoundingBox p_i2074_3_, int p_i2074_4_) {
+ super(p_i2074_1_, p_i2074_2_, p_i2074_3_, p_i2074_4_);
+ }
+
public void func_74861_a(StructureComponent p_74861_1_, List p_74861_2_, Random p_74861_3_) {
if(this.field_74885_f != 2 && this.field_74885_f != 3) {
this.func_74989_b((ComponentStrongholdStairs2)p_74861_1_, p_74861_2_, p_74861_3_, 1, 1);
diff -r -U 3 minecraft_server\net\minecraft\src\DedicatedServer.java minecraft_server_patched\net\minecraft\src\DedicatedServer.java
--- minecraft_server\net\minecraft\src\DedicatedServer.java Sat Apr 27 01:54:19 2013
+++ minecraft_server_patched\net\minecraft\src\DedicatedServer.java Sat Apr 27 01:56:15 2013
@@ -208,7 +208,7 @@
--- minecraft_server\net\minecraft\src\DedicatedServer.java Tue Sep 17 14:00:14 2013
+++ minecraft_server_patched\net\minecraft\src\DedicatedServer.java Tue Sep 17 14:01:07 2013
@@ -209,7 +209,7 @@
System.exit(0);
}
@@ -46,53 +56,43 @@ diff -r -U 3 minecraft_server\net\minecraft\src\DedicatedServer.java minecraft_s
this.func_71333_ah();
}
diff -r -U 3 minecraft_server\net\minecraft\src\EnumChatFormatting.java minecraft_server_patched\net\minecraft\src\EnumChatFormatting.java
--- minecraft_server\net\minecraft\src\EnumChatFormatting.java Sat Apr 27 01:54:20 2013
+++ minecraft_server_patched\net\minecraft\src\EnumChatFormatting.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\EnumChatFormatting.java Tue Sep 17 14:00:14 2013
+++ minecraft_server_patched\net\minecraft\src\EnumChatFormatting.java Tue Sep 17 14:01:07 2013
@@ -38,7 +38,7 @@
private final String field_96304_B;
private EnumChatFormatting(char p_i10000_3_) {
- this(p_i10000_1_, p_i10000_2_, p_i10000_3_, false);
+ this(p_i10000_3_, false);
private EnumChatFormatting(char p_i1336_3_) {
- this(p_i1336_1_, p_i1336_2_, p_i1336_3_, false);
+ this(p_i1336_3_, false);
}
private EnumChatFormatting(char p_i10001_3_, boolean p_i10001_4_) {
private EnumChatFormatting(char p_i1337_3_, boolean p_i1337_4_) {
diff -r -U 3 minecraft_server\net\minecraft\src\MemoryConnection.java minecraft_server_patched\net\minecraft\src\MemoryConnection.java
--- minecraft_server\net\minecraft\src\MemoryConnection.java Sat Apr 27 01:54:20 2013
+++ minecraft_server_patched\net\minecraft\src\MemoryConnection.java Sat Apr 27 01:56:15 2013
@@ -2,6 +2,8 @@
import java.net.InetSocketAddress;
import java.net.SocketAddress;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import net.minecraft.src.ILogAgent;
import net.minecraft.src.INetworkManager;
@@ -11,7 +13,7 @@
--- minecraft_server\net\minecraft\src\MemoryConnection.java Tue Sep 17 14:00:15 2013
+++ minecraft_server_patched\net\minecraft\src\MemoryConnection.java Tue Sep 17 14:01:07 2013
@@ -11,13 +11,18 @@
public class MemoryConnection implements INetworkManager {
private static final SocketAddress field_74444_a = new InetSocketAddress("127.0.0.1", 0);
- private final List field_74442_b;
+ private final List field_74442_b = Collections.synchronizedList(new ArrayList());
+ private final List field_74442_b = java.util.Collections.synchronizedList(new java.util.ArrayList());
private final ILogAgent field_98214_c;
private MemoryConnection field_74443_c;
private NetHandler field_74440_d;
@@ -19,6 +21,11 @@
private boolean field_74441_e;
private String field_74438_f;
private Object[] field_74439_g;
+ public MemoryConnection(ILogAgent p_i11025_1_, NetHandler p_i11025_2_) {
+ this.field_74440_d = p_i11025_2_;
+ this.field_98214_c = p_i11025_1_;
+
+ public MemoryConnection(ILogAgent p_i1392_1_, NetHandler p_i1392_2_) {
+ this.field_74440_d = p_i1392_2_;
+ this.field_98214_c = p_i1392_1_;
+ }
+
public void func_74425_a(NetHandler p_74425_1_) {
this.field_74440_d = p_74425_1_;
}
diff -r -U 3 minecraft_server\net\minecraft\src\RConThreadClient.java minecraft_server_patched\net\minecraft\src\RConThreadClient.java
--- minecraft_server\net\minecraft\src\RConThreadClient.java Sat Apr 27 01:54:20 2013
+++ minecraft_server_patched\net\minecraft\src\RConThreadClient.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\RConThreadClient.java Tue Sep 17 14:00:15 2013
+++ minecraft_server_patched\net\minecraft\src\RConThreadClient.java Tue Sep 17 14:01:07 2013
@@ -32,8 +32,8 @@
}
@@ -120,23 +120,22 @@ diff -r -U 3 minecraft_server\net\minecraft\src\RConThreadClient.java minecraft_
}
-
- return;
- }
+ } catch (SocketTimeoutException var17) {
+ } catch (IOException var18) {
+ } catch (Exception var19) {
+ System.out.println(var19);
+ } finally {
+ this.func_72653_g();
}
-
+ } catch (SocketTimeoutException var17) {
+ } catch (IOException var18) {
+ } catch (Exception var19) {
+ System.out.println(var19);
+ } finally {
+ this.func_72653_g();
+ }
}
private void func_72654_a(int p_72654_1_, int p_72654_2_, String p_72654_3_) throws IOException {
diff -r -U 3 minecraft_server\net\minecraft\src\TcpMasterThread.java minecraft_server_patched\net\minecraft\src\TcpMasterThread.java
--- minecraft_server\net\minecraft\src\TcpMasterThread.java Sat Apr 27 01:54:21 2013
+++ minecraft_server_patched\net\minecraft\src\TcpMasterThread.java Sat Apr 27 01:56:15 2013
--- minecraft_server\net\minecraft\src\TcpMasterThread.java Tue Sep 17 14:00:16 2013
+++ minecraft_server_patched\net\minecraft\src\TcpMasterThread.java Tue Sep 17 14:01:07 2013
@@ -11,6 +11,7 @@
this.field_74504_a = p_i3285_1_;
this.field_74504_a = p_i1395_1_;
}
+ @SuppressWarnings("deprecation")
@@ -144,15 +143,13 @@ diff -r -U 3 minecraft_server\net\minecraft\src\TcpMasterThread.java minecraft_s
try {
Thread.sleep(5000L);
diff -r -U 3 minecraft_server\net\minecraft\src\ThreadedFileIOBase.java minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java
--- minecraft_server\net\minecraft\src\ThreadedFileIOBase.java Sat Apr 27 01:54:21 2013
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Sat Apr 27 01:56:15 2013
@@ -20,7 +20,8 @@
--- minecraft_server\net\minecraft\src\ThreadedFileIOBase.java Tue Sep 17 14:00:16 2013
+++ minecraft_server_patched\net\minecraft\src\ThreadedFileIOBase.java Tue Sep 17 14:01:07 2013
@@ -20,6 +20,7 @@
}
public void run() {
- this.func_75736_b();
+ while(true)
+ this.func_75736_b();
+ while(true)
this.func_75736_b();
}
private void func_75736_b() {
+3 -3
View File
@@ -1,4 +1,4 @@
[VERSION]
MCPVersion = 7.51
ClientVersion = 1.5.2
ServerVersion = 1.5.2
MCPVersion = 8.11
ClientVersion = 1.6.4
ServerVersion = 1.6.4
-24
View File
@@ -1,24 +0,0 @@
import urllib
import zipfile
import sys
import os
from optparse import OptionParser
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('-g', '--gen-conf', action="store_true", dest='gen_conf', help='Generate merged MCP conf folder', default=False)
parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to download/extract MCP to', default=None )
parser.add_option('-f', '--fml-dir', action='store', dest='fml_dir', help='Path to FML install folder', default=None )
options, _ = parser.parse_args()
if options.fml_dir is None or options.mcp_dir is None:
print 'Invalid arguments, must supply mcp folder and fml folder: decompile.py --mcp-dir <MCPFolder> --fml-dir <FMLFolder>'
else:
sys.path.append(os.path.join(options.fml_dir, 'install'))
from fml import decompile_minecraft, setup_mcp, download_mcp
download_mcp(fml_dir=options.fml_dir, mcp_dir=options.mcp_dir)
setup_mcp(options.fml_dir, options.mcp_dir, gen_conf=options.gen_conf)
decompile_minecraft(options.fml_dir, options.mcp_dir)
Binary file not shown.
-2
View File
@@ -1,2 +0,0 @@
default.dev.home=/home/cpw/projects/mcworkspace
default.mcp.home=${default.dev.home}/vanillamcp
-43
View File
@@ -1,43 +0,0 @@
import sys
import os
import subprocess, shlex
mcp_root = os.path.abspath(sys.argv[1])
sys.path.append(os.path.join(mcp_root,"runtime"))
from filehandling.srgshandler import parse_srg
def cmdsplit(args):
if os.sep == '\\':
args = args.replace('\\', '\\\\')
return shlex.split(args)
def main():
list_file = os.path.abspath(sys.argv[2])
with open(list_file, 'w') as fh:
write_changed(fh, os.path.join(mcp_root,"temp","client.md5"), os.path.join(mcp_root,"temp","client_reobf.md5"), 'minecraft')
write_changed(fh, os.path.join(mcp_root,"temp","server.md5"), os.path.join(mcp_root,"temp","server_reobf.md5"), 'minecraft_server')
def write_changed(fh, pre, post, name):
if not os.path.isfile(pre) or not os.path.isfile(post):
print 'MD5s Missing! Can not extract %s changed files' % name
return
cmd = 'diff --unchanged-group-format='' --old-group-format='' --new-group-format=\'%%>\' --changed-group-format=\'%%>\' %s %s' % (pre, post)
process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, bufsize=-1)
difflist,_= process.communicate()
srg_data = parse_srg(os.path.join(mcp_root,"temp","client_rg.srg"))
classes = {}
for row in srg_data['CL']:
classes[row['deobf_name']] = row['obf_name']
for diff in difflist.splitlines():
diffrow=diff.strip().split()
clazz=diffrow[0]
if clazz in classes:
clazz=classes[clazz]
if clazz.startswith("net/minecraft/src/"):
clazz=clazz[len("net/minecraft/src/"):]
fh.write("%s/%s.class\n" %(name,clazz))
if __name__ == '__main__':
main()
-76
View File
@@ -1,76 +0,0 @@
import sys
import os
import commands
import fnmatch
import re
import subprocess, shlex
mcp_home = sys.argv[1]
mcp_dir = os.path.abspath(mcp_home)
print(mcp_dir)
sys.path.append(mcp_dir)
from runtime.commands import Commands
Commands._version_config = os.path.join(mcp_dir,Commands._version_config)
def cmdsplit(args):
if os.sep == '\\':
args = args.replace('\\', '\\\\')
return shlex.split(args)
def cleanDirs(path):
if not os.path.isdir(path):
return
files = os.listdir(path)
if len(files):
for f in files:
fullpath = os.path.join(path, f)
if os.path.isdir(fullpath):
cleanDirs(fullpath)
files = os.listdir(path)
if len(files) == 0:
os.rmdir(path)
def main():
print("Obtaining version information from git")
cmd = "git describe --long --match='[^(jenkins)]*'"
try:
process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=-1)
vers, _ = process.communicate()
except OSError:
print("Git not found")
vers="v1.0-0-deadbeef"
(major,minor,rev,githash)=re.match("v(\d+).(\d+)-(\d+)-(.*)",vers).groups()
(mcpversion,mcclientversion,mcserverversion) = re.match("[.\w]+ \(data: ([.\w]+), client: ([.\w.]+), server: ([.\w.]+)\)",Commands.fullversion()).groups()
if os.getenv("GIT_BRANCH") is None:
cmd = "git rev-parse --abbrev-ref HEAD"
try:
process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=-1)
branch, _ = process.communicate()
branch = branch.strip()
except OSError:
print("Git not found")
branch="master"
else:
branch=os.getenv("GIT_BRANCH").rpartition('/')[2]
if branch == 'HEAD':
branch = "master"
with open("fmlversion.properties","w") as f:
f.write("%s=%s\n" %("fmlbuild.major.number",major))
f.write("%s=%s\n" %("fmlbuild.minor.number",minor))
f.write("%s=%s\n" %("fmlbuild.revision.number",rev))
f.write("%s=%s\n" %("fmlbuild.githash",githash))
f.write("%s=%s\n" %("fmlbuild.mcpversion",mcpversion))
f.write("%s=%s\n" %("fmlbuild.mcversion",mcclientversion))
f.write("%s=%s\n" %("fmlbuild.branch",branch))
print("Version information: FML %s.%s.%s (%s) using MCP %s for minecraft %s" % (major, minor, rev, branch, mcpversion, mcclientversion))
if __name__ == '__main__':
main()
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
#Tue Oct 29 18:00:54 CDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
Vendored
+164
View File
@@ -0,0 +1,164 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
Vendored
+90
View File
@@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
git update-index --assume-unchanged eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/0.tree
-1
View File
@@ -1 +0,0 @@
/*.pyc
+22
View File
@@ -0,0 +1,22 @@
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT'
}
}
apply plugin: '${name}'
version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"
minecraft {
version = "${version}"
}
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/Minecraft/src/Start.java"/>
<listEntry value="/Minecraft/lib/net/minecraft/launchwrapper/1.3/launchwrapper-1.3.jar"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="Start"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.minecraft.launchwrapper.Launch"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--version 1.6 --tweakClass cpw.mods.fml.common.launcher.FMLTweaker"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Minecraft"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xincgc -Xmx1024M -Xms1024M"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:Minecraft/jars}"/>
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/Minecraft/common/net/minecraft/server/MinecraftServer.java"/>
<listEntry value="/Minecraft/src/net/minecraft/server/MinecraftServer.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.minecraft.server.MinecraftServer"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="cpw.mods.fml.relauncher.ServerLaunchWrapper"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Minecraft"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xincgc -Xmx1024M -Xms1024M"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:Minecraft/jars}"/>
-37
View File
@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="jars/libraries/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar" sourcepath="jars/libraries/org/ow2/asm/asm-all/4.1/asm-all-4.1-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/minecraft/launchwrapper/1.3/launchwrapper-1.3.jar"/>
<classpathentry kind="lib" path="jars/versions/1.6/1.6.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar" sourcepath="jars/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar"/>
<classpathentry kind="lib" path="jars/libraries/argo/argo/2.25_fixed/argo-2.25_fixed.jar" sourcepath="jars/libraries/net/sourceforge/argo/argo/2.25/argo-2.25-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/org/bouncycastle/bcprov-jdk15on/1.47/bcprov-jdk15on-1.47.jar" sourcepath="jars/libraries/org/bouncycastle/bcprov-jdk15on/1.47/bcprov-jdk15on-1.47-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/google/guava/guava/14.0/guava-14.0.jar" sourcepath="jars/libraries/com/google/guava/guava/14.0/guava-14.0-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar" sourcepath="jars/libraries/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/commons-io/commons-io/2.4/commons-io-2.4.jar" sourcepath="jars/libraries/commons-io/commons-io/2.4/commons-io-2.4-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar" sourcepath="jars/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar" sourcepath="jars/libraries/com/google/code/gson/gson/2.2.2/gson-2.2.2-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar" sourcepath="jars/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5-sources.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/libraries/org/lwjgl/lwjgl/lwjgl/2.9.0/lwjgl-2.9.0.jar" sourcepath="jars/libraries/org/lwjgl/lwjgl/lwjgl/2.9.0/lwjgl-2.9.0-sources.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.0/lwjgl_util-2.9.0.jar" sourcepath="jars/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.0/lwjgl_util-2.9.0-sources.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/natives"/>
</attributes>
</classpathentry>
</classpath>
-92
View File
@@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Minecraft</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<linkedResources>
<link>
<name>jars</name>
<type>2</type>
<locationURI>MCP_LOC/jars</locationURI>
</link>
<link>
<name>src</name>
<type>2</type>
<locationURI>MCP_LOC/src/minecraft</locationURI>
</link>
<link>
<name>lib</name>
<type>2</type>
<locationURI>MCP_LOC/lib</locationURI>
</link>
<link>
<name>natives</name>
<type>2</type>
<locationURI>MCP_LOC/jars/libraries/natives</locationURI>
</link>
</linkedResources>
<filteredResources>
<filter>
<id>1372126392133</id>
<name>jars</name>
<type>13</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-libraries</arguments>
</matcher>
</filter>
<filter>
<id>1372126392135</id>
<name>jars</name>
<type>13</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-versions</arguments>
</matcher>
</filter>
<filter>
<id>1372126392137</id>
<name>jars</name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-natives</arguments>
</matcher>
</filter>
<filter>
<id>1372126425043</id>
<name>jars/libraries</name>
<type>21</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-*.jar</arguments>
</matcher>
</filter>
<filter>
<id>1307293480435</id>
<name>jars/bin/natives</name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-*</arguments>
</matcher>
</filter>
</filteredResources>
<variableList>
<variable>
<name>MCP_LOC</name>
<value>$%7BPARENT-1-WORKSPACE_LOC%7D</value>
</variable>
</variableList>
</projectDescription>
-1323
View File
File diff suppressed because it is too large. Load diff
-4
View File
@@ -1,4 +0,0 @@
echo off
@set PATH=%PATH%;%SystemDir%\system32;%SystemRoot%\System32;.\python\
python_fml install.py %*
pause
-55
View File
@@ -1,55 +0,0 @@
import os, os.path, sys
from optparse import OptionParser
from fml import setup_fml, finish_setup_fml, apply_fml_patches, setup_mcp, download_mcp
def fml_main(fml_dir, mcp_dir, gen_conf=True, disable_patches=False, disable_at=False, disable_merge=False, enable_server=False,
disable_client=False, disable_rename=False, disable_assets=False, decompile=False):
print '================ Forge ModLoader Setup Start ==================='
download_mcp(fml_dir, mcp_dir)
setup_mcp(fml_dir, mcp_dir, gen_conf)
if decompile:
decompile_minecraft(fml_dir, mcp_dir, disable_at=disable_at, disable_merge=disable_merge,
enable_server=enable_server, disable_client=disable_client,
disable_assets=disable_assets)
if disable_patches:
print 'Patching disabled'
else:
apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
finish_setup_fml(fml_dir, mcp_dir, enable_server=enable_server, disable_client=disable_client, disable_rename=disable_rename)
else:
print 'Decompile free install is on the to-do!'
print '================ Forge ModLoader Setup End ==================='
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to download/extract MCP to', default=None )
parser.add_option('-p', '--no-patch', action="store_true", dest='no_patch', help='Disable application of FML patches', default=False)
parser.add_option('-a', '--no-access', action="store_true", dest='no_access', help='Disable access transformers', default=False)
parser.add_option('-s', '--server', action="store_true", dest='enable_server', help='Enable decompilation of server', default=False)
parser.add_option('-c', '--no-client', action="store_true", dest='no_client', help='Disable decompilation of server', default=False)
parser.add_option('-e', '--no-merge', action="store_true", dest='no_merge', help='Disable merging server code into client', default=False)
parser.add_option('-n', '--no-rename', action="store_true", dest='no_rename', help='Disable running updatenames', default=False)
parser.add_option('-a', '--no-assets', action="store_true", dest='no_assets', help='Disable downloading of assets folder', default=False)
parser.add_option('-d', '--decompile', action="store_true", dest='decompile', help='Decompile minecraft and apply patches', default=True)
options, _ = parser.parse_args()
fml_dir = os.path.dirname(os.path.abspath(__file__))
mcp_dir = os.path.abspath('mcp')
if not options.mcp_dir is None:
mcp_dir = os.path.abspath(options.mcp_dir)
elif os.path.isfile(os.path.join('..', 'runtime', 'commands.py')):
mcp_dir = os.path.abspath('..')
if options.no_client:
options.no_patch = True
if options.no_merge:
options.no_patch = True
fml_main(fml_dir, mcp_dir, disable_patches=options.no_patch,
disable_at=options.no_access, disable_merge=options.no_merge,
enable_server=options.enable_server, disable_client=options.no_client,
disable_rename=options.no_rename, disable_assets=options.assets,
decompile=options.decompile, gen_conf=False)
-2
View File
@@ -1,2 +0,0 @@
#!/bin/bash
python install.py
-170
View File
@@ -1,170 +0,0 @@
import os, os.path, sys, csv, re, fnmatch, shutil, zipfile, pprint
from optparse import OptionParser
from pprint import pprint
#This script attempts to rename local variables in a Fernflower decompiled Java source file to jad style names.
#Script originally written by Grum in perl, Converted to Python by monoxide, and bug fixes/cleanup by LexManos
class VarNamer:
# Seems this is needed to keep these variables confined to the instance
def __init__(self):
self.last = {
'byte': [0, 0, ['b']],
'char': [0, 0, ['c']],
'short': [1, 0, ['short']],
'int': [0, 1, ['i', 'j', 'k', 'l']],
'boolean': [0, 1, ['flag']],
'double': [0, 0, ['d']],
'float': [0, 1, ['f']],
'File': [1, 1, ['file']],
'String': [0, 1, ['s']],
'Class': [0, 1, ['oclass']],
'Long': [0, 1, ['olong']],
'Byte': [0, 1, ['obyte']],
'Short': [0, 1, ['oshort']],
'Boolean': [0, 1, ['obool']],
'Package': [0, 1, ['opackage']]
}
self.remap = {
'long': 'int',
}
def get_name(self, type, var):
index = type if self.last.has_key(type) else (self.remap[type] if self.remap.has_key(type) else None)
if (not index) and (re.search('^[A-Z]', type) or re.search(r'(\[|\.\.\.)', type)):
type = type.replace('...', '[]')
while type.find('[][]') != -1:
type = type.replace('[][]', '[]')
name = type.lower()
skip = 1
if re.search(r'\[', type):
skip = 1
name = "a" + name
name = name.replace('[', '').replace(']', '').replace('...', '')
self.last[type] = [0, skip, [name]]
index = type
if not index:
print "No data for type: %s '%s'\n" % (type, var)
return type
id = self.last[index][0]
skip_zero = self.last[index][1]
data = self.last[index][2]
self.last[index][0] += 1
amount = len(data)
if amount == 1:
return data[0] + ('' if ((not id) and skip_zero) else ('%d' % id))
else:
num = id / amount
return data[id % amount] + ('' if ((not num) and skip_zero) else ('%d' % num))
def rename_file(file, indent='3', MCP=False):
tmp = file + '.tmp'
with open(file, 'rb') as in_file:
data = rename_class(in_file.read().replace('\r', ''), indent, MCP)
with open(tmp, 'wb') as out_file:
out_file.write(data)
shutil.move(tmp, file)
def rename_class(data, indent='3', MCP=False):
METHOD_REG = r'^ {%s}(\w+\s+\S.*\.*(|static )(?:\{|\);|})$' % indent
CATCH_REG = r'catch \((.*)\) {'
if MCP:
if indent == '3':
indent = '4'
METHOD_REG = r'^ {%s}(\w+\s+\S.*\(.*|static)$' % indent
CATCH_REG = r'catch \((.*)\)$'
lines = data.split('\n')
output = ''
inside_method = False
method = ''
method_variables = []
skip = False
for line in lines:
line += '\n'
if re.search(METHOD_REG, line) and not re.search('=', line) and not re.search(r'\(.*\(', line):
if re.search(r'\(.+\)', line):
method_variables += [s.strip() for s in re.search(r'\((.+)\)', line).group(1).split(',')]
method += line
# Could be a single-line method
skip = True
if not re.search(r'(}|\);|throws .+?;)$', line):
inside_method = True
elif re.search(r'^ {%s}}$' % indent, line):
inside_method = False
if inside_method:
if skip:
skip = False
continue
method += line
m = re.search(CATCH_REG, line)
if m:
method_variables += [m.group(1)]
else:
method_variables += map(lambda x: x.group(0), filter(
lambda x: not re.match(r'^(return)', x.group(0)) and not re.match(r'^(throw)', x.group(0)),
re.finditer(r'([a-z_$][a-z0-9_\[\]]+ var\d+)', line, re.I)))
else:
if method:
namer = VarNamer()
todo = map(lambda x: [x, namer.get_name(x.split(' ')[0], x)], method_variables)
replace = {}
for mapping in todo:
if not ' ' in mapping[0]:
continue
replace[mapping[0].split(' ')[1]] = mapping[1]
for k in sorted(replace, key=len, reverse=True):
original = k
to = replace[k]
#Don't rename already renamed things.
if not re.match('var\d+', original):
continue
method = method.replace(original, to)
output += method
method = ''
method_variables = []
if skip:
skip = False
continue
output += line
return output[:-1]
def main(options, args):
for arg in args:
for path, _, filelist in os.walk(arg, followlinks=True):
for cur_file in fnmatch.filter(filelist, '*.java'):
file = os.path.normpath(os.path.join(path, cur_file))
rename_file(file, options.indent, options.mcp)
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('-m', '--mcp', action='store_true', dest='mcp', help='Use MCP regexs', default=False)
parser.add_option('-i', '--indent', action='store', dest='indent', help='Custom indent to use', default='3')
options, args = parser.parse_args()
main(options, args)
-90
View File
@@ -1,90 +0,0 @@
import os, os.path, sys, csv, re, fnmatch, shutil, zipfile, pprint
from optparse import OptionParser
from zipfile import ZipFile
from subprocess import Popen, PIPE, STDOUT
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('-j', '--jar', action='store', dest='jar', help='Jar to sign', default=None)
parser.add_option('-c', '--command', action='store', dest='command', help='Path to jar signer command, will be invoked on temp jar to sign', default=None)
parser.add_option('-a', '--alias', action='store', dest='alias', help='Optional: The keystore alias to use when siging the jar, it will be passed in as para 2 to the command', default='')
#This is kept as a seperate file so that if you integrate this into a build system, you are not publically displaying any private passwords
#Typically the format of this file will be:
#
#jarsigner -keystore my_key_store -storepass key_store_pass -keypass key_pass %1 alias
#The rest of the parameters are used as regxs to determine what parts of the file will be signed, a file will be signed if it matches ANY of the regexs
options, args = parser.parse_args()
if options.jar is None:
print 'You must supply the jar to sign using --jar <jar>'
sys.exit(1)
if options.command is None:
print 'You must supply a command to be called using --command <command>, See the comments in the python for details on this'
sys.exit(1)
if not os.path.isfile(options.jar):
print 'The specified jar "%s" could not be found' % options.jar
sys.exit(1)
regs = []
for reg in args:
regs.append(re.compile(reg))
shutil.copy(options.jar, options.jar + '.bak')
tmp_1 = options.jar + '.tmp1'
tmp_2 = options.jar + '.tmp2'
zip_in = ZipFile(options.jar, mode='r')
zip_tmp_1 = ZipFile(tmp_1, mode='w')
zip_tmp_2 = ZipFile(tmp_2, mode='w')
for i in zip_in.filelist:
matched = False
for reg in regs:
if not reg.match(i.filename) is None:
matched = True
break
data = zip_in.read(i.filename)
if matched:
print 'Matched: ' + i.filename
zip_tmp_1.writestr(i, data)
else:
if i.filename.startswith('META-INF'):
print 'Detected skipped META-INF File, it will not be copied to new jar, if you wish to keep this data, include it in the signed info: %s' % i.filename
else:
print 'Skipped: ' + i.filename
zip_tmp_2.writestr(i, data)
zip_in.close()
zip_tmp_1.close()
zip_tmp_2.close()
try:
process = Popen([options.command, os.path.abspath(tmp_1), options.alias], stdout=PIPE, stderr=STDOUT, bufsize=-1)
out, _ = process.communicate()
print out
except OSError as e:
print "Error creating signed tmp jar: %s" % e.strerror
sys.exit(1)
os.remove(options.jar)
zip_out = ZipFile(options.jar, mode='w')
for tmp in [tmp_1, tmp_2]:
zip_in = ZipFile(tmp, mode='r')
for i in zip_in.filelist:
zip_out.writestr(i, zip_in.read(i.filename))
zip_in.close()
zip_out.close()
os.remove(tmp_1)
os.remove(tmp_2)
print 'Signing jar complete'
-64
View File
@@ -1,64 +0,0 @@
import os, os.path, sys, csv, re, fnmatch, shutil
from optparse import OptionParser
replaced = 0
def main(mcp_dir, targets):
global replaced
packages_csv = os.path.join(mcp_dir, 'conf', 'packages.csv')
if not os.path.isfile(packages_csv):
print 'Could not find Packages.csv, please specify a location of a MCP directory setup with FML using --mcp-dir <path>'
sys.exit(1)
pkgs = {}
with open(packages_csv) as fh:
reader = csv.DictReader(fh)
for line in reader:
pkgs[line['class']] = line['package']
if len(targets) == 0:
print 'You must specify atleast one target directory to repackage'
sys.exit(1)
regnms = re.compile(r'net.minecraft.src.(\w+)')
total_r = 0
total_f = 0
for target in targets:
for path, _, filelist in os.walk(target, followlinks=True):
for cur_file in fnmatch.filter(filelist, '*.java'):
file_name = os.path.join(path, cur_file)
buf = ''
replaced = 0
with open(file_name, 'rb') as fh:
data = fh.read()
def mapname(match):
global replaced
cls = match.group(0)
tmp = cls[18:]
if tmp in pkgs.keys():
replaced += 1
return ('%s/%s' % (pkgs[tmp], tmp)).replace('/', '.')
return cls
data = regnms.sub(mapname, data)
if replaced > 0:
total_r += replaced
total_f += 1
print '%s: %d' % (os.path.relpath(file_name), replaced)
with open(file_name + '.tmp', 'wb') as fh:
fh.write(data)
shutil.move(file_name + '.tmp', file_name)
print 'Fixed %d references in %d files' % (total_r, total_f)
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='MCP Directory', default='mcp')
options, args = parser.parse_args()
main(os.path.abspath(options.mcp_dir), args)
+137
View File
@@ -0,0 +1,137 @@
{
"id": "FML{version}",
"time": "{timestamp}",
"releaseTime": "{timestamp}",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--version FML_DEV --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 2,
"libraries": [
{
"name": "net.minecraft:launchwrapper:1.3",
"comment" : "Important for FML, we add this"
},
{
"name": "org.ow2.asm:asm-all:4.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "org.scala-lang:scala-library:2.10.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "org.scala-lang:scala-compiler:2.10.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "lzma:lzma:0.0.1"
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "net.sourceforge.argo:argo:2.25",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "grumble grumble grumble, y u no use proper version/artifact id grumble"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.guava:guava:14.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.apache.commons:commons-lang3:3.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "commons-io:commons-io:2.4",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jinput:jinput:2.0.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jutils:jutils:1.0.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.code.gson:gson:2.2.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
+127
View File
@@ -0,0 +1,127 @@
{
"install": {
"profileName": "FML",
"target":"FML@version@",
"path":"cpw.mods:fml:@version@",
"version":"FML @version@",
"filePath":"@universal_jar@",
"welcome":"Welcome to the simple FML installer.",
"minecraft":"@minecraft_version@",
"logo":"/big_logo.png"
},
"versionInfo": {
"id": "FML@version@",
"time": "@timestamp@",
"releaseTime": "1960-01-01T00:00:00-0700",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 2,
"libraries": [
{
"name": "cpw.mods:fml:@version@",
"url": "http://files.minecraftforge.net/maven/"
},
{
"name": "net.minecraft:launchwrapper:1.3",
"serverreq":true
},
{
"name": "org.scala-lang:scala-library:2.10.2",
"url" : "http://repo.maven.apache.org/maven2/",
"comment" : "Important for FML, we add this",
"serverreq":true
},
{
"name": "org.scala-lang:scala-compiler:2.10.2",
"url" : "http://repo.maven.apache.org/maven2/",
"comment" : "Important for FML, we add this",
"serverreq":true
},
{
"name": "org.ow2.asm:asm-all:4.1",
"serverreq":true
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5",
"serverreq":true
},
{
"name": "lzma:lzma:0.0.1",
"serverreq":true
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47"
},
{
"name": "com.google.guava:guava:14.0"
},
{
"name": "org.apache.commons:commons-lang3:3.1"
},
{
"name": "commons-io:commons-io:2.4"
},
{
"name": "net.java.jinput:jinput:2.0.5"
},
{
"name": "net.java.jutils:jutils:1.0.0"
},
{
"name": "com.google.code.gson:gson:2.2.2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
}
+137
View File
@@ -0,0 +1,137 @@
{
"id": "FML{version}",
"time": "{timestamp}",
"releaseTime": "{timestamp}",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--version FML_DEV --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 2,
"libraries": [
{
"name": "net.minecraft:launchwrapper:1.3",
"comment" : "Important for FML, we add this"
},
{
"name": "org.ow2.asm:asm-debug-all:4.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "org.scala-lang:scala-library:2.10.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "org.scala-lang:scala-compiler:2.10.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "lzma:lzma:0.0.1"
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "net.sourceforge.argo:argo:2.25",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "grumble grumble grumble, y u no use proper version/artifact id grumble"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.guava:guava:14.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.apache.commons:commons-lang3:3.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "commons-io:commons-io:2.4",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jinput:jinput:2.0.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jutils:jutils:1.0.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.code.gson:gson:2.2.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
+220
View File
@@ -0,0 +1,220 @@
{
"install": {
"profileName": "FML",
"target":"@minecraft_version@-FML@version@",
"path":"cpw.mods:fml:@version@",
"version":"FML @version@",
"filePath":"@universal_jar@",
"welcome":"Welcome to the simple FML installer.",
"minecraft":"@minecraft_version@",
"mirrorList" : "http://files.minecraftforge.net/mirror-brand.list",
"logo":"/big_logo.png"
},
"versionInfo": {
"id": "@minecraft_version@-FML@version@",
"time": "@timestamp@",
"releaseTime": "1960-01-01T00:00:00-0700",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 4,
"libraries": [
{
"name": "cpw.mods:fml:@version@",
"url": "http://files.minecraftforge.net/maven/"
},
{
"name": "net.minecraft:launchwrapper:1.3",
"serverreq":true
},
{
"name": "org.ow2.asm:asm-all:4.1",
"serverreq":true
},
{
"name": "org.scala-lang:scala-library:2.10.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "6ba65d12cd09d441083262d6f73d2257fec7c663", "dffc88e804861c9eaba39283757000b6558ea573" ],
"comment" : "Important for FML, we add this",
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-compiler:2.10.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "64c8b1380cc53d6850823d6e4e7ae984aa44ef9c", "40281b3ffc69fb385953522c843363ccaf71ba89" ],
"comment" : "Important for FML, we add this",
"serverreq":true,
"clientreq":true
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5",
"serverreq":true
},
{
"name": "lzma:lzma:0.0.1",
"serverreq":true
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47"
},
{
"name": "com.google.guava:guava:14.0"
},
{
"name": "org.apache.commons:commons-lang3:3.1"
},
{
"name": "commons-io:commons-io:2.4"
},
{
"name": "net.java.jinput:jinput:2.0.5"
},
{
"name": "net.java.jutils:jutils:1.0.0"
},
{
"name": "com.google.code.gson:gson:2.2.2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
],
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20130708-debug3",
"rules": [
{
"action": "allow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20130708-debug3",
"rules": [
{
"action": "allow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20130708-debug3",
"rules": [
{
"action": "allow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
],
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
}
+137
View File
@@ -0,0 +1,137 @@
{
"id": "FML{version}",
"time": "{timestamp}",
"releaseTime": "{timestamp}",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--version FML_DEV --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 4,
"libraries": [
{
"name": "net.minecraft:launchwrapper:1.7",
"comment" : "Important for FML, we add this"
},
{
"name": "org.ow2.asm:asm-debug-all:4.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "org.scala-lang:scala-library:2.10.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "org.scala-lang:scala-compiler:2.10.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "lzma:lzma:0.0.1"
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "net.sourceforge.argo:argo:2.25",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "grumble grumble grumble, y u no use proper version/artifact id grumble"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.guava:guava:14.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.apache.commons:commons-lang3:3.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "commons-io:commons-io:2.4",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jinput:jinput:2.0.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jutils:jutils:1.0.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.code.gson:gson:2.2.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
+214
View File
@@ -0,0 +1,214 @@
{
"install": {
"profileName": "FML",
"target":"@minecraft_version@-FML@version@",
"path":"cpw.mods:fml:@version@",
"version":"FML @version@",
"filePath":"@universal_jar@",
"welcome":"Welcome to the simple FML installer.",
"minecraft":"@minecraft_version@",
"mirrorList" : "http://files.minecraftforge.net/mirror-brand.list",
"logo":"/big_logo.png"
},
"versionInfo": {
"id": "@minecraft_version@-FML@version@",
"time": "@timestamp@",
"releaseTime": "1960-01-01T00:00:00-0700",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 4,
"libraries": [
{
"name": "cpw.mods:fml:@version@",
"url": "http://files.minecraftforge.net/maven/"
},
{
"name": "net.minecraft:launchwrapper:1.7",
"serverreq":true
},
{
"name": "org.ow2.asm:asm-all:4.1",
"serverreq":true
},
{
"name": "org.scala-lang:scala-library:2.10.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "6ba65d12cd09d441083262d6f73d2257fec7c663", "dffc88e804861c9eaba39283757000b6558ea573" ],
"comment" : "Important for FML, we add this",
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-compiler:2.10.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "64c8b1380cc53d6850823d6e4e7ae984aa44ef9c", "40281b3ffc69fb385953522c843363ccaf71ba89" ],
"comment" : "Important for FML, we add this",
"serverreq":true,
"clientreq":true
},
{
"name": "lzma:lzma:0.0.1",
"serverreq":true
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5",
"serverreq":true
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47"
},
{
"name": "com.google.guava:guava:14.0"
},
{
"name": "org.apache.commons:commons-lang3:3.1"
},
{
"name": "commons-io:commons-io:2.4"
},
{
"name": "net.java.jinput:jinput:2.0.5"
},
{
"name": "net.java.jutils:jutils:1.0.0"
},
{
"name": "com.google.code.gson:gson:2.2.2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
],
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20130708-debug3",
"rules": [
{
"action": "allow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20130708-debug3",
"rules": [
{
"action": "allow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20130708-debug3",
"rules": [
{
"action": "allow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
],
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
}
+137
View File
@@ -0,0 +1,137 @@
{
"id": "FML{version}",
"time": "{timestamp}",
"releaseTime": "{timestamp}",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--version FML_DEV --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 4,
"libraries": [
{
"name": "net.minecraft:launchwrapper:1.8",
"comment" : "Important for FML, we add this"
},
{
"name": "org.ow2.asm:asm-debug-all:4.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "org.scala-lang:scala-library:2.10.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "org.scala-lang:scala-compiler:2.10.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "Important for FML, we add this"
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "lzma:lzma:0.0.1"
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "net.sourceforge.argo:argo:2.25",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2",
"comment" : "grumble grumble grumble, y u no use proper version/artifact id grumble"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.guava:guava:14.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.apache.commons:commons-lang3:3.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "commons-io:commons-io:2.4",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jinput:jinput:2.0.5",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "net.java.jutils:jutils:1.0.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.code.gson:gson:2.2.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
+214
View File
@@ -0,0 +1,214 @@
{
"install": {
"profileName": "FML",
"target":"@minecraft_version@-FML@version@",
"path":"cpw.mods:fml:@version@",
"version":"FML @version@",
"filePath":"@universal_jar@",
"welcome":"Welcome to the simple FML installer.",
"minecraft":"@minecraft_version@",
"mirrorList" : "http://files.minecraftforge.net/mirror-brand.list",
"logo":"/big_logo.png"
},
"versionInfo": {
"id": "@minecraft_version@-FML@version@",
"time": "@timestamp@",
"releaseTime": "1960-01-01T00:00:00-0700",
"type": "release",
"processArguments": "username_session_version",
"minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minimumLauncherVersion": 4,
"libraries": [
{
"name": "cpw.mods:fml:@version@",
"url": "http://files.minecraftforge.net/maven/"
},
{
"name": "net.minecraft:launchwrapper:1.8",
"serverreq":true
},
{
"name": "org.ow2.asm:asm-all:4.1",
"serverreq":true
},
{
"name": "org.scala-lang:scala-library:2.10.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "6ba65d12cd09d441083262d6f73d2257fec7c663", "65de4339eaed1c3675485fb03a3532fecfd8e8cd" ],
"comment" : "Important for FML, we add this",
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-compiler:2.10.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "64c8b1380cc53d6850823d6e4e7ae984aa44ef9c", "99fd0ffb66f3088b0cd1071315fd5eb2b2b070ff" ],
"comment" : "Important for FML, we add this",
"serverreq":true,
"clientreq":true
},
{
"name": "lzma:lzma:0.0.1",
"serverreq":true
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.5",
"serverreq":true
},
{
"name": "com.paulscode:codecjorbis:20101023"
},
{
"name": "com.paulscode:codecwav:20101023"
},
{
"name": "com.paulscode:libraryjavasound:20101123"
},
{
"name": "com.paulscode:librarylwjglopenal:20100824"
},
{
"name": "com.paulscode:soundsystem:20120107"
},
{
"name": "argo:argo:2.25_fixed"
},
{
"name": "org.bouncycastle:bcprov-jdk15on:1.47"
},
{
"name": "com.google.guava:guava:14.0"
},
{
"name": "org.apache.commons:commons-lang3:3.1"
},
{
"name": "commons-io:commons-io:2.4"
},
{
"name": "net.java.jinput:jinput:2.0.5"
},
{
"name": "net.java.jutils:jutils:1.0.0"
},
{
"name": "com.google.code.gson:gson:2.2.2"
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
],
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20130708-debug3",
"rules": [
{
"action": "allow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20130708-debug3",
"rules": [
{
"action": "allow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
]
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20130708-debug3",
"rules": [
{
"action": "allow",
"os": {
"name": "osx",
"version": "^10\\.5\\.\\d$"
}
}
],
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"windows": "natives-windows",
"osx": "natives-osx"
},
"extract": {
"exclude": [
"META-INF/"
]
}
}
],
"mainClass": "net.minecraft.launchwrapper.Launch"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

-102
View File
@@ -1,102 +0,0 @@
[default]
current_ver = 1.6
base_url = http://s3.amazonaws.com/MinecraftDownload/
libraries = lwjgl.jar lwjgl_util.jar jinput.jar
natives = windows_natives.jar macosx_natives.jar linux_natives.jar
[1.4.4]
client_url = http://assets.minecraft.net/1_4_4/minecraft.jar
server_url = http://assets.minecraft.net/1_4_4/minecraft_server.jar
client_md5 = 7aa46c8058cba2f38e9d2ddddcc77c72
server_md5 = b5feed15df1db87c9aaf78dcefad513d
mcp_ver = 7.21
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp721.zip
mcp_md5 = 772ecfdac7e4c9491bfb131cee3bbb36
[1.4.5]
client_url = http://assets.minecraft.net/1_4_5/minecraft.jar
server_url = http://assets.minecraft.net/1_4_5/minecraft_server.jar
client_md5 = b15e2b2b6b4629f0d99a95b6b44412a0
server_md5 = 250654ceae7a26ba955a30095d90a475
mcp_ver = 7.23
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp723.zip
mcp_md5 = 9fbb5835b437b64bc5ce618fa5a53d1d
[1.4.6]
client_url = http://assets.minecraft.net/1_4_6/minecraft.jar
server_url = http://assets.minecraft.net/1_4_6/minecraft_server.jar
client_md5 = 48677dc4c2b98c29918722b5ab27b4fd
server_md5 = b0700fa969dbf0ff085082cde87384d2
mcp_ver = 7.25
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp725.zip
mcp_md5 = a7276589fca4974d40eb4e27ba41ba16
[1.4.7]
client_url = http://assets.minecraft.net/1_4_7/minecraft.jar
server_url = http://assets.minecraft.net/1_4_7/minecraft_server.jar
client_md5 = 8e80fb01b321c6b3c7efca397a3eea35
server_md5 = f69ac4bfce2dfbce03fe872518f75a05
mcp_ver = 7.26a
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp726a.zip
mcp_md5 = 5f11fbccd857b43a0f54117253b3e4dd
[s13w02b]
client_url = http://assets.minecraft.net/13w02b/minecraft.jar
server_url = http://assets.minecraft.net/13w02b/minecraft_server.jar
client_md5 = 13891f6610b6739ac79f40147cca31d5
server_md5 = b2200cfa5d6535f177d291066d2ed3a8
mcp_ver = 7.30c
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp730c.zip
mcp_md5 = b25479ba38ca583bb8223c0a0553defe
[s13w05b]
client_url = http://assets.minecraft.net/13w05b/minecraft.jar
server_url = http://assets.minecraft.net/13w05b/minecraft_server.jar
client_md5 = 496002660846f2eb455cba407cd26818
server_md5 = e317f8f4f62d0603a8eacbfb2e33549c
mcp_ver = 7.34
mcp_url = http://files.minecraftforge.net/mcpmirror/mcp734.zip
mcp_md5 = 522dc1a7b66f8265291e1cc2f8f5d247
[s13w09c]
client_url = http://assets.minecraft.net/13w09c/minecraft.jar
server_url = http://assets.minecraft.net/13w09c/minecraft_server.jar
client_md5 = d2534381656da5069b96cc89e28158ef
server_md5 = 92f4fd715191c596745c7bbfad9c1aad
mcp_ver = 7.39
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp739.zip
mcp_md5 = cd4f6f5e6dd7032301aa98a9046201dd
[1.5]
client_url = http://assets.minecraft.net/1_5/minecraft.jar
server_url = http://assets.minecraft.net/1_5/minecraft_server.jar
client_md5 = fd11cbc5b01aae1d62cff0145171f3d9
server_md5 = 00035b7842554bdbff95a48169420525
mcp_ver = 7.42
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp742.zip
mcp_md5 = ad1a2b86916dd5f71e832181e01bd91a
[1.5.1]
client_url = http://assets.minecraft.net/1_5_1/minecraft.jar
server_url = http://assets.minecraft.net/1_5_1/minecraft_server.jar
client_md5 = 5c1219d869b87d233de3033688ec7567
server_md5 = 9d31b969c3f197a1d40381d5620717ea
mcp_ver = 7.44
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp744.zip
mcp_md5 = 0b9047820bbcb7da32c5e18f60212832
[1.5.2]
client_url = http://s3.amazonaws.com/Minecraft.Download/versions/1.5.2/1.5.2.jar
server_url = http://s3.amazonaws.com/Minecraft.Download/versions/1.5.2/minecraft_server.1.5.2.jar
client_md5 = 6897c3287fb971c9f362eb3ab20f5ddd
server_md5 = c4e1bf89e834bd3670c7bf8f13874bc6
mcp_ver = 7.51
mcp_url = http://mcp.ocean-labs.de/files/archive/mcp751.zip
mcp_md5 = a8c68db8736227c9e26cbcb0995e5b71
[1.6]
client_md5 = 6a64a2136e3a3fe4d29b0a0df30b25fc
server_md5 = 7c03305c8bf97a8e8f3cdb147fc90607
mcp_ver = 8.01
mcp_url =
mcp_md5 = 39da81bbb4d73b3f5e2d1f8f5682cdb9
@@ -12,7 +12,7 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.awt.image.BufferedImage;
@@ -129,6 +134,8 @@
@@ -130,6 +135,8 @@
import org.lwjgl.opengl.PixelFormat;
import org.lwjgl.util.glu.GLU;
@@ -21,24 +21,28 @@
@SideOnly(Side.CLIENT)
public class Minecraft implements IPlayerUsage
{
@@ -364,6 +371,8 @@
@@ -362,9 +369,12 @@
this.field_71446_o = new TextureManager(this.field_110451_am);
this.field_110451_am.func_110542_a(this.field_71446_o);
this.field_71416_A = new SoundManager(this.field_110451_am, this.field_71474_y, this.field_110446_Y);
+ this.field_71416_A.LOAD_SOUND_SYSTEM = false;
this.field_110451_am.func_110542_a(this.field_71416_A);
this.func_71357_I();
this.field_71466_p = new FontRenderer(this.field_71474_y, new ResourceLocation("textures/font/ascii.png"), this.field_71446_o, false);
+ FMLClientHandler.instance().beginMinecraftLoading(this);
+
+ FMLClientHandler.instance().beginMinecraftLoading(this, this.field_110449_ao, this.field_110451_am);
if (this.field_71474_y.field_74363_ab != null)
{
this.field_71466_p.func_78264_a(this.field_135017_as.func_135042_a());
@@ -396,6 +405,7 @@
this.field_71446_o.func_130088_a(TextureMap.field_110576_c, new TextureMap(1, "textures/items/"));
@@ -400,6 +410,7 @@
this.field_71446_o.func_130088_a(TextureMap.field_110576_c, new TextureMap(1, "textures/items"));
GL11.glViewport(0, 0, this.field_71443_c, this.field_71440_d);
this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o);
+ FMLClientHandler.instance().finishMinecraftLoading();
this.func_71361_d("Post startup");
this.field_71456_v = new GuiIngame(this);
@@ -414,6 +424,7 @@
@@ -418,6 +429,7 @@
{
this.func_71352_k();
}
@@ -46,7 +50,7 @@
}
public void func_110436_a()
@@ -725,6 +736,7 @@
@@ -733,6 +745,7 @@
{
this.func_71405_e();
}
@@ -54,7 +58,7 @@
}
private void func_71411_J()
@@ -793,9 +805,11 @@
@@ -801,9 +814,11 @@
if (!this.field_71454_w)
{
@@ -66,7 +70,7 @@
}
GL11.glFlush();
@@ -1317,10 +1331,14 @@
@@ -1325,10 +1340,14 @@
public void func_71407_l()
{
@@ -81,7 +85,7 @@
this.field_71424_I.func_76320_a("stats");
this.field_71413_E.func_77449_e();
@@ -1771,6 +1789,8 @@
@@ -1785,6 +1804,8 @@
this.field_71453_ak.func_74428_b();
}
@@ -90,7 +94,7 @@
this.field_71424_I.func_76319_b();
this.field_71423_H = func_71386_F();
}
@@ -1794,8 +1814,27 @@
@@ -1808,8 +1829,27 @@
}
this.field_71413_E.func_77450_a(StatList.field_75936_f, 1);
@@ -0,0 +1,18 @@
--- ../src-base/minecraft/net/minecraft/client/audio/SoundManager.java
+++ ../src-work/minecraft/net/minecraft/client/audio/SoundManager.java
@@ -27,6 +27,7 @@
@SideOnly(Side.CLIENT)
public class SoundManager implements ResourceManagerReloadListener
{
+ public boolean LOAD_SOUND_SYSTEM = true;
private static final String[] field_130084_a = new String[] {"ogg"};
private SoundSystem field_77381_a;
private boolean field_77376_g;
@@ -67,6 +68,7 @@
public void func_110549_a(ResourceManager p_110549_1_)
{
+ if (!this.LOAD_SOUND_SYSTEM) return; //Stop the sound system from initializing three times at startup. Causing race conditions on some machines.
this.func_82464_d();
this.func_77370_b();
this.func_77363_d();
@@ -1,11 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiErrorScreen.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiErrorScreen.java
@@ -22,6 +22,8 @@
this.field_73887_h.add(new GuiButton(0, this.field_73880_f / 2 - 100, 140, I18n.func_135053_a("gui.cancel")));
}
+ public GuiErrorScreen(){}
+
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
{
this.func_73733_a(0, 0, this.field_73880_f, this.field_73881_g, -12574688, -11530224);
@@ -15,8 +15,8 @@
+import java.util.List;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.Tessellator;
@@ -23,6 +26,9 @@
import net.minecraft.client.mco.ExceptionMcoService;
@@ -26,6 +29,9 @@
import org.apache.commons.io.Charsets;
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.glu.Project;
@@ -26,7 +26,7 @@
@SideOnly(Side.CLIENT)
public class GuiMainMenu extends GuiScreen
@@ -52,6 +58,8 @@
@@ -55,6 +61,8 @@
private ResourceLocation field_110351_G;
private GuiButton field_130023_H;
@@ -35,7 +35,7 @@
public GuiMainMenu()
{
BufferedReader bufferedreader = null;
@@ -203,13 +211,22 @@
@@ -206,13 +214,22 @@
private void func_130022_h()
{
this.field_130023_H.field_73748_h = true;
@@ -59,7 +59,7 @@
this.field_130023_H.field_73748_h = false;
}
@@ -256,6 +273,11 @@
@@ -259,6 +276,11 @@
if (p_73875_1_.field_73741_f == 4)
{
this.field_73882_e.func_71400_g();
@@ -71,7 +71,7 @@
}
if (p_73875_1_.field_73741_f == 11)
@@ -492,7 +514,16 @@
@@ -520,7 +542,16 @@
s = s + " Demo";
}
@@ -1,44 +1,46 @@
--- ../src-base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
@@ -1,5 +1,6 @@
@@ -1,6 +1,8 @@
package net.minecraft.client.multiplayer;
import com.google.common.base.Charsets;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.io.BufferedReader;
@@ -201,11 +202,14 @@
@@ -205,11 +207,14 @@
private GuiScreen field_98183_l;
Random field_72557_e = new Random();
+ private static byte connectionCompatibilityLevel;
+
public NetClientHandler(Minecraft p_i3103_1_, String p_i3103_2_, int p_i3103_3_) throws IOException
public NetClientHandler(Minecraft p_i1176_1_, String p_i1176_2_, int p_i1176_3_) throws IOException
{
this.field_72563_h = p_i3103_1_;
Socket socket = new Socket(InetAddress.getByName(p_i3103_2_), p_i3103_3_);
this.field_72555_g = new TcpConnection(p_i3103_1_.func_98033_al(), socket, "Client", this);
+ FMLNetworkHandler.onClientConnectionToRemoteServer(this, p_i3103_2_, p_i3103_3_, this.field_72555_g);
this.field_72563_h = p_i1176_1_;
Socket socket = new Socket(InetAddress.getByName(p_i1176_2_), p_i1176_3_);
this.field_72555_g = new TcpConnection(p_i1176_1_.func_98033_al(), socket, "Client", this);
+ FMLNetworkHandler.onClientConnectionToRemoteServer(this, p_i1176_2_, p_i1176_3_, this.field_72555_g);
}
public NetClientHandler(Minecraft p_i11012_1_, String p_i11012_2_, int p_i11012_3_, GuiScreen p_i11012_4_) throws IOException
@@ -214,6 +218,7 @@
this.field_98183_l = p_i11012_4_;
Socket socket = new Socket(InetAddress.getByName(p_i11012_2_), p_i11012_3_);
this.field_72555_g = new TcpConnection(p_i11012_1_.func_98033_al(), socket, "Client", this);
+ FMLNetworkHandler.onClientConnectionToRemoteServer(this, p_i11012_2_, p_i11012_3_, this.field_72555_g);
public NetClientHandler(Minecraft p_i1177_1_, String p_i1177_2_, int p_i1177_3_, GuiScreen p_i1177_4_) throws IOException
@@ -218,6 +223,7 @@
this.field_98183_l = p_i1177_4_;
Socket socket = new Socket(InetAddress.getByName(p_i1177_2_), p_i1177_3_);
this.field_72555_g = new TcpConnection(p_i1177_1_.func_98033_al(), socket, "Client", this);
+ FMLNetworkHandler.onClientConnectionToRemoteServer(this, p_i1177_2_, p_i1177_3_, this.field_72555_g);
}
public NetClientHandler(Minecraft p_i3104_1_, IntegratedServer p_i3104_2_) throws IOException
@@ -221,6 +226,7 @@
this.field_72563_h = p_i3104_1_;
this.field_72555_g = new MemoryConnection(p_i3104_1_.func_98033_al(), this);
p_i3104_2_.func_71343_a().func_71754_a((MemoryConnection)this.field_72555_g, p_i3104_1_.func_110432_I().func_111285_a());
+ FMLNetworkHandler.onClientConnectionToIntegratedServer(this, p_i3104_2_, this.field_72555_g);
public NetClientHandler(Minecraft p_i1178_1_, IntegratedServer p_i1178_2_) throws IOException
@@ -225,6 +231,7 @@
this.field_72563_h = p_i1178_1_;
this.field_72555_g = new MemoryConnection(p_i1178_1_.func_98033_al(), this);
p_i1178_2_.func_71343_a().func_71754_a((MemoryConnection)this.field_72555_g, p_i1178_1_.func_110432_I().func_111285_a());
+ FMLNetworkHandler.onClientConnectionToIntegratedServer(this, p_i1178_2_, this.field_72555_g);
}
public void func_72547_c()
@@ -292,6 +298,7 @@
@@ -296,6 +303,7 @@
public void func_72513_a(Packet252SharedKey p_72513_1_)
{
@@ -46,15 +48,15 @@
this.func_72552_c(new Packet205ClientCommand(0));
}
@@ -307,6 +314,7 @@
@@ -311,6 +319,7 @@
this.field_72563_h.field_71439_g.field_70157_k = p_72455_1_.field_73561_a;
this.field_72556_d = p_72455_1_.field_73562_h;
this.field_72563_h.field_71442_b.func_78746_a(p_72455_1_.field_73557_d);
+ FMLNetworkHandler.onConnectionEstablishedToServer(this, field_72555_g, p_72455_1_);
this.field_72563_h.field_71474_y.func_82879_c();
this.field_72555_g.func_74429_a(new Packet250CustomPayload("MC|Brand", ClientBrandRetriever.getClientModName().getBytes(Charsets.UTF_8)));
}
@@ -760,6 +768,7 @@
@@ -765,6 +774,7 @@
{
this.field_72555_g.func_74429_a(p_72546_1_);
this.field_72555_g.func_74423_d();
@@ -62,7 +64,7 @@
}
}
@@ -799,6 +808,7 @@
@@ -804,6 +814,7 @@
public void func_72481_a(Packet3Chat p_72481_1_)
{
@@ -70,7 +72,7 @@
this.field_72563_h.field_71456_v.func_73827_b().func_73765_a(ChatMessageComponent.func_111078_c(p_72481_1_.field_73476_b).func_111068_a(true));
}
@@ -1379,6 +1389,11 @@
@@ -1403,6 +1414,11 @@
public void func_72494_a(Packet131MapData p_72494_1_)
{
@@ -82,7 +84,7 @@
if (p_72494_1_.field_73438_a == Item.field_77744_bd.field_77779_bT)
{
ItemMap.func_77874_a(p_72494_1_.field_73436_b, this.field_72563_h.field_71441_e).func_76192_a(p_72494_1_.field_73437_c);
@@ -1490,6 +1505,11 @@
@@ -1514,6 +1530,11 @@
public void func_72501_a(Packet250CustomPayload p_72501_1_)
{
@@ -94,7 +96,7 @@
if ("MC|TrList".equals(p_72501_1_.field_73630_a))
{
DataInputStream datainputstream = new DataInputStream(new ByteArrayInputStream(p_72501_1_.field_73629_c));
@@ -1670,4 +1690,20 @@
@@ -1707,4 +1728,20 @@
{
return this.field_72555_g;
}
@@ -1,111 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/RenderEngine.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderEngine.java
@@ -1,8 +1,11 @@
package net.minecraft.client.renderer;
+import cpw.mods.fml.client.TextureFXManager;
+import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.awt.Color;
+import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
@@ -11,6 +14,9 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
import javax.imageio.ImageIO;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureMap;
@@ -37,6 +43,8 @@
private final TextureMap field_94155_m;
private int field_94153_n;
+ public static Logger log = FMLLog.getLogger();
+
public RenderEngine(TexturePackList p_i3192_1_, GameSettings p_i3192_2_)
{
this.field_78366_k = p_i3192_1_;
@@ -87,14 +95,17 @@
}
else
{
- aint1 = this.func_78348_b(this.func_78345_a(inputstream));
+ BufferedImage bufferedimage = this.func_78345_a(inputstream);
+ TextureFXManager.instance().fixTransparency(bufferedimage, p_78346_1_);
+ aint1 = this.func_78348_b(bufferedimage);
}
this.field_78359_d.put(p_78346_1_, aint1);
return aint1;
}
- catch (IOException ioexception)
- {
+ catch (Exception ioexception)
+ {
+ log.log(Level.INFO, String.format("An error occured reading texture file %s (getTexture)", p_78346_1_), ioexception);
ioexception.printStackTrace();
int[] aint2 = this.func_78348_b(this.field_78364_l);
this.field_78359_d.put(p_78346_1_, aint2);
@@ -162,6 +173,7 @@
try
{
int i = GLAllocation.func_74528_a();
+ TextureFXManager.instance().bindTextureToName(p_78341_1_, i);
boolean flag = p_78341_1_.startsWith("%blur%");
if (flag)
@@ -184,7 +196,9 @@
}
else
{
- this.func_98184_a(this.func_78345_a(inputstream), i, flag, flag1);
+ BufferedImage bufferedimage = this.func_78345_a(inputstream);
+ TextureFXManager.instance().fixTransparency(bufferedimage, p_78341_1_);
+ this.func_98184_a(bufferedimage, i, flag, flag1);
}
this.field_78362_c.put(s1, Integer.valueOf(i));
@@ -240,6 +254,7 @@
int j = p_98184_1_.getWidth();
int k = p_98184_1_.getHeight();
+ TextureFXManager.instance().setTextureDimensions(p_98184_2_, j, k);
int[] aint = new int[j * k];
p_98184_1_.getRGB(0, 0, j, k, aint, 0, j);
@@ -412,10 +427,12 @@
}
BufferedImage bufferedimage1 = this.func_78345_a(itexturepack.func_77532_a(s));
+ TextureFXManager.instance().fixTransparency(bufferedimage1, s);
this.func_98184_a(bufferedimage1, j, flag, flag1);
}
- catch (IOException ioexception)
- {
+ catch (Exception ioexception)
+ {
+ log.log(Level.INFO,String.format("An error occured reading texture file %s (refreshTexture)", s), ioexception);
ioexception.printStackTrace();
}
}
@@ -429,10 +446,12 @@
try
{
bufferedimage = this.func_78345_a(itexturepack.func_77532_a(s));
+ TextureFXManager.instance().fixTransparency(bufferedimage, s);
this.func_78340_a(bufferedimage, (int[])this.field_78359_d.get(s));
}
- catch (IOException ioexception1)
- {
+ catch (Exception ioexception1)
+ {
+ log.log(Level.INFO,String.format("An error occured reading texture file data %s (refreshTexture)", s), ioexception1);
ioexception1.printStackTrace();
}
}
@@ -1,63 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/Texture.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/Texture.java
@@ -1,5 +1,6 @@
package net.minecraft.client.renderer.texture;
+import cpw.mods.fml.client.TextureFXManager;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.awt.image.BufferedImage;
@@ -9,6 +10,8 @@
import javax.imageio.ImageIO;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.src.FMLRenderAccessLibrary;
+
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@@ -206,6 +209,12 @@
{
if (this.field_94300_h != 32879)
{
+ if (field_94303_q && !p_94281_4_)
+ {
+ FMLRenderAccessLibrary.doTextureCopy(this, p_94281_3_, p_94281_1_, p_94281_2_);
+ return;
+ }
+
ByteBuffer bytebuffer = p_94281_3_.func_94273_h();
this.field_94302_r.position(0);
bytebuffer.position(0);
@@ -218,7 +227,7 @@
if (p_94281_4_)
{
- l = p_94281_2_ + (p_94281_3_.func_94276_e() - k);
+ l = p_94281_1_ + (p_94281_3_.func_94276_e() - k - 1); //BUGFIX: targetY -> targetX and -1
}
for (int k1 = 0; k1 < p_94281_3_.func_94275_d(); ++k1)
@@ -228,7 +237,7 @@
if (p_94281_4_)
{
- l1 = p_94281_1_ + k1 * this.field_94289_d * 4 + l * 4;
+ l1 = (p_94281_2_ + k1) * this.field_94289_d * 4 + l * 4; //BUGFIX: targetX -> targetY and parens
}
this.field_94302_r.put(l1 + 0, bytebuffer.get(i2 + 0));
@@ -378,4 +387,13 @@
{
return this.field_94302_r;
}
+
+ public void createAndUploadTexture()
+ {
+ this.field_94293_a = GL11.glGenTextures();
+ GL11.glBindTexture(this.field_94300_h, this.field_94293_a);
+ System.out.printf("Buffer %s %x %d is %s\n",field_94297_m, field_94300_h, field_94293_a, field_94302_r);
+ field_94302_r.position(field_94302_r.limit());
+ func_94285_g();
+ }
}
@@ -1,34 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureStitched.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureStitched.java
@@ -1,5 +1,6 @@
package net.minecraft.client.renderer.texture;
+import cpw.mods.fml.client.TextureFXManager;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.io.BufferedReader;
@@ -56,6 +57,11 @@
this.field_94230_o = (float)(p_94218_4_ + p_94218_6_) / (float)p_94218_1_.func_94276_e() - f1;
this.field_94238_p = (float)p_94218_5_ / 16.0F;
this.field_94237_q = (float)p_94218_6_ / 16.0F;
+ TextureFXManager.instance().getHelper().doTextureUpload(this);
+ if (this.field_94227_c)
+ {
+ TextureFXManager.instance().getHelper().rotateTexture(this.field_94228_a, this.field_94228_a.func_94273_h());
+ }
}
public void func_94217_a(TextureStitched p_94217_1_)
@@ -198,4 +204,12 @@
this.field_94236_i = arraylist;
}
}
+
+ public void createAndUploadTextures()
+ {
+ for (Texture t : ((List<Texture>)field_94226_b))
+ {
+ t.createAndUploadTexture();
+ }
+ }
}
@@ -8,7 +8,7 @@
- {
- return this.func_85085_a();
- }
- catch (Exception e)
- catch (Exception ex)
- {
- return null;
- }
@@ -9,4 +9,4 @@
-@SideOnly(Side.CLIENT)
public interface IBossDisplayData
{
float func_70667_aM();
float func_110138_aP();
@@ -8,7 +8,7 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Collection;
@@ -183,6 +185,7 @@
@@ -181,6 +183,7 @@
public void func_70071_h_()
{
@@ -16,7 +16,7 @@
if (this.field_71074_e != null)
{
ItemStack itemstack = this.field_71071_by.func_70448_g();
@@ -306,6 +309,7 @@
@@ -304,6 +307,7 @@
{
this.field_71100_bB.func_75118_a(this);
}
@@ -24,7 +24,7 @@
}
public int func_82145_z()
@@ -1954,4 +1958,9 @@
@@ -1906,4 +1910,9 @@
{
return this.func_70096_w().func_111145_d(17);
}
@@ -12,7 +12,7 @@
@@ -224,6 +226,8 @@
}
field_77698_e[256 + p_i3659_1_] = this;
field_77698_e[256 + p_i1875_1_] = this;
+
+ GameData.newItemAdded(this);
}
@@ -25,7 +25,7 @@
{
this.func_72527_a("Took too long to log in");
}
@@ -148,11 +152,18 @@
@@ -155,11 +159,18 @@
}
}
@@ -46,7 +46,7 @@
if (s != null)
{
@@ -270,4 +281,22 @@
@@ -282,4 +293,22 @@
{
return p_72531_0_.field_72544_i = p_72531_1_;
}
@@ -9,7 +9,7 @@
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.Entity;
@@ -34,6 +36,7 @@
@@ -36,6 +38,7 @@
import net.minecraft.network.packet.Packet108EnchantItem;
import net.minecraft.network.packet.Packet10Flying;
import net.minecraft.network.packet.Packet130UpdateSign;
@@ -17,7 +17,7 @@
import net.minecraft.network.packet.Packet13PlayerLookMove;
import net.minecraft.network.packet.Packet14BlockDig;
import net.minecraft.network.packet.Packet15Place;
@@ -634,6 +637,7 @@
@@ -618,6 +621,7 @@
public void func_72481_a(Packet3Chat p_72481_1_)
{
@@ -25,7 +25,7 @@
if (this.field_72574_e.func_71126_v() == 2)
{
this.func_72567_b(new Packet3Chat(ChatMessageComponent.func_111077_e("chat.cannotSend").func_111059_a(EnumChatFormatting.RED)));
@@ -1009,6 +1013,11 @@
@@ -1013,6 +1017,11 @@
}
public void func_72501_a(Packet250CustomPayload p_72501_1_)
@@ -37,9 +37,9 @@
{
DataInputStream datainputstream;
ItemStack itemstack;
@@ -1173,4 +1182,18 @@
}
}
@@ -1182,4 +1191,18 @@
{
return this.field_72576_c;
}
+
+
@@ -7,7 +7,7 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.io.BufferedOutputStream;
@@ -386,6 +387,7 @@
@@ -392,6 +393,7 @@
if (this.field_74472_n && this.field_74473_o.isEmpty())
{
this.field_74485_r.func_72515_a(this.field_74481_v, this.field_74480_w);
@@ -7,9 +7,9 @@
public abstract class NetHandler
{
@@ -375,4 +377,8 @@
@@ -382,4 +384,8 @@
{
this.func_72509_a(p_110773_1_);
return false;
}
+
+ public abstract void handleVanilla250Packet(Packet250CustomPayload payload);
@@ -7,5 +7,5 @@
- func_73285_a(131, true, false, Packet131MapData.class);
+ func_73285_a(131, true, true, Packet131MapData.class);
func_73285_a(132, true, false, Packet132TileEntityData.class);
func_73285_a(133, true, false, Packet133TileEditorOpen.class);
func_73285_a(200, true, false, Packet200Statistic.class);
func_73285_a(201, true, false, Packet201PlayerInfo.class);
@@ -21,12 +21,12 @@
+ this.vanillaCompatible = FMLNetworkHandler.vanillaLoginPacketCompatibility();
+ }
public Packet1Login(int p_i3327_1_, WorldType p_i3327_2_, EnumGameType p_i3327_3_, boolean p_i3327_4_, int p_i3327_5_, int p_i3327_6_, int p_i3327_7_, int p_i3327_8_)
public Packet1Login(int p_i1440_1_, WorldType p_i1440_2_, EnumGameType p_i1440_3_, boolean p_i1440_4_, int p_i1440_5_, int p_i1440_6_, int p_i1440_7_, int p_i1440_8_)
{
@@ -29,6 +36,7 @@
this.field_73556_g = (byte)p_i3327_7_;
this.field_73562_h = (byte)p_i3327_8_;
this.field_73560_c = p_i3327_4_;
this.field_73556_g = (byte)p_i1440_7_;
this.field_73562_h = (byte)p_i1440_8_;
this.field_73560_c = p_i1440_4_;
+ this.vanillaCompatible = false;
}
@@ -7,7 +7,7 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.awt.GraphicsEnvironment;
@@ -366,7 +367,11 @@
@@ -368,7 +369,11 @@
{
if (this.func_71197_b())
{
@@ -19,7 +19,7 @@
for (long j = 0L; this.field_71317_u; this.field_71296_Q = true)
{
@@ -405,6 +410,7 @@
@@ -407,6 +412,7 @@
Thread.sleep(1L);
}
@@ -27,7 +27,7 @@
}
else
{
@@ -413,6 +419,10 @@
@@ -415,6 +421,10 @@
}
catch (Throwable throwable)
{
@@ -38,7 +38,7 @@
throwable.printStackTrace();
this.func_98033_al().func_98234_c("Encountered an unexpected exception " + throwable.getClass().getSimpleName(), throwable);
CrashReport crashreport = null;
@@ -443,6 +453,10 @@
@@ -445,6 +455,10 @@
{
try
{
@@ -49,7 +49,7 @@
this.func_71260_j();
this.field_71316_v = true;
}
@@ -452,6 +466,8 @@
@@ -454,6 +468,8 @@
}
finally
{
@@ -58,7 +58,7 @@
this.func_71240_o();
}
}
@@ -468,8 +484,10 @@
@@ -470,8 +486,10 @@
public void func_71217_p()
{
@@ -69,7 +69,7 @@
++this.field_71315_w;
if (this.field_71295_T)
@@ -515,6 +533,7 @@
@@ -517,6 +535,7 @@
this.field_71304_b.func_76319_b();
this.field_71304_b.func_76319_b();
@@ -77,7 +77,7 @@
}
public void func_71190_q()
@@ -542,6 +561,7 @@
@@ -544,6 +563,7 @@
}
this.field_71304_b.func_76320_a("tick");
@@ -85,7 +85,7 @@
CrashReport crashreport;
try
@@ -566,6 +586,7 @@
@@ -568,6 +588,7 @@
throw new ReportedException(crashreport);
}
@@ -93,7 +93,7 @@
this.field_71304_b.func_76319_b();
this.field_71304_b.func_76320_a("tracker");
worldserver.func_73039_n().func_72788_a();
@@ -693,7 +714,7 @@
@@ -695,7 +716,7 @@
public String getServerModName()
{
Loaded 100 of 355 files, more files were not shown because too many files have changed in this diff. Show more