Skip to content

Plz accept bobby the constructor 🥺🥺🥺 #3

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
70 changes: 40 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:4.+'
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.06.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:1.6.21"
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.ElytraBot.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')
14 changes: 10 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
kotlin.code.style=official
org.gradle.jvmargs=-Xmx3G
org.gradle.parallel=true

modGroup=com.lambda
modVersion=1.0
kotlin_version=1.5.10
kotlinx_coroutines_version=1.5.0-RC
org.gradle.parallel=true

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

kotlinVersion=1.6.20
kotlinxCoroutinesVersion=1.6.1
Binary file removed lib/lambda-2.06.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.
20 changes: 20 additions & 0 deletions src/main/kotlin/ElytraBotHUD.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import com.lambda.client.event.SafeClientEvent
import com.lambda.client.plugin.api.PluginLabelHud
import com.lambda.client.util.color.ColorHolder

internal object ElytraBotStatus : PluginLabelHud(
name = "Elytra Bot Status",
category = Category.CLIENT,
description = "Elytra Bot Status",
pluginMain = ElytraBotPlugin
) {

private val textColor by setting("Text Color", ColorHolder(0, 255, 0, 255))

override fun SafeClientEvent.updateText() {
if(ElytraBotModule.isEnabled){
displayText.addLine("Going to ${ElytraBotModule.goal?.x}, ${ElytraBotModule.goal?.y}, ${ElytraBotModule.goal?.z}", textColor)
}
}

}
Loading