2025-02-17 17:31:30 +03:00
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net/' }
mavenCentral ( )
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
}
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
2025-02-18 16:32:02 +03:00
version = "${mc_version}-${mod_version}"
group = 'com.rejahtavi.rfp2'
archivesBaseName = 'RealFirstPerson2'
2025-02-17 17:31:30 +03:00
sourceCompatibility = targetCompatibility = compileJava . sourceCompatibility = compileJava . targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
minecraft {
mappings channel: 'snapshot' , version: '20171003-1.12'
runs {
client {
workingDirectory project . file ( 'run' )
// Recommended logging data for a userdev environment
property 'forge.logging.markers' , 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level' , 'debug'
}
server {
// Recommended logging data for a userdev environment
property 'forge.logging.markers' , 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level' , 'debug'
}
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'
}
2025-02-18 16:32:02 +03:00
// Обработка ресурсов
processResources {
// Убедитесь, что задача пересоздается при изменении версий
inputs . property "version" , project . version
inputs . property "mcversion" , mc_version
// Замена значений в mcmod.info
from ( sourceSets . main . resources . srcDirs ) {
include 'mcmod.info'
expand 'version' : project . version , 'mcversion' : mc_version
}
// Копирование остальных файлов без изменения
from ( sourceSets . main . resources . srcDirs ) {
exclude 'mcmod.info'
}
}
2025-02-17 17:31:30 +03:00
// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes ( [
"Specification-Title" : "examplemod" ,
"Specification-Vendor" : "examplemodsareus" ,
"Specification-Version" : "1" , // We are version 1 of ourselves
"Implementation-Title" : project . name ,
"Implementation-Version" : "${version}" ,
"Implementation-Vendor" : "examplemodsareus" ,
"Implementation-Timestamp" : new Date ( ) . format ( "yyyy-MM-dd'T'HH:mm:ssZ" )
] )
}
}
jar . finalizedBy ( 'reobfJar' )
publishing {
publications {
mavenJava ( MavenPublication ) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}