ElectricalAge
ElectricalAge copied to clipboard
NoSuchMethodError setUnlocalizedName 1.14.2
I've been running into a problem when trying to add the Electrical Age mod to Eclipse for editing. Or a few bugs, I guess.
I get a lot of buildpath errors for weird libraries I've never heard of, and can't find documentation on how to set it up. I'm just trying to change a single recipe in the mod for personal use.
So what I tried instead was to see if the Source itself was working. So I downloaded the source build built it with ./gradlew build and I keep getting an error when doing that. The error is:
java.lang.NoSuchMethodError: net.minecraft.item.Item.func_77655_b(Ljava/lang/String;)Lnet/minecraft/item/Item; at mods.eln.Eln.preInit(Eln.java:496) ~[Eln.class:?]
Which refers to this line in Eln.java:
Item itemCreativeTab = new Item().setUnlocalizedName("eln:elncreativetab").setTextureName("eln:elncreativetab");
So, given that it reads from left to right, the supposed "method not found" is setUnlocalizedName, which most certainly exists for the Item class. So I'm wondering if it's a mapping problem? I don't know anything about mappings or how to set them up, but I just downloaded the Source for 1.7.10 - the same source that is in the official release.
Attempts to fix the build path by adding the project in Eclipse scramble the mod beyond all belief and just break everything.
I even tried to edit the recipe by just editing Eln.java in Notepad++ and building, but I still get the same method not found error. So is it something to do with build.gradle? I can post that code if that helps.
Things I've tried:
-
Adding the source project to Eclipse
-
Fixing build path errors in Eclipse
-
Adding all Forge classpath entries to the ELN one and removing duplicates.
-
Building from source - Unmodded!
-
Building from source - Modded
-
Modding in a regular text editor
-
Adding the ELN **/libs** to my own **/libs** folder
-
Adding ELN **/libs** to Eclipse and making as source
-
Adding ELN **/libs** to Libraries in build path
-
Removing all ELN **/libs**
-
Checking for anything referring to mappings or a specific Forge version in **gradle.build** and changing accordingly
-
Adding the normal, non-source ELN 1.14.2, compiled .jar mod to **./eclipse/mods/** (definitely mapping issue?)
My Forge version: 1.7.10-10.13.4.1614 -- Does work in regular Minecraft game, no errors.
Other Mods: Carpenter's Blocks v3.3.8.1 - 1.7.10 My own mod that just adds 4 decorative block recipes. Nothing fancy.
Please be gentle, I've only started modding last week :) This is my first time on GitHub too, so sorry if my post isn't up to standard.
Update: I may be the guy that I hate myself. I didn't "rtfm" and I may have compiled wrong. I'm about to find out.
Sometimes I need to take my own advice and read the manual. Apparently, it's ./gradlew unzipTutoMap runClient
My bad, I deeply apologize, ignore this issue. I'm an idiot. Publicly declared.
public static idiotBoolean Me (boolean didntReadManual) { if (didntReadManual) { return true; } return false; }
Nevermind, that's not the case at all. It just won't build, period. Even when I run it the other way, it won't run with any mods.
Followed instructions in both ELN Readme and Forge Readme, and I also tried Forge 1.7.10-10.13.2.1240 as seen in the ELN root folder.
Nothing will build. It works when I run ./gradlew runClient, but not with ANY other mod.
And trying to setup ELN in Eclipse still fails with the same problems, even when setup through Forge 1.7.10-10.13.2.1240.
So it's not a mappings issue.
It continues to tell me that the setUnlocalizedName method is not found, as originally.
1.14.2 is for 1.7.10, right? Cause I've been playing with it for months. Somehow the Src.zip does not equal the .jar download.
Alright, I got some errors about missing textures. I hunted down the textures and found they were .xcf files in textures/blocks and textures/items. So I changed the gradle.build to include them. I also changed it to include all .pngs in /models just in case.
I hope this works.
Wish me luck, because I'm a noob and have no idea what I'm doing and this could boom boom my PC. I don't even know what gradle is and somehow I'm supposed to tell it what to do. Oh well. * fingers crossed *
Alright, that didn't work.
Please don't tell me I need Java 6...
You can't even download Java 6 anymore. Not even with an Oracle account.
And if I need Java 6, then why does ELN run swell in the shipped game with 8u25?
I have Java 8u161. Oracle doesn't even allow you to downgrade to u25.
Is developing for Minecraft even possible? Does Mojang care?
`Description Resource Path Location Type The type org.apache.logging.log4j.Logger cannot be resolved. It is indirectly referenced from required .class files SimpleComponentTickHandler.java /ElectricalAge - Copy/src/api/java/li/cil/oc/common/asm line 1 Java Problem
Description Resource Path Location Type The project was not built since its build path is incomplete. Cannot find the class file for org.apache.logging.log4j.Logger. Fix the build path then try building this project ElectricalAge - Copy Unknown Java Problem
`
Hi,
It's not too difficult to compile last I did it. One thing worth mentioning is to run ./gradlew setupDecompWorkspace (or something to that effect). I also know that most people use intellij idea and not eclipse. I don't know what Eclipses support for kotlin files is.
You should use the latest version of forge to compile. I think it's something like 1614. The latest alpha build from their website is rather stable.
Good luck!
(Btw, we're in #electricalage on Rizon if you use IRC)
On Fri, Mar 30, 2018, 6:49 AM John Lardinois [email protected] wrote:
Nevermind, that's not the case at all. It just won't build, period. Even when I run it the other way, it won't run with any mods.
Followed instructions in both ELN Readme and Forge Readme, and I also tried Forge 1.7.10-10.13.2.1240 as seen in the ELN root folder.
Nothing will build. It works when I run ./gradlew runClient, but not with ANY other mod.
And trying to setup ELN in Eclipse still fails with the same problems, even when setup through Forge 1.7.10-10.13.2.1240.
So it's not a mappings issue.
It continues to tell me that the setUnlocalizedName method is not found, as originally.
1.14.2 is for 1.7.10, right? Cause I've been playing with it for months. Somehow the Src.zip does not equal the .jar download.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Electrical-Age/ElectricalAge/issues/841#issuecomment-377500567, or mute the thread https://github.com/notifications/unsubscribe-auth/ANedSfk4PxqVWQ1JLEkSFl3HIdIJKhQLks5tjg2sgaJpZM4TBVRg .
Oh, and I use the latest version of Java 8. Don't use Java 9, and I don't think you can go below Java 7 with this particular version of Forge.
So I just went from start to finish: (cloning to running the client in deobf)
I'm on a Linux box, but the instructions are pretty similar for Windows IIRC.
I did chop out a bit of errors that pop up and removed large blocks of text where it was compiling or downloading to make it more readable. I put comments in with [comment] through the process.
If you run ./gradlew jar
instead of ./gradlew runClient
, you will compile a jar that can be found in ./build/libs/
that can be used in your normal minecraft client or server with Forge installed.
There are a few more steps to make it play nice with your IDE, but that's nothing special from Forge, so you can just read their doc and have integration. IIRC with Idea, you can just import the repo as a new project with existing sources once you've cloned it, and then you can run ./gradlew genIntellijRuns
once you've created the project files for idea. There's a similar one for Eclipse called ./gradlew eclipse
(which may/may not be all you need to get running, read the forge docs).
Cloning GitHub repo, changing directories, listing files
Note: This is if you have git SSH configured. Most users want to use https://github.com/Electrical-Age/ElectricalAge.git
instead of [email protected]:Electrical-Age/ElectricalAge.git
when using git clone
. So you probably want to replace the first command here with git clone https://github.com/Electrical-Age/ElectricalAge.git
jared@jtop:~/Projects$ git clone [email protected]:Electrical-Age/ElectricalAge.git
Cloning into 'ElectricalAge'...
remote: Counting objects: 26787, done.
remote: Total 26787 (delta 0), reused 0 (delta 0), pack-reused 26787
Receiving objects: 100% (26787/26787), 81.74 MiB | 15.93 MiB/s, done.
Resolving deltas: 100% (16913/16913), done.
jared@jtop:~/Projects$ cd ElectricalAge/
jared@jtop:~/Projects/ElectricalAge$ ls
build.gradle libs
changelog.md LICENSE-fml.txt
CONTRIBUTING.md LICENSE.md
CREDITS-fml.txt MinecraftForge-Credits.txt
forge-1.7.10-10.13.2.1240-changelog.txt MinecraftForge-License.txt
gradle README.md
gradle.properties script
gradlew shell.nix
gradlew.bat src
jared@jtop:~/Projects/ElectricalAge$
SetupDecompWorkspace
jared@jtop:~/Projects/ElectricalAge$ ./gradlew setupDecompWorkspace
[Downloads Dependencies]
:extractMcpData
:getVersionJson
:extractUserDev
[Downloads Stuff]
:genSrgs
:extractNatives
[Downloads Stuff]
:getAssetsIndex
:getAssets
Current status: 5/686 0%
Current status: 123/686 17%
Current status: 283/686 41%
Current status: 387/686 56%
Current status: 469/686 68%
Current status: 532/686 77%
Current status: 629/686 91%
:makeStart
[Downloads Dependencies]
:downloadMcpTools
:downloadClient
:downloadServer
:mergeJars
:deobfuscateJar
Applying SpecialSource...
Applying Exceptor...
:decompile
:processSources
Injecting fml files
Applying fml patches
Applying forge patches
:remapJar
:extractMinecraftSrc
:recompMinecraft
:repackMinecraft
:setupDecompWorkspace
BUILD SUCCESSFUL
Total time: 2 mins 49.907 secs
jared@jtop:~/Projects/ElectricalAge$
Build
jared@jtop:~/Projects/ElectricalAge$ ./gradlew build
:compileApiKotlin
[Downloads Stuff]
:copyApiKotlinClasses
:processApiResources UP-TO-DATE
:apiClasses
:compileKotlin
:sourceMainJava
:compileJava
:copyMainKotlinClasses
:processResources
:classes
:updateMasterLanguageFile
[Parses Source Files]
:compileTestKotlin UP-TO-DATE
:compileTestJava UP-TO-DATE
:copyTestKotlinClasses
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:extractMcpData UP-TO-DATE
:getVersionJson
:extractUserDev UP-TO-DATE
:genSrgs SKIPPED
:reobf
:assemble
:check UP-TO-DATE
:build
BUILD SUCCESSFUL
Total time: 29.844 secs
jared@jtop:~/Projects/ElectricalAge$
Run Client
jared@jtop:~/Projects/ElectricalAge$ ./gradlew runClient
:compileApiKotlin
:compileApiJava UP-TO-DATE
:copyApiKotlinClasses UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:compileKotlin UP-TO-DATE
:sourceMainJava UP-TO-DATE
:compileJava UP-TO-DATE
:copyMainKotlinClasses UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:updateMasterLanguageFile
[Parsing Source Files (again)]
:jar
:getVersionJson
:extractUserDev UP-TO-DATE
:extractNatives UP-TO-DATE
:getAssetsIndex
:getAssets
:makeStart SKIPPED
:runClient
[Typical client startup, Minecraft shows up and you can play]
You, sir, are a life saver.
I had to do a few extra steps to get it working, but... I got it working in Eclipse with other mods!
Unfortunately, I am leaving for the weekend in just a few minutes and I have to fold laundry yet, so I will post my solution when I get back on Monday.
But for now - there is a way! And it's easier than one might think. The solution really shows I'm a noob once you hear it lol * cringes at self *
It's alright, we all have to start somewhere. ;)
sent from Jared's phone
On Fri, Mar 30, 2018, 9:07 AM John Lardinois [email protected] wrote:
You, sir, are a life saver.
I had to do a few extra steps to get it working, but... I got it working in Eclipse with other mods!
Unfortunately, I am leaving for the weekend in just a few minutes and I have to fold laundry yet, so I will post my solution when I get back on Monday.
But for now - there is a way! And it's easier than one might think. The solution really shows I'm a noob once you hear it lol * cringes at self *
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Electrical-Age/ElectricalAge/issues/841#issuecomment-377520395, or mute the thread https://github.com/notifications/unsubscribe-auth/ANedSfzkgLEAdcNBU4EfhCCr6AbvnzQlks5tji4FgaJpZM4TBVRg .
You, sir, are a life saver.
I had to do a few extra steps to get it working, but... I got it working in Eclipse with other mods!
Unfortunately, I am leaving for the weekend in just a few minutes and I have to fold laundry yet, so I will post my solution when I get back on Monday.
But for now - there is a way! And it's easier than one might think. The solution really shows I'm a noob once you hear it lol * cringes at self *
Good day! I find myself currently in the same place... Trying to build ELN but it fails at exactly the same point. If you have returned from your weekend and still recall how you got it to build, can you maybe share the answer?
Are you using the latest copy from GitHub? I can try and replicate the issue. I have been able to build the mod since this issue has been opened though so I suspect I may have something cached that is otherwise somewhat inaccessible. Make sure you're using the latest commits.
I've been trying to build the 1.14.2 branch in it's current state. The copy I'm trying to run is less than a week old.