Jump to content

DamnRelentless

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by DamnRelentless

  1. 5 hours ago, diesieben07 said:

    Some recent version seems to have changed the default way IntelliJ compiles Gradle project. It used to be that it still used the IntelliJ build system, which puts resources and classes in one folder. Now "Delegate to gradle" seems to be the default, and gradle puts resources and classes in two separate folders.

    Make sure to set IntelliJ to not delegate to Gradle (https://www.jetbrains.com/help/idea/work-with-gradle-projects.html#delegate_build_actions).

    This is the solution. It works flawlessly now. Thank you very much!

    Interesting that this isn't written somewhere in any guide or the forge documentation.

  2. 4 hours ago, diesieben07 said:

    After finding out your example is not on master...

     

    I agree with Daemon. Please provide a test case with a stock build.gradle and without all that... junk in there.

    I updated the repository to a state where we didn't use such a filled build.gradle. Now it's the one which is generated by default.

    I should mention that this seems to occur with IntelliJ Ultimate only as far as I know.

    It's the minecraftforge branch again.

  3. Just now, DaemonUmbra said:

    Is the repo you linked the mod you're having this issue with?

    Yes.

    But I could also create one from scratch and the same thing would happen. I could also fork a popular mod and the same would happen. It's always like that in IntelliJ.

    No offense but you should maybe read the text again. I already answered all these questions.

  4. 8 minutes ago, DaemonUmbra said:

    To me, so much of that build script looks like stuff that doesn't need to be done.

    You can ignore the build script. It also didn't work with the standard one that is generated when you initiate the project.

    You should focus on the issue I described.

    Edit: I would also be happy if you suggest improvements for the build.gradle.

  5. Hey guys,

     

    after some weeks of getting experienced with Minecraft modding, I want to submit an issue here that occurs when you use the IDE IntelliJ for your mods.

    I started with a very basic mod to implement my own items. Therefor, I had to learn about modding and first of all, gradle.

     

    Since I am no Java newbie, I know how projects were structured and how to handle with IDEs. I've always used IntelliJ. Eclipse is good and has a ton of

    features but I am still preferring IntelliJ. So here is the problem.

     

    There are several articles and forum topics mentioning the setup of workspaces for your mods in IntelliJ. This is also one of the topics in the official

    Minecraft Forge documentation. The steps to setup such a workspace aren't hard and were done very fast. But when I tried to test my mod, I ran into the

    first issues.

     

    The textures simply didn't load and I couldn't explain why this happens. I checked every file I wrote at least 10 times, I checked the textures, I

    copied whole repositories from people that offered Minecraft modding tutorials, I even forked famous mods just to see how they handle their item

    implementation and why my textures weren't working. Nothing worked. I always got the famous purple-black texture ingame and several errors about

    missing textures and models. Since I realized that not even my localization file was being loaded, my assumption was that the assets folder wasn't loaded

    at all and when I tested it with some log messages, my assumption was quickly confirmed.

     

    Nothing what I did seemed to fix this issue and I was about to give up but after some hours of searching through all the internet pages I've found about

    that issue or even about little keywords, I finally found a little post about IntelliJ messing around with the assets folder.

     

    There is a simple solution. You can put the following code at the end of your build.gradle and everything will work perfectly fine:

    sourceSets { main { output.resourcesDir = output.classesDir } }

    No errors, no warnings, all textures instantly loaded, all models loaded, everything was localized.

     

    So... why do I post this?

    There is still something wrong. Why does not a single post mention this code? Why is it marked as deprecated? Why do no popular mods use this code

    in their build.gradle?

     

    Well, most mod creators use Eclipse, that's for sure and Eclipse doesn't have this issue. Lucky for them but what about modders that actually use

    IntelliJ and don't have this issue?

     

    I quickly realized that this code might help with the local testing environment but you can't build your mod with it. It will give you an error.

    You can only build your mod when you remove it again but the local client instance doesn't work then. Interestingly when I build the mod, the assets

    are copied just fine and everything works in the real game when you load the mod. However, you can't get working textures in the IDE when

    you don't put this code in your build.gradle.

     

    So what is the solution of this? How do you get IntelliJ to run without problems if you want to test AND build within the same project.

    The only thing that comes to my mind would be a work around to load an artifact whenever you start your client which copies the assets

    manually but that sounds too difficult for making a Minecraft mod. I am open for suggestions, thanks for reading.

     

    Greetz,

    Relentless

     

    Solution for this problem:

     

    • Like 2
  6. 6 hours ago, SerpentDagger said:

    In Eclipse, at least, when I add a file to the project without explicitly doing so through Eclipse itself, it doesn't register that there exists a new file, or even that it's out of sync with the reality of the situation, until I forcibly remind it of the fact: either through renaming one of the folders containing the unnoticed file, or perhaps through restarting the program (although I'm unsure of the merits of that method, as I always use the former due to its convenience).

     

    6 hours ago, Animefan8888 said:

    In eclipse you can just right click on the folder or the whole project and click refresh.

    Well, using IntelliJ, there is a Sync button when you rightclick a file. Sadly although I did this with the texture and the whole project, this doesn't change anything. I also reloaded the project through the gradle reload option with no good result. Anything else I could try? I am really running against a wall here.

  7. 1 hour ago, SerpentDagger said:

    From your GitHub page, it looks to me that everything is in order. Have you made sure your development environment is properly in sync with the file system? I had some trouble with that at one point.

    I think so. I am using IntelliJ. What do you mean could be set up wrong that's causing this?

  8. Hey there,

     

    I recently started with Minecraft Modding. To learn all the basics, I started to implement a new item. That sounded simple to me but I ran into an issue.

    My game loads fine with my mod but I get an error since my item texture isn't able to load. I just can't figure out why. Can anyone help me with that?

     

    Here is the error: https://pastebin.com/6PE6EePJ

    Here is my code: https://github.com/DAmNRelentless/TestingAMod

×
×
  • Create New...

Important Information

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