|
| 1 | +legacyForge { |
| 2 | + // Specify Forge version |
| 3 | + version = libs.versions.minecraftForge.get() |
| 4 | + |
| 5 | + parchment { |
| 6 | + minecraftVersion = libs.versions.minecraft.get() |
| 7 | + mappingsVersion = libs.versions.parchment.get() |
| 8 | + } |
| 9 | + |
| 10 | + mods { |
| 11 | + // define mod <-> source bindings |
| 12 | + "${mod_id}" { |
| 13 | + sourceSet(sourceSets.main) |
| 14 | + } |
| 15 | + } |
| 16 | + |
| 17 | + runs { |
| 18 | + client { |
| 19 | + client() |
| 20 | + sourceSet = sourceSets.main |
| 21 | + ideName = "Client" |
| 22 | + |
| 23 | + gameDirectory.set(file("runs/client")) |
| 24 | + systemProperty('forge.enabledGameTestNamespaces', project.mod_id) |
| 25 | + } |
| 26 | + |
| 27 | + client2 { |
| 28 | + client() |
| 29 | + sourceSet = sourceSets.main |
| 30 | + ideName = "Client (2)" |
| 31 | + |
| 32 | + programArguments.addAll('--username', 'YoungOnion') |
| 33 | + gameDirectory.set(file("runs/client2")) |
| 34 | + systemProperty('forge.enabledGameTestNamespaces', project.mod_id) |
| 35 | + } |
| 36 | + |
| 37 | + server { |
| 38 | + server() |
| 39 | + sourceSet = sourceSets.main |
| 40 | + ideName = "Server" |
| 41 | + |
| 42 | + gameDirectory.set(file("runs/server")) |
| 43 | + programArgument '--nogui' |
| 44 | + systemProperty('forge.enabledGameTestNamespaces', project.mod_id) |
| 45 | + } |
| 46 | + |
| 47 | + data { |
| 48 | + data() |
| 49 | + sourceSet = sourceSets.main |
| 50 | + ideName = "Data Generation" |
| 51 | + |
| 52 | + gameDirectory.set(file("runs/data")) |
| 53 | + programArguments.addAll('--mod', project.mod_id) |
| 54 | + programArguments.addAll('--all') |
| 55 | + programArguments.addAll('--output', file('src/generated/resources/').getAbsolutePath()) |
| 56 | + programArguments.addAll('--existing', file('src/main/resources/').getAbsolutePath()) |
| 57 | + programArguments.addAll('--existing-mod', 'gtceu', '--existing-mod', 'bloodmagic') |
| 58 | + } |
| 59 | + |
| 60 | + configureEach { |
| 61 | + // Recommended logging data for a userdev environment |
| 62 | + // The markers can be added/remove as needed separated by commas. |
| 63 | + // "SCAN": For mods scan. |
| 64 | + // "REGISTRIES": For firing of registry events. |
| 65 | + // "REGISTRYDUMP": For getting the contents of all registries. |
| 66 | + systemProperty 'forge.logging.markers', 'REGISTRIES' |
| 67 | + |
| 68 | + // Recommended logging level for the console |
| 69 | + // You can set various levels here. |
| 70 | + // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels |
| 71 | + logLevel = org.slf4j.event.Level.INFO |
| 72 | + } |
| 73 | + } |
| 74 | +} |
| 75 | + |
| 76 | +// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior. |
| 77 | +idea { |
| 78 | + module { |
| 79 | + downloadSources = true |
| 80 | + downloadJavadoc = true |
| 81 | + } |
| 82 | +} |
0 commit comments