Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,038 changes: 1,038 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions .github/workflows/gradle_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2

- name: Check out submodules
uses: snickerbockers/submodules-init@v4

- name: Set up JDK
uses: actions/setup-java@v1
with:
Expand All @@ -32,6 +29,7 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Gradle build
run: ./gradlew --build-cache build

Expand Down
72 changes: 41 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ buildscript {
}

dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:4.+'
classpath 'net.minecraftforge.gradle:ForgeGradle:5.+'
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}

Expand All @@ -19,28 +19,27 @@ apply plugin: 'kotlin'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
freeCompilerArgs += '-Xlambdas=indy'
}
}

compileJava {
sourceCompatibility = targetCompatibility = '1.8'
options.encoding = 'UTF-8'
}

compileKotlin.kotlinOptions {
freeCompilerArgs += '-Xlambdas=indy'
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-Xopt-in=kotlin.contracts.ExperimentalContracts'
}

repositories {
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
maven { url = 'https://impactdevelopment.github.io/maven/' }
maven { url = "https://jitpack.io" }
mavenCentral()
}


minecraft {
mappings channel: 'stable', version: '39-1.12'
mappings channel: "$mappingsChannel", version: "$mappingsVersion"

runs {
client {
Expand All @@ -51,12 +50,6 @@ minecraft {

property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'

mods {
pluginexample {
source sourceSets.main
}
}
}
}
}
Expand All @@ -72,13 +65,12 @@ configurations {
}

dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2855'
minecraft "net.minecraftforge:forge:$minecraftVersion-$forgeVersion"

// API coming soon
// implementation 'com.github.lambda-client:lambda:2.06'
implementation(files("lib/lambda-2.07.xx-dev-api.jar"))
// Online maven dependency coming soon
implementation files("lib/lambda-3.1-api.jar")

implementation('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
implementation('org.spongepowered:mixin:0.8.3') {
exclude module: 'commons-io'
exclude module: 'gson'
exclude module: 'guava'
Expand All @@ -87,51 +79,69 @@ dependencies {
}

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

// Kotlin libs
// kotlin-stdlib-common and annotations aren't required at runtime
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") {
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion") {
exclude module: 'kotlin-stdlib-common'
exclude module: 'annotations'
}

implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version") {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion") {
exclude module: 'kotlin-stdlib-common'
exclude module: 'annotations'
}

implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version") {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") {
exclude module: 'kotlin-stdlib-common'
exclude module: 'annotations'
}

implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version") {
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") {
exclude module: 'kotlin-stdlib-common'
exclude module: 'annotations'
}

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version") {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion") {
exclude module: 'kotlin-stdlib-common'
exclude module: 'annotations'
}

// Add them back to compileOnly (provided)
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"
compileOnly 'org.jetbrains:annotations:20.1.0'
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
compileOnly 'org.jetbrains:annotations:23.0.0'

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

// Unit Testing frameworks
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'

// Add your dependencies below
// jarLibs 'com.lambda:example:1.0.0'
}

mixin {
defaultObfuscationEnv 'searge'
add sourceSets.main, 'mixins.lambda.refmap.json'
add sourceSets.main, 'mixins.ExamplePlugin.refmap.json'
}

processResources {
exclude '**/rawimagefiles'

from(sourceSets.main.resources.srcDirs) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
include 'plugin_info.json'
expand 'version': project.version
}
}

test {
useJUnitPlatform()
}

jar.finalizedBy('reobfJar')
17 changes: 12 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
org.gradle.jvmargs=-Xmx3G
modGroup=com.lambda
modVersion=2.0.2
kotlin_version=1.5.20
kotlinx_coroutines_version=1.5.0-RC
org.gradle.parallel=true
org.gradle.parallel=true

modGroup=dev.toxicaven
modVersion=2.1

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

kotlinVersion=1.6.10
kotlinxCoroutinesVersion=1.6.0
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.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file removed lib/lambda-2.07.xx-dev-api.jar
Binary file not shown.
Binary file added lib/lambda-3.1-api-source.jar
Binary file not shown.
Binary file added lib/lambda-3.1-api.jar
Binary file not shown.
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

23 changes: 23 additions & 0 deletions setupWorkspace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

# Used to setup workspace and fix building on unix / Git BASH
#
# Usage: "./setupWorkspace.sh"

#

# To allow use from outside the lambda directory
cd "$(dirname "$0")" || exit

echo "[$(date +"%H:%M:%S")] Running gradlew classes without daemon..."
./gradlew --no-daemon classes || {
echo "[$(date +"%H:%M:%S")] ERROR: Running gradlew build failed! Run './gradlew --no-daemon classes' manually"
exit 1
}

cat logo_ascii.txt 2>/dev/null
echo "=========================================================================="
echo ""
echo "[$(date +"%H:%M:%S")] Build succeeded! All checks passed, you can build normally now! Welcome to Lambda."
echo ""
echo "=========================================================================="
9 changes: 0 additions & 9 deletions src/main/kotlin/AutoDupeLoader.kt

This file was deleted.

18 changes: 18 additions & 0 deletions src/main/kotlin/dev/toxicaven/DupePlugin.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package dev.toxicaven

import com.lambda.client.plugin.api.Plugin
import dev.toxicaven.modules.AutoItemDupe
import dev.toxicaven.modules.AutoShulkerDupe

internal object DupePlugin : Plugin() {

override fun onLoad() {
// Load any modules, commands, or HUD elements here
modules.add(AutoItemDupe)
modules.add(AutoShulkerDupe)
}

override fun onUnload() {
// Here you can unregister threads etc...
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package dev.toxicaven.modules

import com.lambda.client.event.SafeClientEvent
import com.lambda.client.manager.managers.PlayerPacketManager.sendPlayerPacket
import com.lambda.client.module.Category
Expand All @@ -8,6 +10,7 @@ import com.lambda.client.util.threads.defaultScope
import com.lambda.client.util.threads.runSafe
import com.lambda.client.util.threads.runSafeR
import com.lambda.client.util.threads.safeListener
import dev.toxicaven.DupePlugin
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import net.minecraft.client.gui.GuiScreen
Expand All @@ -31,11 +34,12 @@ internal object AutoItemDupe: PluginModule(
name = "AutoItemDupe",
category = Category.MISC,
description = "Dupe items on 5b5t",
pluginMain = AutoDupeLoader
pluginMain = DupePlugin
) {
private val cancelGUI by setting("Cancel GUI", true)
private val interacting by setting("Rotation Mode", RotationMode.SPOOF, description = "Force view client side, only server side or no interaction at all")
private var instructions by setting("Instructions", true)
private val confirm by setting("Confirm", false)

@Suppress("UNUSED")
enum class RotationMode {
Expand All @@ -60,7 +64,7 @@ internal object AutoItemDupe: PluginModule(

if (instructions) {
MessageSendHelper.sendChatMessage("To do the dupe, have wooden planks in your inventory, hold the item you wish to dupe, and toggle the module. wait until the item is picked back up.")
MessageSendHelper.sendWarningMessage("Shulkers cannot be duped using this method. use 'AutoShulkerDupe' for those.")
MessageSendHelper.sendWarningMessage("If 5b5t has disabled stacked shulkers, use 'AutoShulkerDupe' for those.")
instructions = false
}
} ?: disable()
Expand Down
Loading