Guest User

Untitled

a guest
Sep 26th, 2021
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. buildscript {
  2. repositories {
  3. // These repositories are only for Gradle plugins, put any other repositories in the repository block further below
  4. maven { url = 'https://maven.minecraftforge.net' }
  5. maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
  6. mavenCentral()
  7. }
  8. dependencies {
  9. classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
  10. classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
  11. }
  12. }
  13.  
  14. apply plugin: 'net.minecraftforge.gradle'
  15. apply plugin: 'org.spongepowered.mixin'
  16.  
  17. group = 'me.piggy'
  18. version = '1.0'
  19.  
  20. java {
  21. archivesBaseName = 'mineclub'
  22. toolchain.languageVersion = JavaLanguageVersion.of(8)
  23. }
  24.  
  25. minecraft {
  26. // The mappings can be changed at any time and must be in the following format.
  27. // Channel: Version:
  28. // snapshot YYYYMMDD Snapshot are built nightly.
  29. // stable # Stables are built at the discretion of the MCP team.
  30. // official MCVersion Official field/method names from Mojang mapping files
  31. //
  32. // You must be aware of the Mojang license when using the 'official' mappings.
  33. // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
  34. //
  35. // Use non-default mappings at your own risk. They may not always work.
  36. // Simply re-run your setup task after changing the mappings to update your workspace.
  37. mappings channel: 'snapshot', version: '20210309-1.16.5'
  38.  
  39. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  40.  
  41. // Default run configurations.
  42. // These can be tweaked, removed, or duplicated as needed.
  43. runs {
  44. client {
  45. workingDirectory project.file('run')
  46.  
  47. // Recommended logging data for a userdev environment
  48. // The markers can be added/removed as needed separated by commas.
  49. // "SCAN": For mods scan.
  50. // "REGISTRIES": For firing of registry events.
  51. // "REGISTRYDUMP": For getting the contents of all registries.
  52. property 'forge.logging.markers', 'REGISTRIES'
  53.  
  54. // Recommended logging level for the console
  55. // You can set various levels here.
  56. // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
  57. property 'forge.logging.console.level', 'debug'
  58.  
  59. arg "-mixin.config=mineclub.mixins.json"
  60.  
  61. mods {
  62. mineclub {
  63. source sourceSets.main
  64. }
  65. }
  66. }
  67.  
  68. server {
  69. workingDirectory project.file('run')
  70.  
  71. // Recommended logging data for a userdev environment
  72. // The markers can be added/removed as needed separated by commas.
  73. // "SCAN": For mods scan.
  74. // "REGISTRIES": For firing of registry events.
  75. // "REGISTRYDUMP": For getting the contents of all registries.
  76. property 'forge.logging.markers', 'REGISTRIES'
  77.  
  78. // Recommended logging level for the console
  79. // You can set various levels here.
  80. // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
  81. property 'forge.logging.console.level', 'debug'
  82.  
  83. arg "-mixin.config=mineclub.mixins.json"
  84.  
  85. mods {
  86. mineclub {
  87. source sourceSets.main
  88. }
  89. }
  90. }
  91.  
  92. data {
  93. workingDirectory project.file('run')
  94.  
  95. // Recommended logging data for a userdev environment
  96. // The markers can be added/removed as needed separated by commas.
  97. // "SCAN": For mods scan.
  98. // "REGISTRIES": For firing of registry events.
  99. // "REGISTRYDUMP": For getting the contents of all registries.
  100. property 'forge.logging.markers', 'REGISTRIES'
  101.  
  102. // Recommended logging level for the console
  103. // You can set various levels here.
  104. // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
  105. property 'forge.logging.console.level', 'debug'
  106.  
  107. // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
  108. args '--mod', 'mineclub', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
  109.  
  110. mods {
  111. mineclub {
  112. source sourceSets.main
  113. }
  114. }
  115. }
  116. }
  117. }
  118.  
  119. mixin {
  120. add sourceSets.main, "mineclub.refmap.json"
  121. }
  122.  
  123. // Include resources generated by data generators.
  124. sourceSets.main.resources { srcDir 'src/generated/resources' }
  125.  
  126. repositories {
  127. mavenCentral() // for transitive dependencies
  128. maven {
  129. name 'm2-dv8tion'
  130. url 'https://m2.dv8tion.net/releases'
  131. }
  132. }
  133.  
  134. dependencies {
  135. // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft' it is assumed
  136. // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
  137. // The userdev artifact is a special name and will get all sorts of transformations applied to it.
  138. minecraft 'net.minecraftforge:forge:1.16.5-36.2.4'
  139.  
  140. implementation("net.dv8tion:JDA:4.3.0_277")
  141.  
  142. // Real mod deobf dependency examples - these get remapped to your current mappings
  143. // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
  144. // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
  145. // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
  146.  
  147. // Examples using mod jars from ./libs
  148. // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
  149.  
  150. // For more info...
  151. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  152. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  153.  
  154. annotationProcessor 'org.spongepowered:mixin:0.8:processor'
  155. }
  156.  
  157. // Example for how to get properties into the manifest for reading at runtime.
  158. jar {
  159. manifest {
  160. attributes([
  161. "Specification-Title" : "mineclub",
  162. "Specification-Vendor" : "piggy",
  163. "Specification-Version" : "1", // We are version 1 of ourselves
  164. "Implementation-Title" : project.name,
  165. "Implementation-Version" : project.jar.archiveVersion,
  166. "Implementation-Vendor" : "piggy",
  167. "MixinConfigs" : "mineclub.mixins.json",
  168. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  169. ])
  170. }
  171. }
  172.  
  173. jar.finalizedBy('reobfJar')
  174.  
RAW Paste Data