Skip to content

Commit

Permalink
Merge pull request #80 from EternalHuman/master
Browse files Browse the repository at this point in the history
1.21.2 protocol update
  • Loading branch information
CatCoderr authored Oct 22, 2024
2 parents 6d2ddf2 + c7e400c commit b400627
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p align="center">
<a target="_blank"><img src="https://github.com/CatCoderr/ProtocolSidebar/actions/workflows/build.yaml/badge.svg" alt="Build" /></a>
<a target="_blank"><img src="https://img.shields.io/github/license/CatCoderr/ProtocolSidebar" alt="License" /></a>
<a target="_blank"><img src="https://img.shields.io/badge/Minecraft%20Versions-1.12.2--1.21-blue?style=flat" alt="Minecraft Versions" /></a>
<a target="_blank"><img src="https://img.shields.io/badge/Minecraft%20Versions-1.12.2--1.21.2-blue?style=flat" alt="Minecraft Versions" /></a>
</p>

* [Features](#features)
Expand All @@ -23,7 +23,7 @@

![Sidebar](https://github.com/CatCoderr/ProtocolSidebar/raw/master/assets/sidebar.gif)

⚠️ **Note**: starting from **6.2.7-SNAPSHOT** version, the repository has been moved to https://catcoder.pl.ua/snapshots.
⚠️ **Note**: starting from **6.2.8-SNAPSHOT** version, the repository has been moved to https://catcoder.pl.ua/snapshots.
You can find URL for Maven and Gradle in the [Adding to your project](#adding-to-your-project) section.


Expand Down Expand Up @@ -69,7 +69,7 @@ or [maven-shade-plugin](https://maven.apache.org/plugins/maven-shade-plugin/) (f
<dependency>
<groupId>me.catcoder</groupId>
<artifactId>bukkit-sidebar</artifactId>
<version>6.2.7-SNAPSHOT</version>
<version>6.2.8-SNAPSHOT</version>
</dependency>
```

Expand All @@ -82,7 +82,7 @@ repositories {
```
```groovy
dependencies {
implementation 'me.catcoder:bukkit-sidebar:6.2.7-SNAPSHOT'
implementation 'me.catcoder:bukkit-sidebar:6.2.8-SNAPSHOT'
}
```

Expand All @@ -95,7 +95,7 @@ repositories {
```
```kotlin
dependencies {
implementation("me.catcoder:bukkit-sidebar:6.2.7-SNAPSHOT")
implementation("me.catcoder:bukkit-sidebar:6.2.8-SNAPSHOT")
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "me.catcoder"
version = "6.2.7-SNAPSHOT"
version = "6.2.8-SNAPSHOT"
description = "Powerful feature-packed Minecraft scoreboard library"

val adventureVersion = "4.16.0"
Expand Down
15 changes: 10 additions & 5 deletions src/main/java/me/catcoder/sidebar/protocol/PacketIds.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public enum PacketIds {
map(ProtocolConstants.MINECRAFT_1_20_2, 0x5C),
map(ProtocolConstants.MINECRAFT_1_20_4, 0x5E),
map(ProtocolConstants.MINECRAFT_1_20_4, 0x5E),
map(ProtocolConstants.MINECRAFT_1_20_6, 0x60)
map(ProtocolConstants.MINECRAFT_1_20_6, 0x60),
map(ProtocolConstants.MINECRAFT_1_21_2, 0x67)
),
UPDATE_SCORE(
map(ProtocolConstants.MINECRAFT_1_12_2, 0x45),
Expand All @@ -32,13 +33,15 @@ public enum PacketIds {
map(ProtocolConstants.MINECRAFT_1_19_4, 0x5B),
map(ProtocolConstants.MINECRAFT_1_20_2, 0x5D),
map(ProtocolConstants.MINECRAFT_1_20_4, 0x5F),
map(ProtocolConstants.MINECRAFT_1_20_6, 0x61)
map(ProtocolConstants.MINECRAFT_1_20_6, 0x61),
map(ProtocolConstants.MINECRAFT_1_21_2, 0x68)


),
RESET_SCORE(
map(ProtocolConstants.MINECRAFT_1_20_3, 0x42),
map(ProtocolConstants.MINECRAFT_1_20_4, 0x44)
map(ProtocolConstants.MINECRAFT_1_20_4, 0x44),
map(ProtocolConstants.MINECRAFT_1_21_2, 0x49)
),
OBJECTIVE_DISPLAY(
map(ProtocolConstants.MINECRAFT_1_12_2, 0x3B),
Expand All @@ -51,7 +54,8 @@ public enum PacketIds {
map(ProtocolConstants.MINECRAFT_1_19_4, 0x51),
map(ProtocolConstants.MINECRAFT_1_20_2, 0x53),
map(ProtocolConstants.MINECRAFT_1_20_4, 0x55),
map(ProtocolConstants.MINECRAFT_1_20_6, 0x57)
map(ProtocolConstants.MINECRAFT_1_20_6, 0x57),
map(ProtocolConstants.MINECRAFT_1_21_2, 0x5C)

),
OBJECTIVE(
Expand All @@ -65,7 +69,8 @@ public enum PacketIds {
map(ProtocolConstants.MINECRAFT_1_19_4, 0x58),
map(ProtocolConstants.MINECRAFT_1_20_2, 0x5A),
map(ProtocolConstants.MINECRAFT_1_20_4, 0x5C),
map(ProtocolConstants.MINECRAFT_1_20_6, 0x5E)
map(ProtocolConstants.MINECRAFT_1_20_6, 0x5E),
map(ProtocolConstants.MINECRAFT_1_21_2, 0x64)
);

private final ProtocolConstants.ProtocolMapping[] mappings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,19 @@ public class ProtocolConstants {
public static final int MINECRAFT_1_19_4 = 762;

public static final int MINECRAFT_1_20 = 763;
public static final int MINECRAFT_1_20_1 = 763;
public static final int MINECRAFT_1_20_2 = 764;
public static final int MINECRAFT_1_20_3 = 765;
public static final int MINECRAFT_1_20_4 = 765;
public static final int MINECRAFT_1_20_5 = 766;
public static final int MINECRAFT_1_20_6 = 766;

public static final int MINECRAFT_1_21 = 767;

public static final int MINECRAFT_1_21_2 = 768;

public static final int MINIMUM_SUPPORTED_VERSION = MINECRAFT_1_12_2;
public static final int MAXIMUM_SUPPORTED_VERSION = MINECRAFT_1_21;
public static final int MAXIMUM_SUPPORTED_VERSION = MINECRAFT_1_21_2;

@Getter
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,18 @@ private static NavigableMap<MinecraftVersion, Integer> createLookup() {

map.put(new MinecraftVersion(1, 20, 0), ProtocolConstants.MINECRAFT_1_20);

map.put(new MinecraftVersion(1, 20, 1), ProtocolConstants.MINECRAFT_1_20_1);

map.put(new MinecraftVersion(1, 20, 2), ProtocolConstants.MINECRAFT_1_20_2);
map.put(new MinecraftVersion(1, 20, 3), ProtocolConstants.MINECRAFT_1_20_3);
map.put(new MinecraftVersion(1, 20, 4), ProtocolConstants.MINECRAFT_1_20_4);
map.put(new MinecraftVersion(1, 20, 5), ProtocolConstants.MINECRAFT_1_20_5);
map.put(new MinecraftVersion(1, 20, 6), ProtocolConstants.MINECRAFT_1_20_6);

map.put(new MinecraftVersion(1, 21, 0), ProtocolConstants.MINECRAFT_1_21);
map.put(new MinecraftVersion(1, 21, 1), ProtocolConstants.MINECRAFT_1_21);
map.put(new MinecraftVersion(1, 21, 2), ProtocolConstants.MINECRAFT_1_21_2);


return map;
}
Expand Down

0 comments on commit b400627

Please sign in to comment.