Advertisement
Bizebis

build.gradle

Jun 19th, 2022
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.70 KB | None | 0 0
  1. buildscript {
  2.     repositories {
  3.         maven { url = 'https://maven.minecraftforge.net' }
  4.         mavenCentral()
  5.     }
  6.     dependencies {
  7.         classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
  8.     }
  9. }
  10. apply plugin: 'net.minecraftforge.gradle'
  11. apply plugin: 'eclipse'
  12.  
  13. version = '1.0'
  14. group = 'com.yourname.modid'
  15. archivesBaseName = 'modid'
  16.  
  17. java.toolchain.languageVersion = JavaLanguageVersion.of(17)
  18.  
  19. minecraft {
  20.     mappings channel: 'official', version: '1.18.2'
  21.  
  22.     accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  23.  
  24.     runs {
  25.         client {
  26.             workingDirectory project.file('run')
  27.  
  28.             property 'forge.logging.markers', 'REGISTRIES'
  29.             property 'forge.logging.console.level', 'debug'
  30.  
  31.             mods {
  32.                 examplemod {
  33.                     source sourceSets.main
  34.                 }
  35.             }
  36.         }
  37.  
  38.         server {
  39.             workingDirectory project.file('run')
  40.  
  41.             property 'forge.logging.markers', 'REGISTRIES'
  42.             property 'forge.logging.console.level', 'debug'
  43.  
  44.             mods {
  45.                 examplemod {
  46.                     source sourceSets.main
  47.                 }
  48.             }
  49.         }
  50.     }
  51. }
  52.  
  53. repositories {
  54.     maven { // JEI & Tinkers
  55.         name 'DVS1 Maven FS'
  56.         url 'https://dvs1.progwml6.com/files/maven'
  57.     }
  58. }
  59.  
  60. dependencies {
  61.     minecraft 'net.minecraftforge:forge:1.18.2-40.1.0'
  62.     compileOnly "mezz.jei:jei-1.15.2:6.0.0.4:api"
  63. }
  64.  
  65. tasks.withType(JavaCompile).configureEach {
  66.     options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
  67. }
  68.  
  69. apply from: 'mcreator.gradle'
  70.  
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement