Advertisement
Haydenman2

Untitled

Feb 5th, 2023
2,311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 4.60 KB | None | 0 0
  1. buildscript {
  2.     repositories {
  3.         maven { url = 'https://maven.minecraftforge.net' }
  4.         maven { url = 'https://maven.parchmentmc.org'}
  5.         mavenCentral()
  6.     }
  7.     dependencies {
  8.         classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
  9.         classpath 'org.parchmentmc:librarian:1.+'
  10.         classpath files("gradle/plugins/mixingradle-0.7-FG5BUILD.jar")
  11.     }
  12. }
  13.  
  14. apply plugin: 'eclipse'
  15. apply plugin: 'maven-publish'
  16. apply plugin: 'net.minecraftforge.gradle'
  17. apply plugin: 'org.spongepowered.mixin'
  18. apply plugin: 'org.parchmentmc.librarian.forgegradle'
  19.  
  20. version = "${project.mcVersion}-${project.modVersion}"
  21. group = 'me.haydenb.assemblylinemachines'
  22. archivesBaseName = 'assemblylinemachines'
  23.  
  24. java.toolchain.languageVersion = JavaLanguageVersion.of(17)
  25.  
  26. minecraft {
  27.  
  28.     accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  29.     mappings channel: 'parchment', version: '2023.02.05-1.19.3'
  30.     runs {
  31.         client {
  32.             workingDirectory project.file('run-cli')
  33.            
  34.             //Forge-required properties (2)
  35.             property 'forge.logging.console.level', 'debug'
  36.             property 'forge.logging.markers', 'REGISTRIES'
  37.             //Mixin-required properties and arg (3)
  38.             property 'mixin.env.remapRefMap', 'true'
  39.             property 'mixin.env.refMapRemappingFile', file('build/createSrgToMcp/output.srg')
  40.             arg '-mixin.config=mixins.assemblylinemachines.json'
  41.            
  42.             mods {
  43.                 assemblylinemachines {
  44.                     source sourceSets.main
  45.                 }
  46.             }
  47.         }
  48.  
  49.         server {
  50.             workingDirectory project.file('run-srv')
  51.            
  52.             //Forge-required properties (2)
  53.             property 'forge.logging.console.level', 'debug'
  54.             property 'forge.logging.markers', 'REGISTRIES'
  55.             //Mixin-required properties and arg (3)
  56.             property 'mixin.env.remapRefMap', 'true'
  57.             property 'mixin.env.refMapRemappingFile', file('build/createSrgToMcp/output.srg')
  58.             arg '-mixin.config=mixins.assemblylinemachines.json'
  59.            
  60.             mods {
  61.                 assemblylinemachines {
  62.                     source sourceSets.main
  63.                 }
  64.             }
  65.         }
  66.  
  67.         data {
  68.             workingDirectory project.file('run-cli')
  69.            
  70.             //Forge-required properties (2)
  71.             property 'forge.logging.console.level', 'debug'
  72.             property 'forge.logging.markers', 'REGISTRIES'
  73.             //Mixin-required properties and arg (3)
  74.             property 'mixin.env.remapRefMap', 'true'
  75.             property 'mixin.env.refMapRemappingFile', file('build/createSrgToMcp/output.srg')
  76.             arg '-mixin.config=mixins.assemblylinemachines.json'
  77.             //Datagen-required args (4)
  78.             args '--mod', 'assemblylinemachines', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/'), '--input', file('src/main/resources/')
  79.             mods {
  80.                 assemblylinemachines {
  81.                     source sourceSets.main
  82.                 }
  83.             }
  84.         }
  85.     }
  86. }
  87.  
  88. sourceSets {
  89.   main {
  90.     resources {
  91.       srcDirs += "src/generated/resources"
  92.     }
  93.   }
  94. }
  95.  
  96. repositories{
  97.     maven{
  98.         //CurseForge project to Maven wrapper - for IMC projects.
  99.         url "https://cursemaven.com"
  100.     }
  101.     maven{
  102.         //Sponge Maven - for Mixins.
  103.         url "https://repo.spongepowered.org/maven"
  104.     }
  105.  
  106.     maven{
  107.         //Patchouli repo
  108.         url "https://maven.blamejared.com"
  109.     }
  110. }
  111.  
  112. dependencies {
  113.     minecraft 'net.minecraftforge:forge:1.19.3-44.1.8'
  114.     annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
  115.    
  116.     //IMC
  117.     implementation fg.deobf("curse.maven:jei-238222:4371830")
  118.     implementation fg.deobf("vazkii.patchouli:Patchouli:1.19.3-78-SNAPSHOT")
  119.     implementation fg.deobf("curse.maven:theoneprobe-245211:4159743")
  120.     //implementation fg.deobf("curse.maven:mekanism-268560:3954410")
  121.     runtimeOnly fg.deobf("curse.maven:legendarytooltips-532127:4238818")
  122.     runtimeOnly fg.deobf("curse.maven:iceberg-520110:4257665")
  123.     runtimeOnly fg.deobf("curse.maven:prism-638111:4238759")
  124.     //runtimeOnly fg.deobf("curse.maven:ato-405593:3964725")
  125. }
  126.  
  127. mixin {
  128.     add sourceSets.main, "mixins.assemblylinemachines.refmap.json"
  129. }
  130.  
  131. jar.finalizedBy("reobfJar")
  132.  
  133. jar{
  134.     manifest{
  135.         attributes([
  136.             "Implementation-Version": project.version,
  137.             "MixinConfigs": "mixins.assemblylinemachines.json"
  138.         ])
  139.     }
  140. }
  141.  
  142. task eclipseWithMap(type: GradleBuild){
  143.     tasks = ["createMcpToSrg", "eclipse", "genEclipseRuns"]
  144. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement