Skip to content

Commit

Permalink
Update to 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
CaelTheColher committed Dec 1, 2021
1 parent 9ffd7e8 commit adc6d6c
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: openjdk:16-jdk
image: openjdk:17-jdk
options: --user root

steps:
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ dependencies {

// Compatibility
modImplementation("com.terraformersmc:modmenu:${project["modmenu_version"]}")
modImplementation("dev.emi:trinkets:${project["trinkets_version"]}")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
}

Expand Down
17 changes: 8 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ kotlin.code.style=official
org.gradle.jvmargs=-Xmx2G

# Fabric Properties
# Check these on https://modmuss50.me/fabric.html
minecraft_version=1.17
yarn_mappings=1.17+build.5
loader_version=0.11.3
# Check these on https://fabricmc.net/versions.html
minecraft_version=1.18
yarn_mappings=1.18+build.1
loader_version=0.12.8

#Fabric api
fabric_version=0.34.9+1.17
loom_version=0.8-SNAPSHOT
fabric_version=0.43.1+1.18
loom_version=0.10-SNAPSHOT

# Mod Properties
mod_version = 1.2.2+1.17
mod_version = 1.2.2+1.18
maven_group = me.cael
archives_base_name = capes

Expand All @@ -22,8 +22,7 @@ org.gradle.jvmargs=-Xmx2G

# Other APIs
autoconfig_version=3.2.2
modmenu_version=2.0.0-beta.7
trinkets_version=3.0.0
modmenu_version=3.0.0

# Gradle Plugins
grgit_version=4.1.0
Expand Down
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 @@
#Sat Jul 27 10:29:07 IDT 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public MixinSkinOptionsScreen(Screen parent, GameOptions gameOptions, Text title

@Inject(method = "init", at = @At("RETURN"))
protected void init(CallbackInfo info) {
this.addDrawableChild(new TexturedButtonWidget(this.width / 2 - 179, this.height / 6, 20, 20, 0, 0, 20, CAPE_OPTIONS_ICON_TEXTURE,32, 64, (buttonWidget) -> this.client.openScreen(new CapeMenu(this, this.gameOptions))));
this.addDrawableChild(new TexturedButtonWidget(this.width / 2 - 179, this.height / 6, 20, 20, 0, 0, 20, CAPE_OPTIONS_ICON_TEXTURE,32, 64, (buttonWidget) -> this.client.setScreen(new CapeMenu(this, this.gameOptions))));
}
}
6 changes: 3 additions & 3 deletions src/main/kotlin/me/cael/capes/CapeMenu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ class CapeMenu(parent: Screen, gameOptions: GameOptions) : GameOptionsScreen(par
val serverId = random1Bi.xor(random2Bi).toString(16)
client!!.sessionService.joinServer(client!!.session.profile, client!!.session.accessToken, serverId)
val url = "https://optifine.net/capeChange?u=${client!!.session.uuid}&n=${client!!.session.username}&s=$serverId"
client!!.openScreen(ConfirmChatLinkScreen({ bool: Boolean ->
client!!.setScreen(ConfirmChatLinkScreen({ bool: Boolean ->
if (bool) {
Util.getOperatingSystem().open(url)
}
client!!.openScreen(this)
client!!.setScreen(this)
}, url, true))
} catch (exception: Exception) {
exception.printStackTrace()
}
})

addDrawableChild(ButtonWidget(width / 2 - 100, height / 6 + 4 * 24, 200, 20, ScreenTexts.DONE) { buttonWidget: ButtonWidget ->
client!!.openScreen(parent)
client!!.setScreen(parent)
})
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/me/cael/capes/handler/PlayerHandler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class PlayerHandler(var profile: GameProfile) {
val imgNew = NativeImage(imageWidth, imageHeight, true)
for (x in 0 until srcWidth) {
for (y in 0 until srcHeight) {
imgNew.setPixelColor(x, y, img.getPixelColor(x, y))
imgNew.setColor(x, y, img.getColor(x, y))
}
}
img.close()
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/capes.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"required": true,
"package": "me.cael.capes.mixins",
"compatibilityLevel": "JAVA_16",
"compatibilityLevel": "JAVA_17",
"mixins": [
],
"client": [
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "${version}",

"name": "Capes",
"description": "Check needs his Cape",
"description": "A Fabric mod that lets you use capes from Optifine, LabyMod, and the MinecraftCapes Mod.",
"authors": [
"Cael"
],
Expand Down Expand Up @@ -34,11 +34,11 @@
"capes.mixins.json"
],
"depends": {
"fabricloader": ">=0.11.3",
"fabricloader": ">=0.12.8",
"fabric": "*",
"fabric-language-kotlin": "*",
"minecraft": "1.17.x",
"minecraft": "1.18.x",
"autoconfig1u": "*",
"java": ">=16"
"java": ">=17"
}
}

0 comments on commit adc6d6c

Please sign in to comment.