Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [Solved] Help with Intellij and resources
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
SuperKamiCatbug

[Solved] Help with Intellij and resources

By SuperKamiCatbug, November 11, 2014 in Modder Support

  • Reply to this topic
  • Start new topic
  • Prev
  • 1
  • 2
  • Next
  • Page 2 of 2  

Recommended Posts

SuperKamiCatbug    2

SuperKamiCatbug

SuperKamiCatbug    2

  • Tree Puncher
  • SuperKamiCatbug
  • Members
  • 2
  • 26 posts
Posted November 12, 2014

I think all the code and names are correct, since the jar file from gradlew build works with no problems.

  • Quote

Share this post


Link to post
Share on other sites

SuperKamiCatbug    2

SuperKamiCatbug

SuperKamiCatbug    2

  • Tree Puncher
  • SuperKamiCatbug
  • Members
  • 2
  • 26 posts
Posted November 16, 2014

I spent a while messing the the debugger to see how FML is loading the mod and it's resources. I was able to find out that it loads the mod with directory build/classes, which is fine...but then when loading resource packs in which to find textures, the same mod location is added as a resource path. Though both build/classes and build/resources are in the classpath, build/resources is never used because no mods were found in it, while build/classes is used as the resource path because it is the mod's class path. This would explain why compiling to a .jar works, because then the class path and resource path are the same. To test, I copied my resources to the build/classes folder, and it worked. How to fix this, though, I have no clue >.>

  • Quote

Share this post


Link to post
Share on other sites

david476    10

david476

david476    10

  • Creeper Killer
  • david476
  • Members
  • 10
  • 238 posts
Posted November 16, 2014

And this is why eclipse is better :) (I guess just personal preference, but seems to have more features and support) why did you switch?

  • Quote

Share this post


Link to post
Share on other sites

SuperKamiCatbug    2

SuperKamiCatbug

SuperKamiCatbug    2

  • Tree Puncher
  • SuperKamiCatbug
  • Members
  • 2
  • 26 posts
Posted November 16, 2014

Aside from just wanting to try something new, I was also having difficulty getting the code completion in Eclipse to work the way I wanted it to. In IntelliJ it's working perfectly xD but otherwise no particular reason. Yes Eclipse does have lots of features, but I never really used any of them that IntelliJ doesn't have. I actually like the less feature-cluttered workspace lol

  • Quote

Share this post


Link to post
Share on other sites

SuperKamiCatbug    2

SuperKamiCatbug

SuperKamiCatbug    2

  • Tree Puncher
  • SuperKamiCatbug
  • Members
  • 2
  • 26 posts
Posted November 16, 2014

After looking more closely at why it works in Eclipse, I noticed that Eclipse puts everything into a bin folder, both compiled classes and resources. This would make the class path and resource path the same, and so it works properly. So I guess now the question is, how can I set up IntelliJ to put classes and resources in the same directory?

  • Quote

Share this post


Link to post
Share on other sites

brandon3055    55

brandon3055

brandon3055    55

  • Diamond Finder
  • brandon3055
  • Forge Modder
  • 55
  • 444 posts
Posted November 16, 2014

Most of this is beyond my current knowledge so this may be a stupid question but i noticed toy setup your workspace in a way i am not familiar with.

 

the en_US.lang file is in src\main\resources\assets\tutorialorange\lang and the texture is in src\resources\assets\tutorialorange\blocks (tutorialorange is the mod id). IntelliJ was setup by running gradlew setupDecompWorkspace --refresh-dependencies, importing the build.gradle file into IntelliJ as a project, and then running gradlew gIR to set up the run commands.

 

Have you tried creating a fresh workspace and using

gradlew setupDecompWorkspace

gradlew idea

 

  • Quote

Share this post


Link to post
Share on other sites

SuperKamiCatbug    2

SuperKamiCatbug

SuperKamiCatbug    2

  • Tree Puncher
  • SuperKamiCatbug
  • Members
  • 2
  • 26 posts
Posted November 16, 2014

Gave it a try, but it didn't work.

  • Quote

Share this post


Link to post
Share on other sites

larsgerrits    510

larsgerrits

larsgerrits    510

  • Reality Controller
  • larsgerrits
  • Members
  • 510
  • 3455 posts
Posted November 16, 2014

Use diesieben07's tutorial for setting up Forge with IntelliJ. Tutorial found in the tutorials section.

  • Quote

Share this post


Link to post
Share on other sites

SuperKamiCatbug    2

SuperKamiCatbug

SuperKamiCatbug    2

  • Tree Puncher
  • SuperKamiCatbug
  • Members
  • 2
  • 26 posts
Posted November 16, 2014

Tried that too, no change  :(

  • Quote

Share this post


Link to post
Share on other sites

SuperKamiCatbug    2

SuperKamiCatbug

SuperKamiCatbug    2

  • Tree Puncher
  • SuperKamiCatbug
  • Members
  • 2
  • 26 posts
Posted November 18, 2014

Well I figured it out. I knew I must have been missing something obvious, and I was...IntelliJ 14 places resources in it's own resource folder, while IntelliJ 13 places them in the classes folder. No tutorials I've seen mentioned a version, but I saw from screenshots that 13 was being used. I had just gone ahead and grabbed the latest though, and apart from the screen displayed when no projects are open, they look almost identical, so it took a while to notice. So yeah, fixed xD

  • Quote

Share this post


Link to post
Share on other sites

Ives    2

Ives

Ives    2

  • Tree Puncher
  • Ives
  • Members
  • 2
  • 8 posts
Posted November 25, 2014

Well I figured it out. I knew I must have been missing something obvious, and I was...IntelliJ 14 places resources in it's own resource folder, while IntelliJ 13 places them in the classes folder. No tutorials I've seen mentioned a version, but I saw from screenshots that 13 was being used. I had just gone ahead and grabbed the latest though, and apart from the screen displayed when no projects are open, they look almost identical, so it took a while to notice. So yeah, fixed xD

Very nice find! Did you solve it without downgrading to IntelliJ 13 or is downgrading necessary to fix this problem?

  • Quote

Share this post


Link to post
Share on other sites

TheGreyGhost    711

TheGreyGhost

TheGreyGhost    711

  • Reality Controller
  • TheGreyGhost
  • Members
  • 711
  • 2805 posts
Posted November 25, 2014

Well I figured it out. I knew I must have been missing something obvious, and I was...IntelliJ 14 places resources in it's own resource folder, while IntelliJ 13 places them in the classes folder. No tutorials I've seen mentioned a version, but I saw from screenshots that 13 was being used. I had just gone ahead and grabbed the latest though, and apart from the screen displayed when no projects are open, they look almost identical, so it took a while to notice. So yeah, fixed xD

Very nice find! Did you solve it without downgrading to IntelliJ 13 or is downgrading necessary to fix this problem?

This bloke came up with a fix

http://www.minecraftforge.net/forum/index.php/topic,25429.msg129629.html#msg129629

 

Well I figured it out. I knew I must have been missing something obvious,

 

You've got a funny definition of "obvious" I must say :)

 

-TGG

  • Quote

Share this post


Link to post
Share on other sites

SuperKamiCatbug    2

SuperKamiCatbug

SuperKamiCatbug    2

  • Tree Puncher
  • SuperKamiCatbug
  • Members
  • 2
  • 26 posts
Posted November 25, 2014

This bloke came up with a fix

http://www.minecraftforge.net/forum/index.php/topic,25429.msg129629.html#msg129629

 

Well I figured it out. I knew I must have been missing something obvious,

 

You've got a funny definition of "obvious" I must say :)

 

-TGG

 

Interesting...though I don't know enough about gradle's syntax to really know what that code addition does xD

I was looking around the run configurations and it looked like it might be possible to write a short script that copies resources over, and have it run that script after make. Didn't look further into that though, since I have no problems with version 13.

As for my definition of obvious...from experience, I've had different software versions cause strange behavior like this many times before, so it's left me feeling like I should have thought of it earlier lol

  • Quote

Share this post


Link to post
Share on other sites

MrIbby    4

MrIbby

MrIbby    4

  • Tree Puncher
  • MrIbby
  • Members
  • 4
  • 26 posts
Posted December 7, 2014

For my fellow Googlers: assets are cAsE sEnSiTiVe.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45628 posts
Posted December 8, 2014

That was not the problem in this thread. Read here: http://www.minecraftforge.net/forum/index.php/topic,21354.0.html

  • Quote

Share this post


Link to post
Share on other sites
  • Prev
  • 1
  • 2
  • Next
  • Page 2 of 2  

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • DavidM
      attackEntityFrom() doesn't work. 1.12.2

      By DavidM · Posted 6 minutes ago

      No. You are still reaching across logical sides. Use packets.
    • Iceo
      1.12.2 Server Crash with Applied Energistics 2

      By Iceo · Posted 20 minutes ago

      Is there a way to fix this?
    • d0sboots
      "gradlew eclipse" in a clean forge 1.13.2 fails

      By d0sboots · Posted 27 minutes ago

      I tried gradlew build --refresh-dependencies, it doesn't change anything. Remember, this happens even if the .gradle directory is completely deleted.   It looks like this got broken with https://github.com/MinecraftForge/ForgeGradle/pull/617. It appears to already by fixed in https://github.com/MinecraftForge/ForgeGradle/pull/635, but that PR hasn't been merged yet.
    • Rixxaw
      Minecraft Core Issue/Forge Issue???

      By Rixxaw · Posted 38 minutes ago

      Download the Twitch App, and go to "Mods" then select a modpack from the list of packs there.  Assuming you are attempting to "Create" your own modpack.  There are thousands of modpacks already created and it is very likely you will find one with the mods you want.  If  Not, look for a Vanilla+ pack, and then unlock the profile, and add whatever mods you want.  The App will make sure they are of the right version and what not.  Thus you essentially create your own pack that way in a sense.
    • Iceo
      1.12.2 Server Crash with Applied Energistics 2

      By Iceo · Posted 39 minutes ago

      I dont know what you mean by OpenJDK don't you use that for developing mods?
  • Topics

    • AntonBespoiasov
      5
      attackEntityFrom() doesn't work. 1.12.2

      By AntonBespoiasov
      Started 23 hours ago

    • Iceo
      4
      1.12.2 Server Crash with Applied Energistics 2

      By Iceo
      Started 1 hour ago

    • d0sboots
      8
      "gradlew eclipse" in a clean forge 1.13.2 fails

      By d0sboots
      Started December 2

    • Aaronade
      2
      Minecraft Core Issue/Forge Issue???

      By Aaronade
      Started 4 hours ago

    • runescaper
      7
      Minecraft Forge Mods Won't Load for Me

      By runescaper
      Started 2 hours ago

  • Who's Online (See full list)

    • kangeloDark
    • DavidM
    • imacatlolol
    • fuzzyweapon
    • plugsmustard
    • Lordyammer
    • Iceo
    • DaemonUmbra
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [Solved] Help with Intellij and resources
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community