Skip to content

Commit b58c40e

Browse files
authored
Merge branch 'lambda-client:master' into master
2 parents be4b3a8 + d8a8084 commit b58c40e

File tree

5 files changed

+24
-15
lines changed

5 files changed

+24
-15
lines changed

.github/workflows/nightly_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ jobs:
9797
if: steps.branch-name.outputs.is_default == 'true'
9898
run: |
9999
COMMITMESSAGE=`git log --pretty=format:'- \`%h\` %s' -5 --reverse` &&
100-
(curl "$WEBHOOK" -sS -H "Content-Type:application/json" -X POST -d "{\"content\":null,\"embeds\":[{\"title\":\"Build $BUILD\",\"description\":\"**Branch:** ${{steps.branch-name.outputs.current_branch}}\\n**Changes:**\\n$COMMITMESSAGE\",\"url\":\"https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\",\"color\":1487872,\"fields\":[{\"name\":\"Artifacts:\",\"value\":\"- [lambda-$BUILD.zip](https://nightly.link/$GITHUB_REPOSITORY/workflows/nightly_build.yml/$BRANCH_NAME/lambda-$BUILD.zip)\"}],\"footer\":{\"text\":\"$GITHUB_REPOSITORY\"},\"thumbnail\":{\"url\":\"https://github.com/lambda-client/lambda/master/src/main/resources/assets/minecraft/lambda/lambda_map.png\"}}],\"username\":\"Github Actions\",\"avatar_url\":\"https://www.2b2t.com.au/assets/github.jpeg\"}")
100+
(curl "$WEBHOOK" -sS -H "Content-Type:application/json" -X POST -d "{\"content\":null,\"embeds\":[{\"title\":\"Build $BUILD\",\"description\":\"**Branch:** ${{ steps.branch-name.outputs.current_branch }}\\n**Changes:**\\n$COMMITMESSAGE\",\"url\":\"https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\",\"color\":1487872,\"fields\":[{\"name\":\"Artifacts:\",\"value\":\"- [lambda-$BUILD.zip](https://nightly.link/$GITHUB_REPOSITORY/workflows/nightly_build.yml/${{ steps.branch-name.outputs.current_branch }}/lambda-$BUILD.zip)\"}],\"footer\":{\"text\":\"$GITHUB_REPOSITORY\"},\"thumbnail\":{\"url\":\"https://github.com/lambda-client/lambda/master/src/main/resources/assets/minecraft/lambda/lambda_map.png\"}}],\"username\":\"Github Actions\",\"avatar_url\":\"https://www.2b2t.com.au/assets/github.jpeg\"}")

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ shadowJar {
186186
'kotlin/**/*.kotlin_metadata',
187187
'kotlin/**/*.kotlin_builtins',
188188
'META-INF/*.version'
189+
minimize {
190+
exclude(dependency('cabaletta:baritone-api:.*'))
191+
exclude(dependency('org.spongepowered:mixin:.*'))
192+
}
189193
configurations = [project.configurations.jarLibs, project.configurations.onlyJarLibs]
190194
relocate 'kotlin', 'com.lambda.shadow.kotlin'
191195
relocate 'kotlinx', 'com.lambda.shadow.kotlinx'

src/main/kotlin/com/lambda/client/gui/hudgui/elements/world/Coordinates.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ internal object Coordinates : LabelHud(
3737
if (showNetherOverworld) {
3838
when (world.provider.dimension) {
3939
-1 -> { // Nether
40-
if (printDimensionName) displayText.add("Nether", secondaryColor)
40+
if (printDimensionName) displayText.add("Overworld", secondaryColor)
4141
displayText.add(getFormattedCoords(entity.positionVector * netherToOverworld, true))
4242
}
4343
0 -> { // Overworld
4444
if (printDimensionName)
45-
displayText.add("Overworld", secondaryColor)
45+
displayText.add("Nether", secondaryColor)
4646
displayText.add(getFormattedCoords(entity.positionVector * overworldToNether, true))
4747
}
4848
}

src/main/kotlin/com/lambda/client/module/modules/misc/MapDownloader.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ internal object MapDownloader : Module(
4646
private var pendingTasks = mutableSetOf<MapInfo>()
4747
private val secTimer = TickTimer(TimeUnit.SECONDS)
4848
private val milliSecTimer = TickTimer(TimeUnit.MILLISECONDS)
49+
private val illegalFilenameCharsRegex = "[^a-zA-Z0-9\\.\\-]".toRegex() // https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file
4950

5051
init {
5152
existingHashes = getExistingHashes()
@@ -159,7 +160,11 @@ internal object MapDownloader : Module(
159160
try {
160161
val resized = BufferedImage(finalSize, finalSize, img.type)
161162
val g = resized.createGraphics()
162-
val loc = "${FolderUtils.mapImagesFolder}${mapInfo.hash}_name_${mapInfo.name.replace(File.separator, "")}_id_${mapInfo.id}_${if (mc.isIntegratedServerRunning) "local" else "server_${player.connection.networkManager.remoteAddress.toString().replace("/", "_").replace(":", "_")}"}.png"
163+
val loc = "${FolderUtils.mapImagesFolder}${mapInfo.hash}" +
164+
"_name_${mapInfo.name.replace(illegalFilenameCharsRegex, "_")}" +
165+
"_id_${mapInfo.id}" +
166+
"_${if (mc.isIntegratedServerRunning) "local"
167+
else "server_${player.connection.networkManager.remoteAddress.toString().replace("/", "_").replace(":", "_")}"}.png"
163168
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
164169
RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR)
165170
g.drawImage(img, 0, 0, finalSize, finalSize, 0, 0, img.width,

src/main/resources/mcmod.info

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
"url": "https://github.com/lambda-client/lambda",
99
"updateUrl": "",
1010
"authorList": [
11-
"Constructor#9948",
12-
"huddy987#5085",
13-
"cz#6171",
14-
"ToxicAven#3678",
15-
"Nep Nep#3025",
16-
"scorbett123#5313",
17-
"hlsl#1315",
18-
"ItCameFr0mMars#6559",
19-
"romtec#6969",
20-
"Save___G#4444",
21-
"EnigmA_008#1505"
11+
"@_constructor",
12+
"@huddy987",
13+
"@czho_",
14+
"@toxicaven",
15+
"@nepnepcat",
16+
"@scorbett",
17+
"@hlsl.",
18+
"@itcamefr0mmars",
19+
"@romtec",
20+
"@save_g",
21+
"@enigma_008"
2222
],
2323
"credits": "Thanks to 086 for the original KAMI\nThanks to the team of KAMI Blue\nSpecial thanks to all contributors",
2424
"logoFile": "lambda.png",

0 commit comments

Comments
 (0)