Jump to content

Recommended Posts

Posted

Hi guys,

 

So I'm confused as anything to what's going on as I've copied exactly what the example mod is doing.

 

I'm using Intellij Idea 15 Ultimate as my chosen IDE as it's free to me as a student and Eclipse is being stupid... Anyway, I've set up the Forge workspace up properly (of which I'm using 1.8.9-11.15.1.1722) and have my project exactly the same as the example mod (as previously said) but to clarify I've got:

 

Java -| <-- Set as Sources Root and this works fine as the mod shows in minecraft.

          |

          |--- com.jamierhys.comtech.main <-- where my main class is

 

Resources -| <-- Set as Resources Root but this is not working

                    |

                    |--- mcmod.info

 

As you can see, it's identical to what the example mod is but when I launch minecraft and click "mods", although the mod shows up correctly, it comes up with:

 

ComTech Mod
Version: 1.8.9-0.0.1
Mod State: Available

No mod information found
Ask your mod author to provide a mod mcmod.info file

 

And cannot figure out what's going on as this is the first time using Idea...

 

Anyone have any ideas? (Pun not intended)

Posted

I don't know IntelliJ, but I do know that the stock gradle.build file has some lines in it about ignoring mcmod.info. You might look at that and then post in the Gradle child forum if you want to change it.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

The:

idea { module { inheritOutputDirs = true; } }

 

If so, I did do that as I actually followed his tutorial to set it up in the first place.

 

Also, I have the directory set as a git repo... Could that be an issue?

Posted
  On 2/22/2016 at 12:23 AM, JamieEdwards said:

Turns out the Git repo isn't actually causing an issue as the mcmod.info still isnt being shown.

 

Did you re-syncronize the gradle build ? Also, try to run genIntellijRuns task if you didn't do it. :)

Squirrel ! Squirrel ! Squirrel !

Posted
  On 2/22/2016 at 1:09 PM, Major Squirrel said:

Did you re-syncronize the gradle build ? Also, try to run genIntellijRuns task if you didn't do it. :)

 

Re-synchronise... That's where I click the circular arrow icon in the gradle tab isn't it? If so I've pressed that every time I've done a task in the tutorial.

 

I've also run genIntellijRuns task every time the tutorial has stated too.

Posted
  On 2/22/2016 at 8:59 PM, JamieEdwards said:

  Quote

Did you re-syncronize the gradle build ? Also, try to run genIntellijRuns task if you didn't do it. :)

 

Re-synchronise... That's where I click the circular arrow icon in the gradle tab isn't it? If so I've pressed that every time I've done a task in the tutorial.

 

I've also run genIntellijRuns task every time the tutorial has stated too.

 

Well, I'm sorry, I don't know what to say. Here is a screen of my config if this can help you :

 

1456178497-config.png

 

However, do you have the same processResources as me in the build.gradle file ?

 

processResources
{
    // this will ensure that this task is redone when the versions change.
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    // replace stuff in mcmod.info, nothing else
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'
                
        // replace version and mcversion
        expand 'version':project.version, 'mcversion':project.minecraft.version
    }
        
    // copy everything else, thats not the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}

 

Finally, when you build a jar, I suppose your mcmod.info is not there ... ?

 

EDIT : using Intellij IDEA 15.0.3, build #IU-143.1821 for educational use only !

 

EDIT2 : the way I proceeded to make an Intellij Forge project is the following :

  • Get the forge files and put them in a folder
  • Run ./gradlew setupDecompWorkspace from console
  • Import project from Intellij using their gradle version and the build.gradle file
  • Add idea { module { inheritOutputDirs = true; } } to the build.gradle file without syncing
  • Run genIntellijRuns task from Intellij, it will normally ask you to reopen project, do it

 

May it helps you :)

Squirrel ! Squirrel ! Squirrel !

Posted

The

idea { module { inheritOutputDirs = true; } }

line hasn't been required since this commit in ForgeGradle 2.0.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • 4 years later...
Posted (edited)
  On 2/21/2016 at 7:49 PM, jeffryfisher said:

I don't know IntelliJ, but I do know that the stock gradle.build file has some lines in it about ignoring mcmod.info. You might look at that and then post in the Gradle child forum if you want to change it.

Expand  

If you are using Intellij 14 (which you should) you need to add the following to the end of your build.gradle before importing:

 

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

 

If you don't do that, your assets will not work. (Thanks to Cazzar for this solution)

Edited by hhyygg
  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello , when I try to launch the forge installer it just crash with a message for 0,5 secondes. I'm using java 17 to launch it. Here's the link of the error :https://cdn.corenexis.com/view/?img=d/ma24/qs7u4U.jpg  
    • You will find the crash-report or log in your minecraft directory (crash-report or logs folder)
    • Use a modpack which is using these 2 mods as working base:   https://www.curseforge.com/minecraft/modpacks/life-in-the-village-3
    • inicie un mundo donde instale Croptopia y Farmer's Delight, entonces instale el addon Croptopia Delight pero no funciona. es la version 1.18.2
    • Hello all. I'm currently grappling with the updateShape method in a custom class extending Block.  My code currently looks like this: The conditionals in CheckState are there to switch blockstate properties, which is working fine, as it functions correctly every time in getStateForPlacement.  The problem I'm running into is that when I update a state, the blocks seem to call CheckState with the position of the block which was changed updated last.  If I build a wall I can see the same change propagate across. My question thus is this: is updateShape sending its return to the neighbouring block?  Is each block not independently executing the updateShape method, thus inserting its own current position?  The first statement appears to be true, and the second false (each block is not independently executing the method). I have tried to fix this by saving the block's own position to a variable myPos at inception, and then feeding this in as CheckState(myPos) but this causes a worse outcome, where all blocks take the update of the first modified block, rather than just their neighbour.  This raises more questions than it answers, obviously: how is a different instance's variable propagating here?  I also tried changing it so that CheckState did not take a BlockPos, but had myPos built into the body - same problem. I have previously looked at neighbourUpdate and onNeighbourUpdate, but could not find a way to get this to work at all.  One post on here about updatePostPlacement and other methods has proven itself long superceded.  All other sources on the net seem to be out of date. Many thanks in advance for any help you might offer me, it's been several days now of trying to get this work and several weeks of generally trying to get round this roadblock.  - Sandermall
  • Topics

×
×
  • Create New...

Important Information

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