Jump to content

NovaViper

Forge Modder
  • Posts

    1061
  • Joined

  • Last visited

Everything posted by NovaViper

  1. Here you go. //Thanks to Draco18s for the library/mod seperation! buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. def libVersion = "1" def majorVersion = "0" def minorVersion = "1" //bug patch or testing versions def tkcraftVersion = "f" def prePend = "1.12.2-" def packageVersion = libVersion+"."+majorVersion+"."+minorVersion+tkcraftVersion tkcraftVersion = libVersion+"."+majorVersion+"."+minorVersion+tkcraftVersion version = "" group= "com.novaviper.ecore" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = prePend+"NovaCraft"+packageVersion sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. compileJava { sourceCompatibility = targetCompatibility = '1.8' } minecraft { version = "1.12.2-14.23.2.2615" runDir = "run" // the mappings can be changed at any time, and must be in the following format. // snapshot_YYYYMMDD snapshot are built nightly. // stable_# stables are built at the discretion of the MCP team. // Use non-default mappings at your own risk. they may not always work. // simply re-run your setup task after changing the mappings to update your workspace. mappings = "snapshot_20171003" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } repositories { maven { url "https://maven.mcmoddev.com/" } } dependencies { compile "net.ilexiconn:llibrary:1.7.9-1.12.2:dev" } 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' } } task eCoreJar(type: Jar) { baseName = 'EclipseCore-'+prePend+libVersion from('src/main/resources/etc/lib') { include '*.info' expand 'version': libVersion, 'mcversion': project.minecraft.version } from zipTree(jar.outputs.getFiles().getSingleFile()).matching { include 'com/novaviper/eclipsecore/**', 'assets/eclipsecore/**' } } task terrakonCraftJar(type: Jar) { baseName = 'TerrakonCraft-'+prePend+tkcraftVersion from('src/main/resources/etc/tkcraft') { include '*.info' expand 'version': tkcraftVersion, 'mcversion': project.minecraft.version } from zipTree(jar.outputs.getFiles().getSingleFile()).matching { include 'com/novaviper/terrakoncraft/**', 'assets/terrakoncraft/**' } } eCoreJar.dependsOn('reobfJar') terrakonCraftJar.dependsOn('reobfJar') task releaseJars(type: Copy) { from eCoreJar from terrakonCraftJar //one of these lines crashes it? rename '-(.*)jar', '.jar' rename '-(.*)zip', '.zip' into '.' } task fullBuild(type: Delete) { delete jar } fullBuild.dependsOn('releaseJars')
  2. Hey @Draco18s, I added in a dependency to the build, now eclipse says it can't find the library despite I ran the setup commands for Eclipse. It keeps saying unresolved dependency --Edit-- I fixed it, but I still can't get Forge to look into the etc folder and find each mod's mcmod.info file
  3. I tried that but the etc folder still appears in the library jar --Edit-- I did the include method like in the terrakonJar task and that made it go away
  4. That helped alot there, thanks! Now I have another issue, whenever I build, the etc folder ends up in the EclipseCore jar but not in the Terrakon jar (I dont want that in either folder). And I still have that locked gradle error, despite I (supposedly) not using gradle anywhere else (expect Eclipse, maybe that's causing the issue?) What my build.gradle looks like currently: buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. def libVersion = "1" def majorVersion = "0" def minorVersion = "1" //bug patch or testing versions def tkcraftVersion = "f" def prePend = "1.12.2-" def packageVersion = libVersion+"."+majorVersion+"."+minorVersion+tkcraftVersion tkcraftVersion = libVersion+"."+majorVersion+"."+minorVersion+tkcraftVersion version = "" group= "com.novaviper.ecore" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = prePend+"NovaCraft"+packageVersion sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. compileJava { sourceCompatibility = targetCompatibility = '1.8' } minecraft { version = "1.12.2-14.23.2.2615" runDir = "run" // the mappings can be changed at any time, and must be in the following format. // snapshot_YYYYMMDD snapshot are built nightly. // stable_# stables are built at the discretion of the MCP team. // Use non-default mappings at your own risk. they may not always work. // simply re-run your setup task after changing the mappings to update your workspace. mappings = "snapshot_20171003" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. //compile "some.group:artifact:version:classifier" //compile "some.group:artifact:version" // real examples //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, // except that these dependencies get remapped to your current MCP mappings //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // for more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } 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' } } task eCoreJar(type: Jar) { baseName = 'EclipseCore-'+prePend+libVersion from('src/main/resources/etc/lib') { include '*.info' expand 'version': libVersion, 'mcversion': project.minecraft.version } from zipTree(jar.outputs.getFiles().getSingleFile()).matching { exclude 'com/novaviper/terrakoncraft/**', 'mcmod.info', 'assets/terrakoncraft/**' } } task terrakonCraftJar(type: Jar) { baseName = 'TerrakonCraft-'+prePend+tkcraftVersion from('src/main/resources/etc/tkcraft') { include '*.info' expand 'version': tkcraftVersion, 'mcversion': project.minecraft.version } from zipTree(jar.outputs.getFiles().getSingleFile()).matching { include 'com/novaviper/terrakoncraft/**', 'assets/terrakoncraft/**' } } eCoreJar.dependsOn('reobfJar') terrakonCraftJar.dependsOn('reobfJar') task releaseJars(type: Copy) { from eCoreJar from terrakonCraftJar //one of these lines crashes it? rename '-(.*)jar', '.jar' rename '-(.*)zip', '.zip' into '.' } task fullBuild(type: Delete) { delete jar } fullBuild.dependsOn('releaseJars')
  5. I'm kinda at a lost.. How can I get Forge to look into the subfolders for the mcmod.info files when the game loads up?
  6. The build commands seem to fail for some reason when it gets to releaseJars.. with this error And I get 4 files: two of them (1.12.2-TerrakonCraft-1.0.1f.jar and 1.12.2-EclipseCore-v1.jar) are each of the mods, and the other two (1.12.2-EclipseCore1.0.1f.jar and 1.12.2-EclipseCore1.0.1f-sources.jar) have stuff for both of the mods. Another strange thing is that 1.12.2-EclipseCore-v1.jar has the code for Eclipse Core only, but still has the etc/ subfolders of both mods. Finally.. I'm not sure if this is normal but several new folders (along with the libs folder, which the mods appear in) appeared after running the command. These folders are classes, dependency-cache, libs, resources, retromaping,sources, taskLogs, and tmp. From the very last time I made mods, these folders didn't appear, but merely the jars of the mod did (and not grouped in a folder)
  7. I just placed them in subfolders, but Minecraft/Forge didn't seem to pick them up at all D: Here's the directory: https://imgur.com/rNUlJPw
  8. Also, when I want to build the project, do I run the normal gradlew build command or run one of the newly defined tasks in the build.gradle?
  9. Ah, that's what that's for. Hm.. Would it be possible to have that in the assets folder (src/main/resources) so I don't have to clone each file into the etc/ folder?
  10. What about the mcmod.info file? Is there a way to generate multiple versions for each mod?
  11. I did something like this: buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. def libVersion = "1" def majorVersion = "0" def minorVersion = "1" //bug patch or testing versions def tkcraftVersion = "f" def prePend = "1.12.2-" def packageVersion = libVersion+"."+majorVersion+"."+minorVersion+tkcraftVersion tkcraftVersion = libVersion+"."+majorVersion+"."+minorVersion+tkcraftVersion version = "" group= "com.novaviper.ecore" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = prePend+"EclipseCore"+packageVersion sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. compileJava { sourceCompatibility = targetCompatibility = '1.8' } minecraft { version = "1.12.2-14.23.2.2615" runDir = "run" // the mappings can be changed at any time, and must be in the following format. // snapshot_YYYYMMDD snapshot are built nightly. // stable_# stables are built at the discretion of the MCP team. // Use non-default mappings at your own risk. they may not always work. // simply re-run your setup task after changing the mappings to update your workspace. mappings = "snapshot_20171003" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. replace "{@version:lib}":libVersion,"{@version:tkcraft}":tkcraftVersion,"required-after:ecore":("required-after:ecore@["+libVersion+",]"),"/*{uncomment}":"","{uncomment}*/":"" } dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. //compile "some.group:artifact:version:classifier" //compile "some.group:artifact:version" // real examples //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, // except that these dependencies get remapped to your current MCP mappings //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // for more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } 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' } } task eCoreJar(type: Jar) { baseName = prePend+'EclipseCore-v'+libVersion from('etc/lib') { include '*.info' expand 'version': libVersion, 'mcversion': project.minecraft.version } from zipTree(jar.outputs.getFiles().getSingleFile()).matching { exclude 'com/novaviper/terrakoncraft/**', 'mcmod.info', 'TODO.txt', 'assets/**', 'config/**' } } task terrakonCraftJar(type: Jar) { baseName = prePend+'TerrakonCraft-'+tkcraftVersion from('etc/tkcraft') { include '*.info' expand 'version': tkcraftVersion, 'mcversion': project.minecraft.version } from zipTree(jar.outputs.getFiles().getSingleFile()).matching { include 'com/novaviper/terrakoncraft/**', 'assets/terrakoncraft/**' } } eCoreJar.dependsOn('reobfJar') terrakonCraftJar.dependsOn('reobfJar') task releaseJars(type: Copy) { from eCoreJar from terrakonCraftJar //one of these lines crashes it? rename '-(.*)jar', '.jar' rename '-(.*)zip', '.zip' into '.' } task fullBuild(type: Delete) { delete jar } fullBuild.dependsOn('releaseJars') I haven't gotten the chance to try it out, since I've been busy with school work. But something like this would suffice, right?
  12. I haven't made the actual library yet. Do I add in another package and specify it in the build.gradle to separate them into two different zip files?
  13. I'm trying to create a mod alongside with my main mod that stores some of the most used Forge methods (ie methods involving item creation, block creation, etc.). I'm also trying to avoid having the two mods complied together under the same zip folder whenever I compile the mods. I'm currently using the Eclipse IDE and Forge 1.12.2-14.23.2.2615.
  14. It seems to be Optifine.. it also causes this bug where the screen goes black if I select the Mod button in the main menu, I'll take this issue over to the developers
  15. Strangely, I can't open chests anymore since updated to 14.1.2604 of Forge. I get an error like this whenever I do so: [15:01:46] [Server thread/FATAL]: Error executing task java.util.concurrent.ExecutionException: java.lang.AbstractMethodError: net.minecraft.block.state.BlockStateContainer$StateImplementation.doesSideBlockChestOpening(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/EnumFacing;)Z at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_151] at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_151] at net.minecraft.util.Util.func_181617_a(SourceFile:47) [h.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:721) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:239) [chd.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_151] Caused by: java.lang.AbstractMethodError: net.minecraft.block.state.BlockStateContainer$StateImplementation.doesSideBlockChestOpening(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/EnumFacing;)Z at net.minecraft.block.BlockChest.func_176456_n(BlockChest.java:541) ~[api.class:?] at net.minecraft.block.BlockChest.func_176457_m(BlockChest.java:536) ~[api.class:?] at net.minecraft.block.BlockChest.func_189418_a(BlockChest.java:460) ~[api.class:?] at net.minecraft.block.BlockChest.func_180676_d(BlockChest.java:444) ~[api.class:?] at net.minecraft.block.BlockChest.func_180639_a(BlockChest.java:421) ~[api.class:?] at net.minecraft.server.management.PlayerInteractionManager.func_187251_a(PlayerInteractionManager.java:446) ~[or.class:?] at net.minecraft.network.NetHandlerPlayServer.func_184337_a(NetHandlerPlayServer.java:739) ~[pa.class:?] at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:55) ~[ma.class:?] at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:11) ~[ma.class:?] at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[hv$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_151] at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_151] at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?] ... 5 more
  16. It doesn't? I thought there was a specific setup Forge goes through after you run the initial commands: setupDecompWorkspace and setpDevWorkspace. Like, you run the commands run genIntellijRuns or gradlew eclipse.
  17. Huh, I found another IDE called Eclipse Che, a cloud/portable version of Eclipse. Anyone think this could be the golden coin I'm looking for?
  18. I'm still considering having VS as my main editor. I just wonder if Forge works with it ._.
  19. It surely not user-friendly, especially for someone new to it
  20. Ikr? I remember the very first time I used IntelliJ and nearly wanting to smash my keyboard (not literally but I did think about it)
  21. I noticed that.. for the strangest reason, IntelliJ has Ctrl+Z defaultly set to "Delete Line", which ends up deleting all of my lines of code. I have to change it to the eclipse controls in order to get rid of that
  22. True.. Its just hard for to remember the million something shortcuts for each IDE (a disaster for sure since I hardly know main ones, like IntelliJ has undo that's not Ctrl+Z)
  23. I'm trying to go with an IDE that's free (but has more functionality than Eclipse). While I have used IntelliJ before but its really hard to add in another language other than java into it. I had a better time with that in VS
  24. Does IntelliJ Community Edition even support Powershell? I haven't found anything that says it works with Powershell, just Java for the most part. The paid edition work with other languages but yet I still haven't seen where it works with Powershell
  25. Hey guys! I just recently reset my entire computer and started to reinstall certain programs. This time, I plan on trying to slimline my IDEs (I had about 5 in total: Visual Studio Code, Visual Studio Community, IntelliJ, Eclipse, and Android Studio).The one I plan to converging everything under is Visual Studio Code, as I can add in different plugins to work with it, especially since I'm starting to use that IDE for developing my Powershell program to run my server. Just curious if I can squash down my several IDEs (with the exception of Android Studio) into one.
×
×
  • Create New...

Important Information

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