1.16.4 + Modrinth

This commit is contained in:
JFronny 2020-12-12 20:32:51 +01:00
parent d517f1f641
commit 30e51cde58
5 changed files with 31 additions and 29 deletions

View File

@ -6,11 +6,21 @@ variables:
before_script: before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle - export GRADLE_USER_HOME=`pwd`/.gradle
deploy: build_test:
stage: deploy stage: deploy
script: gradle --build-cache assemble script:
- gradle --build-cache assemble
- cp build/libs/* ./
- rm *-dev.jar
- mv *.jar latest.jar
artifacts: artifacts:
paths: paths:
- build/libs - build/libs
- latest.jar
only: only:
- master - master
modrinth:
stage: deploy
when: manual
script: gradle --build-cache publishModrinth

View File

@ -1,6 +1,7 @@
plugins { plugins {
id 'fabric-loom' version '0.5-SNAPSHOT' id 'fabric-loom' version '0.5-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
id "com.modrinth.minotaur" version "1.1.0"
} }
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
@ -55,23 +56,18 @@ jar {
from "LICENSE" from "LICENSE"
} }
// configure the maven publication import com.modrinth.minotaur.TaskModrinthUpload
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}
// select the repositories you want to publish to task publishModrinth (type: TaskModrinthUpload){
repositories { token = System.getenv("MODRINTH_API_TOKEN") // Use an environment property!
// uncomment to publish to the local maven projectId = 'diCZrsch'
// mavenLocal() versionNumber = "${project.mod_version}"
uploadFile = remapJar // This is the java jar task
addGameVersion("${project.minecraft_version}")
addLoader('fabric')
versionName = "[${project.minecraft_version}] ${project.mod_version}"
afterEvaluate {
tasks.publishModrinth.dependsOn(remapJar)
tasks.publishModrinth.dependsOn(sourcesJar)
} }
} }

View File

@ -2,10 +2,10 @@
org.gradle.jvmargs=-Xmx1G org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://modmuss50.me/fabric.html # check these on https://modmuss50.me/fabric.html
minecraft_version=1.16.3 minecraft_version=1.16.4
yarn_mappings=1.16.3+build.27 yarn_mappings=1.16.4+build.7
loader_version=0.10.0+build.208 loader_version=0.10.8
# Mod Properties # Mod Properties
mod_version=1.1 mod_version=1.2
maven_group=io.gitlab.jfronny maven_group=io.gitlab.jfronny
archives_base_name=Slyde archives_base_name=Slyde

View File

@ -21,9 +21,7 @@ public abstract class SliderWidgetMixin {
@Overwrite @Overwrite
private void setValue(double mouseX) { private void setValue(double mouseX) {
double d = value; double d = value;
value = mouseX; value = SlydeClient.isActive() ? mouseX : MathHelper.clamp(mouseX, 0.0D, 1.0D);
if (!SlydeClient.isActive())
value = MathHelper.clamp(value, 0.0D, 1.0D);
if (d != value) { if (d != value) {
applyValue(); applyValue();
} }

View File

@ -25,9 +25,7 @@ public abstract class SodiumSliderControlMixin extends ControlElement<Integer> {
*/ */
@Overwrite(remap = false) @Overwrite(remap = false)
private void setValue(double d) { private void setValue(double d) {
this.thumbPosition = d; this.thumbPosition = SlydeClient.isActive() ? d : MathHelper.clamp(d, 0.0D, 1.0D);
if (!SlydeClient.isActive())
this.thumbPosition = MathHelper.clamp(this.thumbPosition, 0.0D, 1.0D);
int value = this.getIntValue(); int value = this.getIntValue();
if (this.option.getValue() != value) { if (this.option.getValue() != value) {
this.option.setValue(value); this.option.setValue(value);