Advertisement
Guest User

Untitled

a guest
Jul 29th, 2023
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. plugins {
  2. id 'eclipse'
  3. id 'maven-publish'
  4. id 'net.minecraftforge.gradle' version '5.1.+'
  5. }
  6.  
  7. version = '1.0-1.19.4'
  8. group = 'com.totis.totismod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  9. archivesBaseName = 'totismod'
  10.  
  11. // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
  12. java.toolchain.languageVersion = JavaLanguageVersion.of(17)
  13.  
  14. println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
  15. minecraft {
  16. mappings channel: 'official', version: '1.19.4'
  17.  
  18. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  19. runs {
  20. client {
  21. workingDirectory project.file('run')
  22.  
  23. property 'forge.logging.markers', 'REGISTRIES'
  24.  
  25. property 'forge.logging.console.level', 'debug'
  26.  
  27. property 'forge.enabledGameTestNamespaces', 'totismod'
  28.  
  29. mods {
  30. totismod {
  31. source sourceSets.main
  32. }
  33. }
  34. }
  35.  
  36. server {
  37. workingDirectory project.file('run')
  38.  
  39. property 'forge.logging.markers', 'REGISTRIES'
  40.  
  41. property 'forge.logging.console.level', 'debug'
  42.  
  43. property 'forge.enabledGameTestNamespaces', 'totismod'
  44.  
  45. mods {
  46. totismod {
  47. source sourceSets.main
  48. }
  49. }
  50. }
  51.  
  52. gameTestServer {
  53. workingDirectory project.file('run')
  54.  
  55. property 'forge.logging.markers', 'REGISTRIES'
  56.  
  57. property 'forge.logging.console.level', 'debug'
  58.  
  59. property 'forge.enabledGameTestNamespaces', 'totismod'
  60.  
  61. mods {
  62. totismod {
  63. source sourceSets.main
  64. }
  65. }
  66. }
  67.  
  68. data {
  69. workingDirectory project.file('run')
  70.  
  71. property 'forge.logging.markers', 'REGISTRIES'
  72.  
  73. property 'forge.logging.console.level', 'debug'
  74.  
  75. args '--mod', 'totismod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
  76.  
  77. mods {
  78. totismod {
  79. source sourceSets.main
  80. }
  81. }
  82. }
  83. }
  84. }
  85.  
  86. // Include resources generated by data generators.
  87. sourceSets.main.resources { srcDir 'src/generated/resources' }
  88.  
  89. repositories {
  90.  
  91. }
  92.  
  93. dependencies {
  94. minecraft 'net.minecraftforge:forge:1.19.4-45.1.16'
  95.  
  96. annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' //Probably this hasn't changed
  97. implementation("org.spongepowered:mixin:0.8") {
  98. transitive = false
  99. }
  100. }
  101.  
  102. // Example for how to get properties into the manifest for reading at runtime.
  103. jar {
  104. manifest {
  105. attributes([
  106. "Specification-Title" : "Totis Mods",
  107. "Specification-Vendor" : "ElTotisPro50",
  108. "Specification-Version" : "1.0", // We are version 1 of ourselves
  109. "Implementation-Title" : project.name,
  110. "Implementation-Version" : project.jar.archiveVersion,
  111. "Implementation-Vendor" : "ElTotisPro50",
  112. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  113. ])
  114. }
  115. }
  116.  
  117. jar.finalizedBy('reobfJar')
  118.  
  119. publishing {
  120. publications {
  121. mavenJava(MavenPublication) {
  122. artifact jar
  123. }
  124. }
  125. repositories {
  126. maven {
  127. url "file://${project.projectDir}/mcmodsrepo"
  128. }
  129. }
  130. }
  131.  
  132. tasks.withType(JavaCompile).configureEach {
  133. options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
  134. }
  135.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement