Skip to content

Commit

Permalink
Small update
Browse files Browse the repository at this point in the history
  • Loading branch information
Arminias committed Mar 16, 2024
1 parent f142841 commit 02b4e85
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 17 deletions.
51 changes: 41 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import net.fabricmc.loom.task.RunClientTask
import net.fabricmc.loom.task.RunServerTask
import org.gradle.plugins.ide.idea.model.FilePath
import org.gradle.plugins.ide.idea.model.Module

buildscript {
dependencies {
Expand All @@ -10,6 +12,7 @@ buildscript {
plugins {
id 'maven-publish'
id 'fabric-loom' version "0.7-SNAPSHOT"
id 'idea'
}

sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -31,6 +34,9 @@ repositories {
name 'HalfOf2'
url 'https://storage.googleapis.com/devan-maven/'
}
maven {
url file('mavenRepo')
}
maven {
url = 'https://raw.githubusercontent.com/Devan-Kerman/Devan-Repo/master/'
}
Expand Down Expand Up @@ -59,25 +65,29 @@ dependencies {
implementation "org.lwjgl.lwjgl:lwjgl-platform:${lwjglVersion}"

implementation 'it.unimi.dsi:fastutil:8.5.12'
modImplementation(group: 'net.devtech', name: 'grossfabrichacks', version: '6.1') {
modImplementation(group: 'net.devtech', name: 'grossfabrichacks', version: '4.5') {
exclude group: 'net.fabricmc'
}

include 'it.unimi.dsi:fastutil:8.5.12'
include 'net.devtech:grossfabrichacks:6.1'
//include 'it.unimi.dsi:fastutil:8.5.12'
//include 'net.devtech:grossfabrichacks:6.1'

implementation fileTree(dir: "libs", include: "**.zip")
compileOnly fileTree(dir: "$projectDir/BTW_dev", include: "*.zip")
compileOnly fileTree(dir: "$buildDir/BTW_dev", include: "**.jar")
compileOnly fileTree(dir: "$buildDir/BTW_dev", include: "BTW_dev.jar")
//implementation fileTree(dir: "$buildDir/BTW_dev", include: "BTW_dev.jar")
runtimeClasspath fileTree(dir: "$buildDir/BTW_dev", include: "BTW_dev.jar")

runtimeClasspath fileTree(dir: "$buildDir/dev_run", include: "dev.jar")
implementation fileTree(dir: "mavenRepo/group/dev/1.0", include: "dev-1.0.jar")

mappings fileTree(dir: "custom_mappings", include: "**.zip")
modImplementation("io.github.minecraft-cursed-legacy:cursed-fabric-loader:${loader_version}") {
transitive false
}

}


configurations {
btwCompileClasspath.extendsFrom implementation, modImplementation
}
Expand All @@ -91,6 +101,10 @@ configurations.all {
force "org.lwjgl.lwjgl:lwjgl-platform:${lwjglVersion}"
}
}
loom {
// Set accesswidener
accessWidener = file("src/main/resources/metadataextensionmod.accesswidener")
}

processResources {
inputs.property "version", project.version
Expand All @@ -99,9 +113,24 @@ processResources {
}
}

loom {
// Set accesswidener
accessWidener = file("src/main/resources/metadataextensionmod.accesswidener")
idea {
module {
iml {
whenMerged { Module cp ->
def entry = cp.dependencies.find { entry -> entry.classes.any {
it.file.path.endsWith('dev.jar')
}}
// add javadoc jar
entry.javadoc.add getPathFactory().path("$buildDir/dev_run/dev-javadoc.jar")
}

generateTo = file(".idea/modules")
}
}
}

openIdea {

}

tasks.withType(JavaCompile).configureEach {
Expand Down Expand Up @@ -133,8 +162,8 @@ task devPackRun(type:Jar) {
from fileTree("$buildDir/classes/java/btw")
from fileTree("$projectDir/BTW_dev/")
from sourceSets.btw.output.resourcesDir
destinationDirectory = file("$buildDir/dev_run")
archiveFileName = "dev.jar"
destinationDirectory = file("mavenRepo/group/dev/1.0/")
archiveFileName = "dev-1.0.jar"
}

jar {
Expand Down Expand Up @@ -189,3 +218,5 @@ clean.doFirst {
delete "$buildDir/dev_run"
delete "$buildDir/BTW_dev"
}

downloadAssets.enabled = false
5 changes: 1 addition & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@
},

"license": "CC-BY-4.0",
"icon": "assets/metadataextensionmod/icon.png",
"icon": "metadataextensionmod/icon.png",

"environment": "*",
"entrypoints": {
"init": [
"btw.community.arminias.metadata.MetadataExtensionMod"
],
"gfh:prePreLaunch": [
"btw.community.arminias.metadata.MetadataExtensionMod"
]
},
"mixins": [
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/metadataextensionmod.accesswidener
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessWidener v1 named

accessible method net.minecraft.nbt.NBTBase write (Ljava/io/DataOutput;)V
accessible method net.minecraft.nbt.NBTBase load (Ljava/io/DataInput;)V
accessible method net.minecraft.src.NBTBase write (Ljava/io/DataOutput;)V
accessible method net.minecraft.src.NBTBase load (Ljava/io/DataInput;)V
3 changes: 2 additions & 1 deletion src/main/resources/metadataextensionmod.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
"injectors": {
"defaultRequire": 1,
"maxShiftBy": 5
}
},
"plugin": "net.devtech.grossfabrichacks.GrossFabricHacks"
}

0 comments on commit 02b4e85

Please sign in to comment.