Advertisement
sora200507

Untitled

Sep 10th, 2024
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.95 KB | None | 0 0
  1. plugins {
  2. id 'net.minecraftforge.gradle' version '5.1.+'
  3. }
  4.  
  5.  
  6.  
  7. group = 'com.github.soramame0256'
  8. version = '1.0-SNAPSHOT'
  9. java {
  10. archivesBaseName = 'stackablehealth'
  11. toolchain.languageVersion = JavaLanguageVersion.of(8)
  12. }
  13.  
  14. minecraft {
  15. // The mappings can be changed at any time and must be in the following format.
  16. // Channel: Version:
  17. // official MCVersion Official field/method names from Mojang mapping files
  18. // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official
  19. //
  20. // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
  21. // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
  22. //
  23. // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
  24. // Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started
  25. //
  26. // Use non-default mappings at your own risk. They may not always work.
  27. // Simply re-run your setup task after changing the mappings to update your workspace.
  28. mappings channel: 'stable', version: '39-1.12'
  29.  
  30. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  31.  
  32. // Default run configurations.
  33. // These can be tweaked, removed, or duplicated as needed.
  34. runs {
  35. client {
  36. workingDirectory project.file('run')
  37.  
  38. // Recommended logging data for a userdev environment
  39. // The markers can be added/remove as needed separated by commas.
  40. // "SCAN": For mods scan.
  41. // "REGISTRIES": For firing of registry events.
  42. // "REGISTRYDUMP": For getting the contents of all registries.
  43. property 'forge.logging.markers', 'REGISTRIES'
  44.  
  45.  
  46. // Recommended logging level for the console
  47. // You can set various levels here.
  48. // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
  49. property 'forge.logging.console.level', 'debug'
  50.  
  51.  
  52. mods {
  53. developmentutils {
  54. source sourceSets.main
  55. }
  56. }
  57. }
  58.  
  59. server {
  60. workingDirectory project.file('run')
  61.  
  62. property 'forge.logging.markers', 'REGISTRIES'
  63.  
  64. property 'forge.logging.console.level', 'debug'
  65.  
  66.  
  67. mods {
  68. developmentutils {
  69. source sourceSets.main
  70. }
  71. }
  72. }
  73. }
  74. }
  75.  
  76. // Include resources generated by data generators.
  77. sourceSets.main.resources { srcDir 'src/generated/resources' }
  78.  
  79. repositories {
  80. // Put repositories for dependencies here
  81. // ForgeGradle automatically adds the Forge maven and Maven Central for you
  82.  
  83. // If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
  84. // flatDir {
  85. // dir 'libs'
  86. // }
  87. }
  88.  
  89. dependencies {
  90. // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft' it is assumed
  91. // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
  92. // The userdev artifact is a special name and will get all sorts of transformations applied to it.
  93. minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'
  94.  
  95. // Real mod deobf dependency examples - these get remapped to your current mappings
  96. // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
  97. // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
  98. // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
  99.  
  100. // Examples using mod jars from ./libs
  101. // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
  102.  
  103. // For more info...
  104. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  105. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  106. }
  107. // Example for how to get properties into the manifest for reading by the runtime..
  108. jar {
  109. manifest {
  110. attributes([
  111. "Specification-Title": "stackablehealth",
  112. "Specification-Vendor": "soramame_256",
  113. "Specification-Version": "1", // We are version 1 of ourselves
  114. "Implementation-Title": project.name,
  115. "Implementation-Version": "${version}",
  116. "Implementation-Vendor" :"soramame_256",
  117. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  118. ])
  119. }
  120. }
  121.  
  122.  
  123. jar.finalizedBy('reobfJar')
  124.  
  125. tasks.withType(JavaCompile).configureEach {
  126. options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
  127. }
  128.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement