Jump to content

Adding ComputerCraft to Gradle Fails


Assossagpb

Recommended Posts

I am creating a ComputerCraft peripheral mod and I need to test it. I have added computercraft.jar to my referenced libraries, but now it throws an error every time I try to run MC. I have tried deobfuscating ComputerCraft and it still does not work.

 

2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.99.19.964 for Minecraft 1.6.4 loading
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre8
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
2014-06-17 20:09:36 [iNFO] [sTDOUT] Loaded 40 rules from AccessTransformer config file fml_at.cfg
2014-06-17 20:09:36 [sEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work!
2014-06-17 20:09:36 [sEVERE] [ForgeModLoader] The minecraft jar file:/F:/.gradle/caches/minecraft/net/minecraftforge/forge/1.6.4-9.11.1.964/forge-1.6.4-9.11.1.964-mcp.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!
2014-06-17 20:09:36 [sEVERE] [ForgeModLoader] FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!
2014-06-17 20:09:36 [sEVERE] [ForgeModLoader] Technical information: ClientBrandRetriever was at jar:file:/F:/.gradle/caches/minecraft/net/minecraftforge/forge/1.6.4-9.11.1.964/forge-1.6.4-9.11.1.964-mcp.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it
2014-06-17 20:09:36 [sEVERE] [ForgeModLoader] FML appears to be missing any signature data. This is not a good thing
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
2014-06-17 20:09:36 [iNFO] [sTDOUT] Loaded 110 rules from AccessTransformer config file forge_at.cfg
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
2014-06-17 20:09:36 [iNFO] [ForgeModLoader] Launching wrapped minecraft {net.minecraft.client.main.Main}
2014-06-17 20:09:37 [iNFO] [Minecraft-Client] Setting user: Player955
2014-06-17 20:09:37 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0
2014-06-17 20:09:38 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default
2014-06-17 20:09:39 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization
2014-06-17 20:09:39 [iNFO] [sTDOUT] MinecraftForge v9.11.1.964 Initialized
2014-06-17 20:09:39 [iNFO] [ForgeModLoader] MinecraftForge v9.11.1.964 Initialized
2014-06-17 20:09:39 [iNFO] [sTDOUT] Replaced 112 ore recipies
2014-06-17 20:09:39 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization
2014-06-17 20:09:39 [iNFO] [ForgeModLoader] Reading custom logging properties from F:\WinDesktop\AssossasPeripherals\eclipse\config\logging.properties
2014-06-17 20:09:39 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
2014-06-17 20:09:39 [iNFO] [ForgeModLoader] Searching F:\WinDesktop\AssossasPeripherals\eclipse\mods for mods
2014-06-17 20:09:39 [iNFO] [assossa.peripherals] Mod assossa.peripherals is missing the required element 'name'. Substituting assossa.peripherals
2014-06-17 20:09:39 [WARNING] [assossa.peripherals] Mod assossa.peripherals is missing the required element 'version' and no fallback can be found. Substituting '1.0'.
2014-06-17 20:09:40 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.Start. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!
2014-06-17 20:09:40 [sEVERE] [ForgeModLoader] FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!
2014-06-17 20:09:41 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load
2014-06-17 20:09:41 [iNFO] [mcp] Activating mod mcp
2014-06-17 20:09:41 [iNFO] [FML] Activating mod FML
2014-06-17 20:09:41 [iNFO] [Forge] Activating mod Forge
2014-06-17 20:09:41 [iNFO] [assossa.peripherals] Activating mod assossa.peripherals
2014-06-17 20:09:41 [iNFO] [ComputerCraft] Activating mod ComputerCraft
2014-06-17 20:09:41 [WARNING] [assossa.peripherals] Mod assossa.peripherals is missing a pack.mcmeta file, things may not work well
2014-06-17 20:09:41 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:assossa.peripherals, FMLFileResourcePack:ComputerCraft
2014-06-17 20:09:41 [iNFO] [ForgeModLoader] Registering Forge Packet Handler
2014-06-17 20:09:41 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler
2014-06-17 20:09:41 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2014-06-17 20:09:41 [sEVERE] [assossa.peripherals] Skipping event FMLPreInitializationEvent and marking errored mod assossa.peripherals since required dependency ComputerCraft has errored
2014-06-17 20:09:41 [sEVERE] [ForgeModLoader] Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue
2014-06-17 20:09:41 [sEVERE] [ForgeModLoader] 
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{6.99.19.964} [Forge Mod Loader] (forge-1.6.4-9.11.1.964-mcp.jar) Unloaded->Constructed->Pre-initialized
Forge{9.11.1.964} [Minecraft Forge] (forge-1.6.4-9.11.1.964-mcp.jar) Unloaded->Constructed->Pre-initialized
ComputerCraft{1.63} [ComputerCraft] (ComputerCraft1.63DeObf.jar) Unloaded->Constructed->Errored
assossa.peripherals{1.0} [assossa.peripherals] (bin) Unloaded->Constructed->Errored
2014-06-17 20:09:41 [sEVERE] [ForgeModLoader] The following problems were captured during this phase
2014-06-17 20:09:41 [sEVERE] [ForgeModLoader] Caught exception from ComputerCraft
java.lang.NoSuchFieldError: field_76246_e
at dan200.computercraft.shared.computer.blocks.BlockComputer.<init>(BlockComputer.java:32)
at dan200.computercraft.shared.computer.blocks.BlockComputer.createComputerBlock(BlockComputer.java:25)
at dan200.computercraft.shared.proxy.ComputerCraftProxyCommon.registerItems(ComputerCraftProxyCommon.java:224)
at dan200.computercraft.shared.proxy.ComputerCraftProxyCommon.preInit(ComputerCraftProxyCommon.java:87)
at dan200.computercraft.ComputerCraft.preInit(ComputerCraft.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:523)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:197)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:108)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:493)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:175)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:473)
at net.minecraft.client.Minecraft.run(Minecraft.java:808)
at net.minecraft.client.main.Main.main(Main.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

 

 

Please Help!

Link to comment
Share on other sites

Do not deobfuscate ComputerCraft, because it do provides API. Download ComputerCraft (I'll call it "CC" next, OK?) 1.63

1. Assuming you already have your workspace set up, create a new folder named "/lib" in your project directory. That's the directory that contains your /bin, /build, /gradle, and /src folders, and now also has a /lib folder.

 

2. Place ComputerCraft1.63.jar into "/lib" you just created.

 

3. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then "Add External JARs" and find the binary CC file that you just placed in the /lib folder.

 

To add JavaDoc and API source code:

1. Open ComputerCraft1.63.jar with any 7zip or any other archivator, go to "api", there will be 2 folders: "doc" and "src". The first contains JavaDoc, the second source. Copy these folders to any folder.

2. Create 2 files called "ComputerCraft1.63JavaDoc.zip/jar" and "ComputerCraft1.63APISRC.zip/jar". Into the first file extract "doc" folder, then, open "src" folder, there you'll see "dan200" folder", add it into "ComputerCraft1.63APISRC.zip/jar".

 

3.Move "ComputerCraft1.63JavaDoc.zip/jar" and "ComputerCraft1.63APISRC.zip/jar" into /lib folder.

 

4. Open the "Referenced Libraries" tree in your package explorer, find "ComputerCraft1.63.jar" and right-click on it; go to "Properties" -> "External location" -> "External file" and navigate to wherever you stored the source file (ComputerCraft1.63APISRC.zip/jar), preferably right next to the binary in the /lib folder.

 

5. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then find ComputerCraft1.63.zip/jar, select "JavaDoc Location" and click "edit" and find the JavaDoc CC file that you just placed in the /lib folder.

 

6. Run your debug configuration and see if everything is still working; if so, great! If not, you may need to run setupDev and setupDecomp workspace one more time:

 

a. gradlew setupDevWorkspace

b. gradlew setupDecompWorkspace

c. gradlew eclipse // will vary depending on your IDE

 

Once you have the debug client working, you should see that both your mod and CC are loaded; if you start a new game, anything added by CC will be in that game as well and should be fully functional.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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