CausticLasagne Posted October 21, 2015 Share Posted October 21, 2015 I want to include the source (or SDK) for the use of RF in my mod (Similar to other mods and cross mod compatibility) In other words, I want to make my machines compatible with COFH's RF Energy. How would I go about doing this? I have tried already downloading cofhlib and I can't import it into my project, It says that there is no source linked, and as I can Imagine, this is because the files are already compiled. (I even went to project settings and added it as an external JAR. No avail.) Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 21, 2015 Author Share Posted October 21, 2015 I'm really tired and it's like 1 in the morn, so cya guys. I'll be online tomorrow after about 1000 (UTC +0800). Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
shadowfacts Posted October 21, 2015 Share Posted October 21, 2015 You can manually include the source in your mod. For other APIs/libraries you will need to use Gradle and Maven to include (and possibly shade) dependencies. Quote Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods Link to comment Share on other sites More sharing options...
Draco18s Posted October 21, 2015 Share Posted October 21, 2015 I'm really tired and it's like 1 in the morn, so cya guys. I'll be online tomorrow after about 1000 (UTC +0800). This is a forum, not a chat room. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
yorkeMC Posted October 22, 2015 Share Posted October 22, 2015 I want to include the source (or SDK) for the use of RF in my mod (Similar to other mods and cross mod compatibility) In other words, I want to make my machines compatible with COFH's RF Energy. How would I go about doing this? I have tried already downloading cofhlib and I can't import it into my project, It says that there is no source linked, and as I can Imagine, this is because the files are already compiled. (I even went to project settings and added it as an external JAR. No avail.) Refer to my post in your last thread. I accidentally replied there. Quote while(awake) { coffee++; } Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 22, 2015 Author Share Posted October 22, 2015 Ok, yorkeMC, I followed your advice, but I still can't get it to load. I have the jar in the libs folder but when I try to acces it it says: Source not found The JAR file CoFHLib-[1.7.10]1.0.3-175.jar has no source attachment. You can attach the source by clicking Attach Source below: Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
Elix_x Posted October 22, 2015 Share Posted October 22, 2015 To add other mod's api to you workspace, you have 2 options. -If you have java files in zip or simply in folder (unpacked) - in project folder, create folder src/api/java and drop apis (these files) in there. Then re-setup workspace (gradlew setupDecompWorkspace/setupDevWorkspace) . -If you have mods in jars, verify that you have dev verion of jars, then put jars in projectFolder/libs (crete one, if it does not exist) and re-setup your worspace. Quote Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 22, 2015 Author Share Posted October 22, 2015 Ok, Will do. Thanks for your help everyone! Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 22, 2015 Author Share Posted October 22, 2015 It didn't work, I ended up with 3000+ Errors in the package files and some java files. I also tried the jar method, but eclipse wouldn't recognize it. Am I doing something wrong? Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
Elix_x Posted October 22, 2015 Share Posted October 22, 2015 It didn't work, I ended up with 3000+ Errors in the package files and some java files. Can you show screenshot of project explorer in you ide, with api folder opened??? Quote Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 23, 2015 Author Share Posted October 23, 2015 Ok. Here you go. In the screenshot it shows my use of the COFH libraries and they are imported. Maybe you can spot something out of place? Image Link: Error 1 Description Resource Path Location Type Array constants can only be used in initializers BlockHelper.java /.org.eclipse.jdt.core.external.folders/src/main/java/cofh/lib/util/helpers line 45 Java Problem Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
Elix_x Posted October 23, 2015 Share Posted October 23, 2015 Array constants can only be used in initializers BlockHelper.java /.org.eclipse.jdt.core.external.folders/src/main/java/cofh/lib/util/helpers line 45 Java Problem Is that one of errors? Try to: reinstall your workspace anв refresh project. There's something strange with it... Quote Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 23, 2015 Author Share Posted October 23, 2015 I found the Issue, It was me using the incorrect COFH lib for the version of forge. I will upgrade to the latest and see what happens. Or.. I could downgrade COFH. I'm getting weird errors. BiMap map = ((BiMap) registry.registryObjects); RegistryNamespaced.underlyingIntegerMap.func_148746_a(object, id); 1. The field RegistrySimple.registryObjects is not visible RegistryUtils.java /.org.eclipse.jdt.core.external.folders/src/main/java/cofh/lib/util line 43 Java Problem Image Link: I found where these are declared, but I'm not sure how to access them. I've never had to deal with such tight coding before. Private, Protected, Inheritance. I hate 'em all. Too complicated. Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
shadowfacts Posted October 23, 2015 Share Posted October 23, 2015 No. What you're doing is very, very bad. You are copying the entirety of CoFH Lib, not just the API. This not only goes against the wishes of the CoFH team, but will likely cause many crashes. In order to use CoFH mods in the dev environment, you must copy the CoFH AT into src/api/resource/CoFH_at.cfg and re-setup your workspace. Quote Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 24, 2015 Author Share Posted October 24, 2015 @shadowfacts Ok, Thanks. I copied the text from the site (CoFH_at.cfg) and created a .cfg file and pasted it at the location. So this should work? I only want the API so machines and stuff can work properly. Also the Rand() function looks like fun. I've added a Thanks to you. UPDATE: It didn't work. I copied the text into C:\Test_Mod\src\api\java\resource\CoFH_at.cfg There is text in the file and no other CoFH libraries present in the project. Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
shadowfacts Posted October 24, 2015 Share Posted October 24, 2015 Unless you are including CoFH mods in your dev environment, you don't need the CoFH AT. Quote Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 24, 2015 Author Share Posted October 24, 2015 So... Copy the CoFH Lib files to my directory? I don't understand what to do. All I have is the Config file, the CoFH lib file and the CoFH jar file. Only the CoFH config file is where it's supposed to be. I'm preparing a Dropbox link to my entire project file. There is no src code at the moment until this cofh stuff is setup properly. Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
larsgerrits Posted October 24, 2015 Share Posted October 24, 2015 What are you guys even doing? Make a new folder called api inside the src folder. Inside that, make a folder called java . This is where the API code goes. Now copy the API (e.g. the RF API) to that folder. It will result in a structure like this: - src - main - java - [your own source code] - api - java - cofh - ... Why use the API folder? Gradle will compile your code with the API, but not include it in your own source. Quote Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/ Link to comment Share on other sites More sharing options...
shadowfacts Posted October 24, 2015 Share Posted October 24, 2015 That would work, but if OP's project is going to be standalone, the RF API would need to be included in his jar. OP: Create a fresh project. Copy the source code of the RF API into src/main/java. Then write your mod. You only need to include the CoFH AT if you are using CoFH mods in your development environment. Quote Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 24, 2015 Author Share Posted October 24, 2015 Okay, I only want my project to use the machines from thermal expansion, though it will not be a requirement for the mod to have thermal expansion installed. Users should be able to play the mod regardless of whether or not any CoFH mod is installed. Here is a Link to my current workspace: https://www.dropbox.com/s/xy6n1f0xtikov23/EpicFoodMod.zip?dl=0 It is a zip file and contains my active project, minus src code, cause I haven't written any. So yes @shadowfacts, that would make my project standalone I guess. The only question I have left is, Will it cause issues for someone who actually has CoFH installed? Update: All is working fine, though my question above still stands. Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
shadowfacts Posted October 24, 2015 Share Posted October 24, 2015 No it will not cause issues if someone has CoFH mods installed alongside yours, presuming you included the RF API correctly. In your case, you will need to add the CoFH AT to src/api/resources otherwise any CoFH mods you put in your dev env will crash. Quote Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods Link to comment Share on other sites More sharing options...
CausticLasagne Posted October 24, 2015 Author Share Posted October 24, 2015 Ok then. Thanks to everyone for your help. Watch out for my mod hitting the forums soon. It'll be a big one. Now, I've got a lot of work to do. CausticLasagne. Keep it Real! Quote ▒█▀▀▀█ █░░█ █▀▀█ █▀▀ █▀▀█ ▒█░▒█ █░░ ▀▀█▀▀ █▀▀█ █▀▀█ ▒█▀▄▀█ █▀▀ █▀▀▀ █▀▀█ ░█▀▀█ █░░░█ █▀▀ █▀▀ █▀▀█ █▀▄▀█ █▀▀ █ ░▀▀▀▄▄ █░░█ █░░█ █▀▀ █▄▄▀ ▒█░▒█ █░░ ░░█░░ █▄▄▀ █▄▄█ ▒█▒█▒█ █▀▀ █░▀█ █▄▄█ ▒█▄▄█ █▄█▄█ █▀▀ ▀▀█ █░░█ █░▀░█ █▀▀ ▀ ▒█▄▄▄█ ░▀▀▀ █▀▀▀ ▀▀▀ ▀░▀▀ ░▀▄▄▀ ▀▀▀ ░░▀░░ ▀░▀▀ ▀░░▀ ▒█░░▒█ ▀▀▀ ▀▀▀▀ ▀░░▀ ▒█░▒█ ░▀░▀░ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░░▀ ▀▀▀ ▄ Link to comment Share on other sites More sharing options...
Recommended Posts
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.