AutoBlockPicker for scaffold pls
-
liquidbounce's scaffold already have it
but if you want to make it not silent, you can skid scaffold's codes xdxd -
My code:
Scaffold(I am lazy so I use kt to show these, may have errors)
private val pickerValue = BoolValue("Picker", true) private val pickerSlotValue = IntValue("PickerSlot", 3, 1, 9) //... //on find slot var slot = InventoryUtils.findAutoBlockBlock(pickerValue.get()) if (slot == -1) return else if ((slot - 9 or 35 - slot) >= 0) { mc.playerController.windowClick(0, slot, pickerSlotValue.get() - 1, 2, mc.thePlayer) slot = pickerSlotValue.get() - 1 } //...send Packet
InvUtils
@JvmStatic fun canAutoBlock(itemStack: ItemStack) = itemStack?.item is ItemBlock && itemStack?.item.block !in BLOCK_BLACKLIST @JvmStatic fun findAutoBlockBlock(pick: Boolean): Int = (36..44).map{ it to mc.player.inventoryContainer.getSlot(it).stack } .filter{ canAutoBlock(it.second) }.firstOrNull()?.first ?: if (pick) (9..35).map{ it to mc.player.inventoryContainer.getSlot(it).stack } .filter{ canAutoBlock(it.second) }.maxBy{ it.second.stackSize }?.first ?: -1 else -1
enjoy
-