Skip to content

Commit 1257506

Browse files
authored
feat: add support for 1.21.11 (#3578)
1 parent 5773bcb commit 1257506

19 files changed

+282
-79
lines changed

build.gradle.kts

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ plugins {
66
`java-library`
77
`maven-publish`
88
`signing`
9-
id("com.gradleup.shadow") version "9.0.2"
9+
id("com.gradleup.shadow") version "9.3.0"
1010
id("io.github.patrick.remapper") version "1.4.2"
11-
id("com.vanniktech.maven.publish") version "0.34.0"
11+
id("com.vanniktech.maven.publish") version "0.35.0"
1212
}
1313

1414
group = "net.dmulloy2"
1515
description = "Provides access to the Minecraft protocol"
1616

17-
val mcVersion = "1.21.10"
17+
val mcVersion = "1.21.11"
1818
val isSnapshot = version.toString().endsWith("-SNAPSHOT")
1919
val commitHash = System.getenv("COMMIT_SHA") ?: ""
2020
val isCI = commitHash.isNotEmpty()
@@ -45,27 +45,22 @@ repositories {
4545
}
4646

4747
dependencies {
48-
implementation("net.bytebuddy:byte-buddy:1.17.8")
48+
implementation("net.bytebuddy:byte-buddy:1.18.2")
4949
compileOnly("org.spigotmc:spigot-api:${mcVersion}-R0.1-SNAPSHOT")
5050
compileOnly("org.spigotmc:spigot:${mcVersion}-R0.1-SNAPSHOT:remapped-mojang")
51-
compileOnly("io.netty:netty-all:4.0.23.Final")
52-
/*
53-
* TODO(fix): once you update kyori:adventure-text-serializer-gson please uncomment the TODO in
54-
* com.comphenix.protocol.wrappers.WrappedComponentStyleTest if the following issue got fixed:
55-
* https://github.com/KyoriPowered/adventure/issues/1194
56-
*/
57-
compileOnly("net.kyori:adventure-text-serializer-gson:4.21.0")
51+
compileOnly("io.netty:netty-all:4.2.8.Final")
52+
compileOnly("net.kyori:adventure-text-serializer-gson:4.25.0")
5853
compileOnly("com.googlecode.json-simple:json-simple:1.1.1")
5954

60-
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.10.0")
61-
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0")
62-
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.10.0")
63-
testImplementation("org.mockito:mockito-core:5.6.0")
64-
testImplementation("io.netty:netty-common:4.1.97.Final")
65-
testImplementation("io.netty:netty-transport:4.1.97.Final")
55+
testImplementation("org.junit.jupiter:junit-jupiter-engine:6.0.1")
56+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:6.0.1")
57+
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.1")
58+
testImplementation("org.mockito:mockito-core:5.21.0")
59+
testImplementation("io.netty:netty-common:4.2.8.Final")
60+
testImplementation("io.netty:netty-transport:4.2.8.Final")
6661
testImplementation("org.spigotmc:spigot:${mcVersion}-R0.1-SNAPSHOT:remapped-mojang")
67-
testImplementation("net.kyori:adventure-text-serializer-gson:4.14.0")
68-
testImplementation("net.kyori:adventure-text-serializer-plain:4.14.0")
62+
testImplementation("net.kyori:adventure-text-serializer-gson:4.25.0")
63+
testImplementation("net.kyori:adventure-text-serializer-plain:4.25.0")
6964
}
7065

7166
java {

src/main/java/com/comphenix/protocol/PacketType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public static class Server extends PacketTypeEnum {
147147
public static final PacketType UNLOAD_CHUNK = new PacketType(PROTOCOL, SENDER, 0x25, "ForgetLevelChunk", "UnloadChunk", "SPacketUnloadChunk");
148148
public static final PacketType GAME_STATE_CHANGE = new PacketType(PROTOCOL, SENDER, 0x26, "GameEvent", "GameStateChange", "SPacketChangeGameState");
149149
public static final PacketType GAME_TEST_HIGHLIGHT_POS = new PacketType(PROTOCOL, SENDER, 0x27, "GameTestHighlightPos");
150-
public static final PacketType OPEN_WINDOW_HORSE = new PacketType(PROTOCOL, SENDER, 0x28, "HorseScreenOpen", "OpenWindowHorse");
150+
public static final PacketType OPEN_WINDOW_HORSE = new PacketType(PROTOCOL, SENDER, 0x28, "MountScreenOpen", "HorseScreenOpen", "OpenWindowHorse");
151151
public static final PacketType HURT_ANIMATION = new PacketType(PROTOCOL, SENDER, 0x29, "HurtAnimation", "ClientboundHurtAnimationPacket");
152152
public static final PacketType INITIALIZE_BORDER = new PacketType(PROTOCOL, SENDER, 0x2A, "InitializeBorder");
153153
public static final PacketType KEEP_ALIVE = new PacketType(PROTOCOL, SENDER, 0x2B, "KeepAlive", "SPacketKeepAlive");

src/main/java/com/comphenix/protocol/injector/netty/channel/NettyChannelProxy.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import io.netty.channel.Channel;
66
import io.netty.channel.ChannelConfig;
77
import io.netty.channel.ChannelFuture;
8+
import io.netty.channel.ChannelId;
89
import io.netty.channel.ChannelMetadata;
910
import io.netty.channel.ChannelPipeline;
1011
import io.netty.channel.ChannelProgressivePromise;
@@ -33,6 +34,11 @@ public NettyChannelProxy(Channel delegate, EventLoop eventLoop, NettyChannelInje
3334
this.injector = injector;
3435
}
3536

37+
@Override
38+
public ChannelId id() {
39+
return this.delegate.id();
40+
}
41+
3642
@Override
3743
public EventLoop eventLoop() {
3844
return this.eventLoop;
@@ -238,6 +244,11 @@ public <T> Attribute<T> attr(AttributeKey<T> key) {
238244
return this.delegate.attr(key);
239245
}
240246

247+
@Override
248+
public <T> boolean hasAttr(AttributeKey<T> attributeKey) {
249+
return this.delegate.hasAttr(attributeKey);
250+
}
251+
241252
@Override
242253
public int compareTo(@NotNull Channel o) {
243254
return this.delegate.compareTo(o);

src/main/java/com/comphenix/protocol/injector/netty/channel/NettyEventLoopProxy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@ public ChannelFuture register(Channel channel) {
251251
return this.delegate.register(channel);
252252
}
253253

254+
@Override
255+
public ChannelFuture register(ChannelPromise channelPromise) {
256+
return this.delegate.register(channelPromise);
257+
}
258+
254259
@Override
255260
public ChannelFuture register(Channel channel, ChannelPromise promise) {
256261
return this.delegate.register(channel, promise);

src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -921,15 +921,15 @@ public static Class<?> getDataWatcherRegistryClass() {
921921
}
922922

923923
public static Class<?> getMinecraftKeyClass() {
924-
return getMinecraftClass("resources.MinecraftKey", "resources.ResourceLocation", "MinecraftKey");
924+
return getMinecraftClass("resources.MinecraftKey", "resources.Identifier", "resources.ResourceLocation", "MinecraftKey");
925925
}
926926

927927
public static Class<?> getMobEffectListClass() {
928-
return getMinecraftClass("world.effect.MobEffectList", "MobEffectList", "world.effect.MobEffect");
928+
return getMinecraftClass("world.effect.MobEffectList", "MobEffectList", "world.effect.MobEffect", "world.effect.MobEffects");
929929
}
930930

931931
public static Class<?> getSoundEffectClass() {
932-
return getNullableNMS("sounds.SoundEffect", "sounds.SoundEvent", "SoundEffect");
932+
return getNullableNMS("sounds.SoundEffect", "sounds.SoundEvent", "SoundEffect", "sounds.SoundEvents");
933933
}
934934

935935
/**

src/main/java/com/comphenix/protocol/utility/MinecraftVersion.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
* @author Kristian
3737
*/
3838
public final class MinecraftVersion implements Comparable<MinecraftVersion>, Serializable {
39+
/**
40+
* Version 1.21.11 - mounts of mayhem
41+
*/
42+
public static final MinecraftVersion v1_21_11 = new MinecraftVersion("1.21.11");
43+
3944
/**
4045
* Version 1.21.10 - hotfix for 1.21.9
4146
*/
@@ -179,7 +184,7 @@ public final class MinecraftVersion implements Comparable<MinecraftVersion>, Ser
179184
/**
180185
* The latest release version of minecraft.
181186
*/
182-
public static final MinecraftVersion LATEST = v1_21_10;
187+
public static final MinecraftVersion LATEST = v1_21_11;
183188

184189
// used when serializing
185190
private static final long serialVersionUID = -8695133558996459770L;

0 commit comments

Comments
 (0)