-
-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nextgen' into feat/deep-learning
- Loading branch information
Showing
13 changed files
with
363 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
.../ccbluex/liquidbounce/features/module/modules/player/autoqueue/actions/AutoQueueAction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce) | ||
* | ||
* Copyright (c) 2015 - 2025 CCBlueX | ||
* | ||
* LiquidBounce is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* LiquidBounce is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* | ||
*/ | ||
package net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.actions | ||
|
||
import net.ccbluex.liquidbounce.config.types.Choice | ||
import net.ccbluex.liquidbounce.config.types.ChoiceConfigurable | ||
import net.ccbluex.liquidbounce.event.Sequence | ||
import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.presets.AutoQueueCustom.triggers | ||
|
||
abstract class AutoQueueAction(name: String) : Choice(name) { | ||
override val parent: ChoiceConfigurable<*> | ||
get() = triggers | ||
abstract suspend fun execute(sequence: Sequence) | ||
} |
36 changes: 36 additions & 0 deletions
36
...luex/liquidbounce/features/module/modules/player/autoqueue/actions/AutoQueueActionChat.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce) | ||
* | ||
* Copyright (c) 2015 - 2025 CCBlueX | ||
* | ||
* LiquidBounce is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* LiquidBounce is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* | ||
*/ | ||
package net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.actions | ||
|
||
import net.ccbluex.liquidbounce.event.Sequence | ||
|
||
object AutoQueueActionChat : AutoQueueAction("Chat") { | ||
|
||
private val message by text("Message", "/play solo_normal") | ||
|
||
override suspend fun execute(sequence: Sequence) { | ||
if (message.startsWith("/")) { | ||
network.sendCommand(message.substring(1)) | ||
} else { | ||
network.sendChatMessage(message) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
.../ccbluex/liquidbounce/features/module/modules/player/autoqueue/presets/AutoQueueCustom.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/* | ||
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce) | ||
* | ||
* Copyright (c) 2015 - 2025 CCBlueX | ||
* | ||
* LiquidBounce is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* LiquidBounce is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* | ||
*/ | ||
package net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.presets | ||
|
||
import net.ccbluex.liquidbounce.config.types.Choice | ||
import net.ccbluex.liquidbounce.config.types.ChoiceConfigurable | ||
import net.ccbluex.liquidbounce.config.types.ToggleableConfigurable | ||
import net.ccbluex.liquidbounce.event.events.WorldChangeEvent | ||
import net.ccbluex.liquidbounce.event.handler | ||
import net.ccbluex.liquidbounce.event.tickHandler | ||
import net.ccbluex.liquidbounce.features.module.modules.combat.killaura.ModuleKillAura | ||
import net.ccbluex.liquidbounce.features.module.modules.movement.speed.ModuleSpeed | ||
import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.ModuleAutoQueue | ||
import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.actions.AutoQueueAction | ||
import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.actions.AutoQueueActionChat | ||
import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.actions.AutoQueueActionUseItem | ||
import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.trigger.* | ||
|
||
object AutoQueueCustom : Choice("Custom") { | ||
|
||
override val parent: ChoiceConfigurable<*> | ||
get() = ModuleAutoQueue.presets | ||
|
||
internal val triggers = choices<AutoQueueTrigger>("Trigger", 0) { | ||
arrayOf( | ||
AutoQueueTriggerMessage, | ||
AutoQueueTriggerItem, | ||
AutoQueueTriggerTabHeader, | ||
AutoQueueTriggerTabFooter | ||
) | ||
} | ||
|
||
internal val actions = choices<AutoQueueAction>("Action", 0) { | ||
arrayOf( | ||
AutoQueueActionChat, | ||
AutoQueueActionUseItem | ||
) | ||
} | ||
|
||
object Control : ToggleableConfigurable(this, "Control", true) { | ||
|
||
val killAura by boolean("KillAura", true) | ||
val speed by boolean("Speed", false) | ||
|
||
fun changeGameState(isInGame: Boolean) { | ||
if (!enabled) { | ||
return | ||
} | ||
|
||
if (killAura) ModuleKillAura.enabled = isInGame | ||
if (speed) ModuleSpeed.enabled = isInGame | ||
} | ||
|
||
} | ||
|
||
init { | ||
tree(Control) | ||
} | ||
|
||
private val waitUntilWorldChange by boolean("WaitUntilWorldChange", true) | ||
private var worldChangeOccurred = false | ||
|
||
@Suppress("unused") | ||
private val tickHandler = tickHandler { | ||
val trigger = triggers.activeChoice | ||
|
||
if (trigger.isTriggered) { | ||
Control.changeGameState(false) | ||
|
||
actions.activeChoice.execute(this) | ||
onCancellation { Control.changeGameState(true) } | ||
|
||
if (waitUntilWorldChange) { | ||
waitUntil { worldChangeOccurred } | ||
worldChangeOccurred = false | ||
} | ||
|
||
waitTicks(20) | ||
Control.changeGameState(true) | ||
} | ||
} | ||
|
||
@Suppress("unused") | ||
private val worldChange = handler<WorldChangeEvent> { event -> | ||
worldChangeOccurred = true | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...ccbluex/liquidbounce/features/module/modules/player/autoqueue/trigger/AutoQueueTrigger.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce) | ||
* | ||
* Copyright (c) 2015 - 2025 CCBlueX | ||
* | ||
* LiquidBounce is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* LiquidBounce is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* | ||
*/ | ||
|
||
package net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.trigger | ||
|
||
import net.ccbluex.liquidbounce.config.types.Choice | ||
import net.ccbluex.liquidbounce.config.types.ChoiceConfigurable | ||
import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.presets.AutoQueueCustom.triggers | ||
|
||
abstract class AutoQueueTrigger(name: String) : Choice(name) { | ||
override val parent: ChoiceConfigurable<*> | ||
get() = triggers | ||
abstract val isTriggered: Boolean | ||
} |
46 changes: 46 additions & 0 deletions
46
...uex/liquidbounce/features/module/modules/player/autoqueue/trigger/AutoQueueTriggerItem.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce) | ||
* | ||
* Copyright (c) 2015 - 2025 CCBlueX | ||
* | ||
* LiquidBounce is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* LiquidBounce is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* | ||
*/ | ||
|
||
package net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.trigger | ||
|
||
import net.ccbluex.liquidbounce.utils.client.convertToString | ||
import net.ccbluex.liquidbounce.utils.inventory.Slots | ||
|
||
/** | ||
* Can be used for different server that use paper to join a game | ||
*/ | ||
object AutoQueueTriggerItem : AutoQueueTrigger("Item") { | ||
|
||
/** | ||
* The [itemName] of the item when to trigger the queue, | ||
* which can be a different item than we use in the [AutoQueueTriggerItem] action. | ||
* | ||
* The name also can be a custom name of the item and does not have to be matching, | ||
* and only contains the text. | ||
*/ | ||
private val itemName by text("Name", "Paper") | ||
|
||
override val isTriggered: Boolean | ||
get() = Slots.Hotbar.findSlot { itemStack -> | ||
itemStack.name.convertToString().contains(itemName) | ||
} != null | ||
|
||
} |
Oops, something went wrong.