Skip to content

Commit

Permalink
Update Lambda API 3.2 -> 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Avanatiker committed Feb 20, 2023
1 parent 559e3c4 commit 9de71f6
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 23 deletions.
27 changes: 16 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
version project.modVersion
group project.modGroup

buildscript {
repositories {
mavenCentral()
maven { url = 'https://maven.minecraftforge.net/' }
maven { url = 'https://repo.spongepowered.org/maven/' }
}

dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:4.+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'net.minecraftforge.gradle:ForgeGradle:5.+'
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
}

apply plugin: 'idea'
apply plugin: 'kotlin'
plugins {
id 'org.jetbrains.kotlin.jvm' version "$kotlinVersion"
}

apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'com.github.johnrengelman.shadow'

version project.modVersion
group project.modGroup

compileJava {
sourceCompatibility = targetCompatibility = '1.8'
options.encoding = 'UTF-8'
// Disables Gradle build caching for this task
// If build caching is enabled this can cause the refmap to not be built and included
outputs.upToDateWhen { false }
}

compileKotlin.kotlinOptions {
Expand Down Expand Up @@ -68,9 +73,9 @@ dependencies {
minecraft "net.minecraftforge:forge:$minecraftVersion-$forgeVersion"

// Online maven dependency coming soon
implementation files("lib/lambda-3.2-api.jar")
implementation files("lib/lambda-3.3.0-api.jar")

implementation('org.spongepowered:mixin:0.8.3') {
implementation('org.spongepowered:mixin:0.8.5') {
exclude module: 'commons-io'
exclude module: 'gson'
exclude module: 'guava'
Expand All @@ -79,7 +84,7 @@ dependencies {
}

// Hacky way to get mixin work
annotationProcessor('org.spongepowered:mixin:0.8.3:processor') {
annotationProcessor('org.spongepowered:mixin:0.8.5:processor') {
exclude module: 'gson'
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.parallel=true

modGroup=com.lambda
modVersion=10.3
modVersion=10.3.1

minecraftVersion=1.12.2
forgeVersion=14.23.5.2860
mappingsChannel=stable
mappingsVersion=39-1.12

kotlinVersion=1.7.10
kotlinVersion=1.8.10
kotlinxCoroutinesVersion=1.6.4
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file removed lib/lambda-3.2-api.jar
Binary file not shown.
Binary file not shown.
Binary file added lib/lambda-3.3.0-api.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions src/main/kotlin/trombone/IO.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import HighwayTools.proxyCommand
import HighwayTools.rubberbandTimeout
import HighwayTools.usingProxy
import com.lambda.client.event.SafeClientEvent
import com.lambda.client.module.modules.combat.AutoLog
import com.lambda.client.module.modules.combat.AutoDisconnect
import com.lambda.client.module.modules.misc.AntiAFK
import com.lambda.client.module.modules.misc.AutoObsidian
import com.lambda.client.module.modules.movement.AntiHunger
Expand Down Expand Up @@ -104,7 +104,7 @@ object IO {
MessageSendHelper.sendRawChatMessage(" §c[!] You should activate AutoEat to not die on starvation.")
}

if (AutoLog.isDisabled) {
if (AutoDisconnect.isDisabled) {
MessageSendHelper.sendRawChatMessage(" §c[!] You should activate AutoLog to prevent most deaths when afk.")

This comment has been minimized.

Copy link
@kdh8219

kdh8219 Feb 20, 2023

we should change AutoLog to AutoDisconnect

}

Expand Down
5 changes: 3 additions & 2 deletions src/main/kotlin/trombone/handler/Container.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import net.minecraft.item.ItemShulkerBox
import net.minecraft.item.ItemStack
import net.minecraft.util.EnumFacing
import net.minecraft.util.NonNullList
import net.minecraft.util.math.AxisAlignedBB
import net.minecraft.util.math.BlockPos
import net.minecraft.util.text.TextFormatting
import trombone.blueprint.BlueprintGenerator.isInsideBlueprintBuild
Expand Down Expand Up @@ -140,7 +141,7 @@ object Container {
.filter { pos ->
!isInsideBlueprintBuild(pos)
&& pos != currentBlockPos
&& world.isPlaceable(pos)
&& world.isPlaceable(pos, AxisAlignedBB(pos))
&& !world.getBlockState(pos.down()).isReplaceable
&& world.isAirBlock(pos.up())
&& getVisibleSides(pos.down()).contains(EnumFacing.UP)
Expand Down Expand Up @@ -199,7 +200,7 @@ object Container {
.filter { pos ->
world.isAirBlock(pos.up())
&& world.isAirBlock(pos)
&& !world.isPlaceable(pos.down())
&& !world.isPlaceable(pos.down(), AxisAlignedBB(pos))
}
.sortedWith(
compareBy<BlockPos> {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/trombone/handler/Inventory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object Inventory {
if (lastHitVec == Vec3d.ZERO) return
val rotation = getRotationTo(lastHitVec)

module.sendPlayerPacket {
sendPlayerPacket {
rotate(rotation)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/trombone/handler/Packet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object Packet {
if (!isInsideBlueprint(pos)) return

val prev = world.getBlockState(pos).block
val new = packet.getBlockState().block
val new = packet.blockState.block

if (prev != new) {
val task = if (pos == containerTask.blockPos) {
Expand Down
5 changes: 3 additions & 2 deletions src/main/kotlin/trombone/task/TaskExecutor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock
import net.minecraft.util.EnumFacing
import net.minecraft.util.EnumHand
import net.minecraft.util.SoundCategory
import net.minecraft.util.math.AxisAlignedBB
import net.minecraft.util.math.BlockPos
import trombone.*
import trombone.IO.disableError
Expand Down Expand Up @@ -338,7 +339,7 @@ object TaskExecutor {
when (blockTask.targetBlock) {
fillerMat -> {
if (world.getBlockState(blockTask.blockPos.up()).block == material ||
(!world.isPlaceable(blockTask.blockPos) &&
(!world.isPlaceable(blockTask.blockPos, AxisAlignedBB(blockTask.blockPos)) &&
world.getCollisionBox(blockTask.blockPos) != null)) {
blockTask.updateState(TaskState.DONE)
return
Expand Down Expand Up @@ -421,7 +422,7 @@ object TaskExecutor {

if (updateOnly) return

if (!world.isPlaceable(blockTask.blockPos)) {
if (!world.isPlaceable(blockTask.blockPos, AxisAlignedBB(blockTask.blockPos))) {
if (debugLevel == IO.DebugLevel.VERBOSE) {
if (!anonymizeStats) {
MessageSendHelper.sendChatMessage("${module.chatName} Invalid place position @(${blockTask.blockPos.asString()}) Removing task")
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/trombone/task/TaskManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ object TaskManager {
&& (it.taskState == TaskState.DONE
|| it.taskState == TaskState.IMPOSSIBLE_PLACE
|| (it.taskState == TaskState.PLACE
&& !world.isPlaceable(it.blockPos))))) {
&& !world.isPlaceable(it.blockPos, AxisAlignedBB(it.blockPos)
))))) {
tasks[blockTask.blockPos] = blockTask
}
} ?: run {
Expand Down

0 comments on commit 9de71f6

Please sign in to comment.