🔧 Fix some dependency management.

This commit is contained in:
LambdAurora
2020-01-14 11:33:19 +01:00
parent a8c969b176
commit 7bfff00841
8 changed files with 25 additions and 12 deletions

View File

@@ -2,6 +2,8 @@ plugins {
id 'java-library' id 'java-library'
} }
archivesBaseName = project.archives_base_name + "-core"
dependencies { dependencies {
api "org.jetbrains:annotations:17.0.0" api "org.jetbrains:annotations:17.0.0"
api "org.aperlambda:lambdajcommon:1.7.2" api "org.aperlambda:lambdajcommon:1.7.2"

View File

@@ -11,11 +11,11 @@ repositories {
} }
dependencies { dependencies {
api project(":common") api project(":core")
implementation "org.mcelytra:elytra-core:1.0.0-SNAPSHOT" implementation "org.mcelytra:elytra-core:1.0.0-SNAPSHOT"
} }
java { java {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
} }

View File

@@ -29,6 +29,10 @@ repositories {
} }
} }
configurations {
shadow
}
dependencies { dependencies {
//to change the versions see the gradle.properties file //to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}" minecraft "com.mojang:minecraft:${project.minecraft_version}"
@@ -46,8 +50,8 @@ dependencies {
// Compatibility mods // Compatibility mods
modCompile "io.github.joaoh1:okzoomer:2.0.1" modCompile "io.github.joaoh1:okzoomer:2.0.1"
api project(":common") api project(":core")
include project(":common") shadow project(":core")
include "org.jetbrains:annotations:17.0.0" include "org.jetbrains:annotations:17.0.0"
include "org.aperlambda:lambdajcommon:1.7.2" include "org.aperlambda:lambdajcommon:1.7.2"
include "com.electronwill.night-config:core:3.5.3" include "com.electronwill.night-config:core:3.5.3"
@@ -74,4 +78,12 @@ java {
jar { jar {
from "../LICENSE" from "../LICENSE"
from {
configurations.shadow.filter {
it.getName().contains("lambdacontrols")
}.collect {
it.isDirectory() ? it : zipTree(it)
}
}
} }

View File

@@ -30,9 +30,8 @@ public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity
{ {
private boolean lambdacontrols_drifting_prevented = false; private boolean lambdacontrols_drifting_prevented = false;
// Can be mapped as `hasMovementInput` for example.
@Shadow @Shadow
protected abstract boolean method_22120(); protected abstract boolean hasMovementInput();
public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile) public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile)
{ {
@@ -45,7 +44,7 @@ public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity
LambdaControlsClient mod = LambdaControlsClient.get(); LambdaControlsClient mod = LambdaControlsClient.get();
if (type == MovementType.SELF) { if (type == MovementType.SELF) {
if (this.abilities.flying && !mod.config.has_fly_drifting()) { if (this.abilities.flying && !mod.config.has_fly_drifting()) {
if (!this.method_22120()) { if (!this.hasMovementInput()) {
if (!this.lambdacontrols_drifting_prevented) { if (!this.lambdacontrols_drifting_prevented) {
this.setVelocity(this.getVelocity().multiply(0, 1.0, 0)); this.setVelocity(this.getVelocity().multiply(0, 1.0, 0));
} }

View File

@@ -4,16 +4,16 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
minecraft_version=1.15.1 minecraft_version=1.15.1
yarn_mappings=1.15.1+build.35:v2 yarn_mappings=1.15.1+build.37:v2
loader_version=0.7.2+build.174 loader_version=0.7.3+build.176
# Mod Properties # Mod Properties
mod_version = 1.1.0-test6 mod_version = 1.1.0-test7
maven_group = me.lambdaurora maven_group = me.lambdaurora
archives_base_name = lambdacontrols archives_base_name = lambdacontrols
# Dependencies # Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.4.26+build.283-1.15 fabric_version=0.4.27+build.286-1.15
spruceui_version=1.0.1 spruceui_version=1.0.1

View File

@@ -10,4 +10,4 @@ pluginManagement {
} }
rootProject.name = 'lambdacontrols' rootProject.name = 'lambdacontrols'
include 'common', 'fabric', 'elytra' include 'core', 'fabric', 'elytra'