Skip to content

Commit e4da8bf

Browse files
committed
gradle plugin updates
1 parent 49699e6 commit e4da8bf

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

build.gradle.kts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,26 @@ plugins {
44

55
group = properties["maven_group"] as String
66
version = properties["plugin_version"] as String
7+
val mc = properties["mc"] as String
78

89
java { toolchain { languageVersion = JavaLanguageVersion.of(21) } }
910

10-
zenithProxy {
11-
mc = properties["mc"] as String
11+
zenithProxyPlugin {
1212
templateProperties = mapOf(
1313
"version" to project.version
1414
)
1515
}
1616

1717
repositories {
18-
mavenLocal()
19-
maven("https://maven.2b2t.vc/releases")
18+
mavenLocal() // if developing against a locally published zenith build
19+
maven("https://maven.2b2t.vc/remote") {
20+
description = "Dependencies used by ZenithProxy"
21+
}
22+
maven("https://maven.2b2t.vc/releases") {
23+
description = "ZenithProxy Releases"
24+
}
25+
}
26+
27+
dependencies {
28+
zenithProxy("com.zenith:ZenithProxy:$mc-SNAPSHOT")
2029
}

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pluginManagement {
22
repositories {
3-
mavenLocal()
3+
maven("https://maven.2b2t.vc/releases")
44
gradlePluginPortal()
55
}
66
}

src/main/java/org/example/module/ExampleESPModule.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ public PacketHandlerCodec registerServerPacketHandlerCodec() {
3030
// if you want to have packet handlers you probably need separate plugin builds for each MC version
3131
.registerInbound(ClientboundSetEntityDataPacket.class, new GlowingEntityMetadataPacketHandler())
3232
// or with in-line lambda:
33-
// .registerOutbound(ClientboundSetEntityDataPacket.class, (packet, ServerSession session) -> {
34-
// ClientboundSetEntityDataPacket p = packet;
33+
// .registerOutbound(ClientboundSetEntityDataPacket.class, (packet, session) -> {
3534
// ...more impl...
36-
// return p;
35+
// return packet;
3736
// })
3837
// beware there are different PacketHandler interfaces that would be trickier to declare as a lambda
3938
// i.e. to handle client packets on the tick loop you need to implement ClientEventLoopPacketHandler

0 commit comments

Comments
 (0)