Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffold rewrite #462

Merged
merged 45 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
46459b9
Sketch
Avanatiker Oct 4, 2022
fba9077
Working sketch
Avanatiker Oct 6, 2022
a8fad4f
Better default settings
Avanatiker Oct 6, 2022
db538b7
Fix rubberbanding
Avanatiker Oct 6, 2022
51c06b7
Merge branch 'master' into scaffoldRewrite
Avanatiker Nov 4, 2022
87ebc51
Merge branch 'master' into scaffoldRewrite
Avanatiker Nov 17, 2022
1ffe9f2
Merge branch 'master' into scaffoldRewrite
Avanatiker Nov 21, 2022
0919d75
Merge branch 'master' into scaffoldRewrite
Avanatiker Jan 23, 2023
97f5ab7
Fix previous block state and default settings
Avanatiker Jan 23, 2023
d11dd6c
Fix placement selection
Avanatiker Jan 23, 2023
4105c5c
Scaffold rewrite
rfresh2 Jan 16, 2023
3605f0f
Scaffold: don't swap to block if we already have one equipped
rfresh2 Jan 20, 2023
634e2e5
Scaffold: Whitelist/Blacklist/Any block selection modes
rfresh2 Jan 20, 2023
119fa9b
Fix tower teleports by moving back onto top block
rfresh2 Jan 23, 2023
30ac507
Merge remote-tracking branch 'upstream/scaffoldRewrite' into scaffold…
rfresh2 Jan 23, 2023
c575fa4
merge rfresh+constructor scaffolds
rfresh2 Jan 23, 2023
e47fad8
Small changes
Avanatiker Jan 23, 2023
c1f83ec
only tower when player is not moving
rfresh2 Jan 23, 2023
6370650
refactor block selection
rfresh2 Jan 24, 2023
1a27222
Little cleanup
Avanatiker Jan 24, 2023
36aa8db
tower check hotbarspoof compat
rfresh2 Jan 24, 2023
6452966
in water tower check
rfresh2 Jan 24, 2023
21cb97c
water tower scaffold and place on water surface
rfresh2 Jan 24, 2023
daee9d6
small style
rfresh2 Jan 24, 2023
3663317
swap in blocks from inventory when not in hotbar
rfresh2 Jan 24, 2023
a1d56c1
assign all settings to a page
rfresh2 Jan 24, 2023
59ac10c
Added NoFall enabler and boundary checks for placements
Avanatiker Jan 25, 2023
ef7f33c
Build down mode
Avanatiker Jan 25, 2023
635d32f
Missed this
Avanatiker Jan 25, 2023
21a1b29
tower: burrow check
rfresh2 Jan 25, 2023
871a98d
improve water tower reliability
rfresh2 Jan 25, 2023
8d33f61
reset movement speed to slightly slower than normal during down scaffold
rfresh2 Jan 25, 2023
89a9bbc
mc bingbong
rfresh2 Jan 25, 2023
099e2b0
Cleanup
Avanatiker Jan 25, 2023
fd7cba6
prevent sneak place opening blacklisted blocks
rfresh2 Jan 25, 2023
036434f
barrier = undefined, prefer not sneaking ig
rfresh2 Jan 25, 2023
e719910
oneliner
rfresh2 Jan 25, 2023
cf5ecf6
Other defaults and prevent action on flight
Avanatiker Jan 25, 2023
5eb32f1
Check for correct item
Avanatiker Jan 25, 2023
7cbba79
Use shulkerList
Avanatiker Jan 25, 2023
296772b
Ops i mean blacklist
Avanatiker Jan 25, 2023
9e4ebb9
Fix blockBlacklist
Avanatiker Jan 25, 2023
6b8a87d
Seems to need both
Avanatiker Jan 25, 2023
7ae32f4
Use utils
Avanatiker Jan 25, 2023
15f0fb0
Revert unneeded code
Avanatiker Jan 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions src/main/kotlin/com/lambda/client/command/commands/ScaffoldCommand.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
package com.lambda.client.command.commands

import com.lambda.client.command.ClientCommand
import com.lambda.client.module.modules.player.Scaffold
import com.lambda.client.util.items.shulkerList
import com.lambda.client.util.text.MessageSendHelper
import com.lambda.client.util.text.formatValue

object ScaffoldCommand : ClientCommand(
name = "scaffold",
description = "Manage scaffold whitelist/blacklist"
) {
init {
literal("whitelist", "wl") {
literal("add", "+") {
literal("shulker_box") {
execute("Add all shulker box types to whitelist") {
Scaffold.blockSelectionWhitelist.editValue { whitelist -> shulkerList.forEach { whitelist.add(it.localizedName) } }
MessageSendHelper.sendChatMessage("All shulker boxes have been added to whitelist")
}
}
block("block") { blockArg ->
execute("Add a block to Scaffold whitelist") {
val blockName = blockArg.value.registryName.toString()
if (Scaffold.blockSelectionWhitelist.contains(blockName)) {
MessageSendHelper.sendErrorMessage("${formatValue(blockName)} is already added to scaffold whitelist")
} else {
Scaffold.blockSelectionWhitelist.editValue { it.add(blockName) }
MessageSendHelper.sendChatMessage("${formatValue(blockName)} has been added to scaffold whitelist")
}
}
}
}
literal("del", "-") {
literal("shulker_box") {
execute("Remove all shulker box types from whitelist") {
Scaffold.blockSelectionWhitelist.editValue { whitelist -> shulkerList.forEach { whitelist.remove(it.localizedName) } }
MessageSendHelper.sendChatMessage("All shulker boxes have been removed from whitelist")
}
}
block("block") { blockArg ->
execute("Removes a block from the Scaffold whitelist") {
val blockName = blockArg.value.registryName.toString()
Scaffold.blockSelectionWhitelist.editValue { it.remove(blockName) }
MessageSendHelper.sendChatMessage("${formatValue(blockName)} has been removed from scaffold whitelist")
}
}
}
literal("clear", "c") {
execute {
Scaffold.blockSelectionWhitelist.editValue { it.clear() }
MessageSendHelper.sendChatMessage("Whitelist has been cleared")
}
}
literal("list") {
execute {
MessageSendHelper.sendChatMessage("Blocks: ${Scaffold.blockSelectionWhitelist.joinToString()}")
}
}
}
literal("blacklist", "bl") {
literal("add", "+") {
literal("shulker_box") {
execute("Add all shulker box types to blacklist") {
Scaffold.blockSelectionBlacklist.editValue { blacklist -> shulkerList.forEach { blacklist.add(it.localizedName) } }
MessageSendHelper.sendChatMessage("All shulker boxes have been added to blacklist")
}
}
block("block") { blockArg ->
execute("Add a block to Scaffold blacklist") {
val blockName = blockArg.value.registryName.toString()
if (Scaffold.blockSelectionBlacklist.contains(blockName)) {
MessageSendHelper.sendErrorMessage("${formatValue(blockName)} is already added to scaffold blacklist")
} else {
Scaffold.blockSelectionBlacklist.editValue { it.add(blockName) }
MessageSendHelper.sendChatMessage("${formatValue(blockName)} has been added to scaffold blacklist")
}
}
}
}
literal("del", "-") {
literal("shulker_box") {
execute("Remove all shulker box types from blacklist") {
Scaffold.blockSelectionBlacklist.editValue { blacklist -> shulkerList.forEach { blacklist.remove(it.localizedName) } }
MessageSendHelper.sendChatMessage("All shulker boxes have been removed from blacklist")
}
}
block("block") { blockArg ->
execute("Removes a block from the Scaffold blacklist") {
val blockName = blockArg.value.registryName.toString()
Scaffold.blockSelectionBlacklist.editValue { it.remove(blockName) }
MessageSendHelper.sendChatMessage("${formatValue(blockName)} has been removed from scaffold blacklist")
}
}
}
literal("clear", "c") {
execute {
Scaffold.blockSelectionBlacklist.editValue { it.clear() }
MessageSendHelper.sendChatMessage("Blacklist has been cleared")
}
}
literal("list") {
execute {
MessageSendHelper.sendChatMessage("Blocks: ${Scaffold.blockSelectionBlacklist.joinToString()}")
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ object NoFall : Module(
category = Category.PLAYER
) {
private val distance by setting("Distance", 3, 1..10, 1)
private val mode by setting("Mode", Mode.CATCH)
var mode by setting("Mode", Mode.CATCH)
private val fallModeSetting by setting("Fall", FallMode.PACKET, { mode == Mode.FALL })
private val catchModeSetting by setting("Catch", CatchMode.MOTION, { mode == Mode.CATCH })
private val voidOnly by setting("Void Only", false, { mode == Mode.CATCH })

private enum class Mode {
enum class Mode {
FALL, CATCH
}

Expand Down
Loading