Skip to content

Commit efd02c1

Browse files
committed
Update to new Lambda API 3.0.1 -> 3.1
1 parent 66619c4 commit efd02c1

File tree

11 files changed

+44
-25
lines changed

11 files changed

+44
-25
lines changed

build.gradle

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'net.minecraftforge.gradle:ForgeGradle:4.+'
12-
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
11+
classpath 'net.minecraftforge.gradle:ForgeGradle:5.+'
1312
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
1413
}
1514
}
1615

1716
apply plugin: 'idea'
1817
apply plugin: 'kotlin'
1918
apply plugin: 'net.minecraftforge.gradle'
20-
apply plugin: 'org.spongepowered.mixin'
2119

2220
compileJava {
2321
sourceCompatibility = targetCompatibility = '1.8'
@@ -67,11 +65,10 @@ configurations {
6765
dependencies {
6866
minecraft "net.minecraftforge:forge:$minecraftVersion-$forgeVersion"
6967

70-
// API coming soon
71-
// implementation 'com.github.lambda-client:lambda:2.12'
72-
implementation(files("lib/lambda-3.0.1-api.jar"))
68+
// Online maven dependency coming soon
69+
implementation files("lib/lambda-3.1-api.jar")
7370

74-
implementation('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
71+
implementation('org.spongepowered:mixin:0.8.3') {
7572
exclude module: 'commons-io'
7673
exclude module: 'gson'
7774
exclude module: 'guava'
@@ -80,7 +77,7 @@ dependencies {
8077
}
8178

8279
// Hacky way to get mixin work
83-
annotationProcessor('org.spongepowered:mixin:0.8.2:processor') {
80+
annotationProcessor('org.spongepowered:mixin:0.8.3:processor') {
8481
exclude module: 'gson'
8582
}
8683

@@ -113,29 +110,29 @@ dependencies {
113110

114111
// Add them back to compileOnly (provided)
115112
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
116-
compileOnly 'org.jetbrains:annotations:22.0.0'
113+
compileOnly 'org.jetbrains:annotations:23.0.0'
117114

118115
// This Baritone will NOT be included in the jar
119116
implementation 'com.github.cabaletta:baritone:1.2.14'
120117

118+
// Unit Testing frameworks
119+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
120+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
121+
121122
// Add your dependencies below
122123
// jarLibs 'com.lambda:example:1.0.0'
123124
}
124125

125-
mixin {
126-
defaultObfuscationEnv 'searge'
127-
add sourceSets.main, 'mixins.lambda.refmap.json'
128-
}
129-
130126
processResources {
131-
inputs.property 'version', project.version
132-
133127
exclude '**/rawimagefiles'
134128

135129
from(sourceSets.main.resources.srcDirs) {
130+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
136131
include 'plugin_info.json'
137132
expand 'version': project.version
138133
}
139134
}
140135

141-
jar.finalizedBy('reobfJar')
136+
test {
137+
useJUnitPlatform()
138+
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ mappingsChannel=stable
1010
mappingsVersion=39-1.12
1111

1212
kotlinVersion=1.6.10
13-
kotlinxCoroutinesVersion=1.6.0
13+
kotlinxCoroutinesVersion=1.6.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
Binary file not shown.
3.38 MB
Binary file not shown.

setupWorkspace.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
# Used to setup workspace and fix building on unix / Git BASH
4+
#
5+
# Usage: "./setupWorkspace.sh"
6+
7+
#
8+
9+
# To allow use from outside the lambda directory
10+
cd "$(dirname "$0")" || exit
11+
12+
echo "[$(date +"%H:%M:%S")] Running gradlew classes without daemon..."
13+
./gradlew --no-daemon classes || {
14+
echo "[$(date +"%H:%M:%S")] ERROR: Running gradlew build failed! Run './gradlew --no-daemon classes' manually"
15+
exit 1
16+
}
17+
18+
cat logo_ascii.txt 2>/dev/null
19+
echo "=========================================================================="
20+
echo ""
21+
echo "[$(date +"%H:%M:%S")] Build succeeded! All checks passed, you can build normally now! Welcome to Lambda."
22+
echo ""
23+
echo "=========================================================================="

src/main/kotlin/HighwayTools.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import com.lambda.client.event.events.PacketEvent
22
import com.lambda.client.event.events.PlayerTravelEvent
33
import com.lambda.client.event.events.RenderOverlayEvent
44
import com.lambda.client.event.events.RenderWorldEvent
5+
import com.lambda.client.event.listener.listener
56
import com.lambda.client.module.Category
67
import com.lambda.client.plugin.api.PluginModule
78
import com.lambda.client.setting.settings.impl.collection.CollectionSetting
89
import com.lambda.client.util.items.shulkerList
910
import com.lambda.client.util.threads.runSafe
1011
import com.lambda.client.util.threads.runSafeR
1112
import com.lambda.client.util.threads.safeListener
12-
import com.lambda.event.listener.listener
1313
import net.minecraft.block.Block
1414
import net.minecraft.init.Blocks
1515
import net.minecraft.init.Items

src/main/kotlin/trombone/Blueprint.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import HighwayTools.mode
1616
import HighwayTools.railing
1717
import HighwayTools.railingHeight
1818
import HighwayTools.width
19+
import com.lambda.client.commons.extension.ceilToInt
20+
import com.lambda.client.commons.extension.floorToInt
1921
import com.lambda.client.util.math.Direction
2022
import com.lambda.client.util.math.VectorUtils.distanceTo
2123
import com.lambda.client.util.math.VectorUtils.multiply
22-
import com.lambda.commons.extension.ceilToInt
23-
import com.lambda.commons.extension.floorToInt
2424
import net.minecraft.block.Block
2525
import net.minecraft.init.Blocks
2626
import net.minecraft.util.math.BlockPos

src/main/kotlin/trombone/handler/Container.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import HighwayTools.saveFood
88
import HighwayTools.saveMaterial
99
import HighwayTools.saveTools
1010
import HighwayTools.searchEChest
11+
import com.lambda.client.commons.extension.ceilToInt
1112
import com.lambda.client.event.SafeClientEvent
1213
import com.lambda.client.util.EntityUtils.getDroppedItems
1314
import com.lambda.client.util.TickTimer
@@ -18,7 +19,6 @@ import com.lambda.client.util.math.VectorUtils.toVec3dCenter
1819
import com.lambda.client.util.world.getVisibleSides
1920
import com.lambda.client.util.world.isPlaceable
2021
import com.lambda.client.util.world.isReplaceable
21-
import com.lambda.commons.extension.ceilToInt
2222
import net.minecraft.init.Blocks
2323
import net.minecraft.init.Items
2424
import net.minecraft.inventory.ItemStackHelper

src/main/kotlin/trombone/handler/Tasks.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import HighwayTools.saveTools
1717
import HighwayTools.saveFood
1818
import HighwayTools.manageFood
1919
import HighwayTools.storageManagement
20+
import com.lambda.client.commons.extension.ceilToInt
2021
import com.lambda.client.event.SafeClientEvent
2122
import com.lambda.client.manager.managers.PlayerInventoryManager
2223
import com.lambda.client.module.modules.player.InventoryManager
@@ -27,7 +28,6 @@ import com.lambda.client.util.math.VectorUtils.multiply
2728
import com.lambda.client.util.math.VectorUtils.toVec3dCenter
2829
import com.lambda.client.util.text.MessageSendHelper
2930
import com.lambda.client.util.world.*
30-
import com.lambda.commons.extension.ceilToInt
3131
import kotlinx.coroutines.runBlocking
3232
import kotlinx.coroutines.sync.Mutex
3333
import kotlinx.coroutines.sync.withLock

0 commit comments

Comments
 (0)