Skip to content

Commit 7e3ccef

Browse files
committed
Merge remote-tracking branch 'origin/master' into gui_refactor_1
2 parents e4bbee6 + 3a98b81 commit 7e3ccef

File tree

25 files changed

+766
-196
lines changed

25 files changed

+766
-196
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Customize your experience, and improve your efficiency!
1616
Find our plugins [here](https://github.com/lambda-plugins).
1717

1818
<p align="center">
19-
<a href="https://github.com/lambda-client/lambda/releases/download/3.2.1/lambda-3.2.1.jar"><img alt="lambda-3.2.1.jar" src="https://raw.githubusercontent.com/lambda-client/assets/main/download_button_3.2.1.png" width="70%" height="70%"></a>
19+
<a href="https://github.com/lambda-client/lambda/releases/download/3.3.0/lambda-3.3.0.jar"><img alt="lambda-3.3.0.jar" src="https://raw.githubusercontent.com/lambda-client/assets/main/download_button_3.3.0.png" width="70%" height="70%"></a>
2020
</p>
2121

2222
<div align="center">
@@ -26,7 +26,7 @@ Find our plugins [here](https://github.com/lambda-plugins).
2626
## Installation
2727
1. Install Minecraft 1.12.2
2828
2. Install the latest Forge for 1.12.2 [(download)](https://files.minecraftforge.net/net/minecraftforge/forge/index_1.12.2.html)
29-
3. Get the latest Lambda version here [(download)](https://github.com/lambda-client/lambda/releases/download/3.2.1/lambda-3.2.1.jar)
29+
3. Get the latest Lambda version here [(download)](https://github.com/lambda-client/lambda/releases/download/3.3.0/lambda-3.3.0.jar)
3030
4. Put the file in your `.minecraft/mods` folder
3131

3232
## FAQ

build.gradle

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ buildscript {
1313

1414
plugins {
1515
id 'org.jetbrains.kotlin.jvm' version "$kotlinVersion"
16+
id 'maven-publish'
1617
}
1718

1819
apply plugin: 'net.minecraftforge.gradle'
@@ -61,8 +62,9 @@ minecraft {
6162

6263
configurations {
6364
jarLibs
65+
onlyJarLibs
6466
// Force choosing the correct nightly build because Mac OS chooses an invalid one
65-
all {
67+
configureEach {
6668
resolutionStrategy {
6769
force 'org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209'
6870
}
@@ -109,10 +111,10 @@ dependencies {
109111
compileOnly 'org.jetbrains:annotations:23.0.0'
110112

111113
// This Baritone will NOT be included in the jar
112-
implementation 'com.github.cabaletta:baritone:1.2.14'
114+
implementation('cabaletta:baritone-deobf-unoptimized-mcp-dev:1.2').setChanging(true)
113115

114116
// This Baritone WILL be included in the jar
115-
jarLibs 'cabaletta:baritone-api:1.2'
117+
onlyJarLibs('cabaletta:baritone-api:1.2').setChanging(true)
116118

117119
// Add everything in jarLibs to implementation (compile)
118120
implementation configurations.jarLibs
@@ -137,23 +139,23 @@ processResources {
137139
}
138140
}
139141

140-
task buildApiSource(type: Jar) { // Generate sources
142+
tasks.register('buildApiSource', Jar) { // Generate sources
141143
group 'build'
142144
description 'Assemble API library source archive'
143145

144146
archiveClassifier.set 'api-source'
145147
from sourceSets.main.allSource
146148
}
147149

148-
task buildApi(type: Jar) {
150+
tasks.register('buildApi', Jar) {
149151
group 'build'
150152
description 'Assemble API library archive'
151153

152154
archiveClassifier.set 'api'
153155
from sourceSets.main.output
154156
}
155157

156-
task buildAll {
158+
tasks.register('buildAll') {
157159
group 'build'
158160
description 'Assemble all jars'
159161

@@ -184,7 +186,7 @@ shadowJar {
184186
'kotlin/**/*.kotlin_metadata',
185187
'kotlin/**/*.kotlin_builtins',
186188
'META-INF/*.version'
187-
configurations = [project.configurations.jarLibs]
189+
configurations = [project.configurations.jarLibs, project.configurations.onlyJarLibs]
188190
relocate 'kotlin', 'com.lambda.shadow.kotlin'
189191
relocate 'kotlinx', 'com.lambda.shadow.kotlinx'
190192
finalizedBy 'configureReobfTaskForReobfShadowJar', 'reobfShadowJar'
@@ -198,7 +200,11 @@ reobf {
198200
}
199201
}
200202

201-
artifacts {
202-
shadowJar
203-
}
204-
203+
publishing {
204+
publications {
205+
api(MavenPublication) {
206+
artifact source: buildApi, classifier: null
207+
artifact source: buildApiSource, classifier: 'sources'
208+
}
209+
}
210+
}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ org.gradle.caching=true
33
org.gradle.parallel=true
44

55
modGroup=com.lambda
6-
modVersion=3.2.1
6+
modVersion=3.3.0
77

88
minecraftVersion=1.12.2
99
forgeVersion=14.23.5.2860
1010
mappingsChannel=stable
1111
mappingsVersion=39-1.12
1212

13-
kotlinVersion=1.8.0
14-
kotlinxCoroutinesVersion=1.6.4
13+
kotlinVersion=1.8.20
14+
kotlinxCoroutinesVersion=1.7.0-RC
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.lambda.mixin.network;
2+
3+
import com.lambda.client.event.LambdaEventBus;
4+
import com.lambda.client.event.events.ChunkDataEvent;
5+
import net.minecraft.client.multiplayer.WorldClient;
6+
import net.minecraft.client.network.NetHandlerPlayClient;
7+
import net.minecraft.network.play.server.SPacketChunkData;
8+
import org.spongepowered.asm.mixin.Mixin;
9+
import org.spongepowered.asm.mixin.Shadow;
10+
import org.spongepowered.asm.mixin.injection.At;
11+
import org.spongepowered.asm.mixin.injection.Inject;
12+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
13+
14+
@Mixin(value = NetHandlerPlayClient.class)
15+
public class MixinNetHandlerPlayClient {
16+
17+
@Shadow private WorldClient world;
18+
19+
@Inject(method = "handleChunkData", at = @At("TAIL"))
20+
public void handleChunkData(SPacketChunkData packetIn, CallbackInfo ci) {
21+
LambdaEventBus.INSTANCE.post(new ChunkDataEvent(packetIn.isFullChunk(), this.world.getChunk(packetIn.getChunkX(), packetIn.getChunkZ())));
22+
}
23+
}

0 commit comments

Comments
 (0)