Skip to content

Commit

Permalink
Minecraft 1.21.2 support (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
UserNugget authored Oct 24, 2024
1 parent 0753e63 commit 16a29f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
limboapiVersion=1.1.23
velocityVersion=3.3.0-SNAPSHOT
velocityVersion=3.4.0-SNAPSHOT
nettyVersion=4.1.86.Final
fastutilVersion=8.5.11
log4jVersion=2.19.0
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/elytrium/limbofilter/LimboFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ public void reload() {
new PacketMapping(0x12, ProtocolVersion.MINECRAFT_1_20_2, false),
new PacketMapping(0x13, ProtocolVersion.MINECRAFT_1_20_3, false),
new PacketMapping(0x16, ProtocolVersion.MINECRAFT_1_20_5, false),
new PacketMapping(0x18, ProtocolVersion.MINECRAFT_1_21_2, false),
})
.registerPacket(PacketDirection.CLIENTBOUND, SetEntityMetadata.class, SetEntityMetadata::new, new PacketMapping[]{
new PacketMapping(0x1C, ProtocolVersion.MINIMUM_VERSION, true),
Expand All @@ -313,6 +314,7 @@ public void reload() {
new PacketMapping(0x54, ProtocolVersion.MINECRAFT_1_20_2, true),
new PacketMapping(0x56, ProtocolVersion.MINECRAFT_1_20_3, true),
new PacketMapping(0x58, ProtocolVersion.MINECRAFT_1_20_5, true),
new PacketMapping(0x5D, ProtocolVersion.MINECRAFT_1_21_2, true),
})
.registerPacket(PacketDirection.CLIENTBOUND, SpawnEntity.class, SpawnEntity::new, new PacketMapping[]{
new PacketMapping(0x0E, ProtocolVersion.MINIMUM_VERSION, true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ public static int getID(ProtocolVersion protocolVersion) {
return 56;
} else if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_20_3) <= 0) {
return 57;
} else {
} else if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_21) <= 0) {
return 60;
} else {
return 71;
}
}

Expand Down

0 comments on commit 16a29f2

Please sign in to comment.