Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ bin/
.classpath
.project

# macos

*.DS_Store

# fabric

run/

# java

hs_err_*.log
replay_*.log
*.hprof
*.jfr
35 changes: 26 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.10-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = '1.21'
targetCompatibility = '1.21'

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

base {
archivesName = project.archives_base_name
}

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
Expand All @@ -18,23 +18,35 @@ repositories {
// for more information about repositories.
}

loom {
splitEnvironmentSourceSets()

mods {
"modid" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}

}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
}


processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": project.version
expand "version": inputs.properties.version
}
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}

Expand All @@ -43,10 +55,15 @@ java {
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

jar {
inputs.property "archivesName", project.base.archivesName

from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
rename { "${it}_${inputs.properties.archivesName}"}
}
}
15 changes: 8 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.21
yarn_mappings=1.21+build.7
loader_version=0.15.11
# check these on https://fabricmc.net/use
minecraft_version=1.21.5
yarn_mappings=1.21.5+build.1
loader_version=0.16.13

# Mod Properties
mod_version = 1.0.0+1.21
maven_group = com.minenash
archives_base_name = pickblockstate
mod_version = 1.0.0+1.21.5
maven_group = com.minenash
archives_base_name = pickblockstate

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading