SwordBlocking 1.2.0 - 1.19.3, Config, Axe blocking,

- Added configuration screen based on MidnightLib
- Made everything configurable
- Add option to hide offhand slot when it contains a shield
- Fix 3rd-person blocking
This commit is contained in:
Motschen
2023-01-28 19:41:02 +01:00
parent c847b0f1d0
commit ca198eeea3
44 changed files with 553 additions and 355 deletions

View File

@@ -1,20 +1,17 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
minecraft {
}
repositories {
maven { url "https://jitpack.io" }
maven { url "https://api.modrinth.com/maven" }
}
dependencies {
@@ -22,8 +19,9 @@ dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "maven.modrinth:midnightlib:${midnightlib_version}"
}
processResources {
@@ -34,23 +32,27 @@ processResources {
}
}
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}
jar {
from "LICENSE"
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
remapJar {
archiveVersion = "${project.version}-${project.minecraft_version}"
archiveBaseName = "${project.archivesBaseName}"
}
// configure the maven publication
@@ -67,9 +69,11 @@ publishing {
}
}
// select the repositories you want to publish to
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// uncomment to publish to the local maven
// mavenLocal()
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}