Skip to content

Commit 3eaf00d

Browse files
committed
Merge branch '1.21.10' into 1.21.11
2 parents b92e0cf + f884842 commit 3eaf00d

File tree

8 files changed

+51
-9
lines changed

8 files changed

+51
-9
lines changed

build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ dependencies {
6868
api("com.github.rfresh2.fastutil.maps:reference-object-maps:$fastutilVersion")
6969
api("com.github.rfresh2.fastutil.maps:long-double-maps:$fastutilVersion")
7070
api("com.github.rfresh2.fastutil.queues:int-queues:$fastutilVersion")
71-
api("com.viaversion:vialoader:4.0.5")
72-
api("com.viaversion:viaversion-common:5.5.1")
73-
api("com.viaversion:viabackwards-common:5.5.1")
74-
api("com.viaversion:viarewind-common:4.0.11")
71+
api("com.viaversion:vialoader:4.0.6")
72+
api("com.viaversion:viaversion-common:5.6.0")
73+
api("com.viaversion:viabackwards-common:5.6.0")
74+
api("com.viaversion:viarewind-common:4.0.12")
7575
api("org.jline:jline:3.30.6")
7676
api("ar.com.hjg:pngj:2.1.0")
7777
api("com.zaxxer:HikariCP:7.0.2")

src/main/java/com/zenith/feature/chatschema/ChatSchemaParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private static Pattern compilePattern(String schema) {
8787
if (c == '$' && (i + 1 < schema.length())) {
8888
var potentialToken = schema.substring(i, i + 2);
8989
String p = switch (potentialToken) {
90-
case senderToken, receiverToken -> "([\\w\\d_]+)";
90+
case senderToken, receiverToken -> "([\\w\\d_.]+)";
9191
case messageToken, wildcardStringToken -> "(.+)";
9292
default -> null;
9393
};

src/main/java/com/zenith/feature/deathmessages/DeathMessageSchemaInstance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
public final class DeathMessageSchemaInstance {
1515
private final String schemaRaw;
1616
private final List<String> schema;
17-
private static final Pattern userNameValidPattern = Pattern.compile("[A-Za-z0-9_]{1,16}");
17+
private static final Pattern userNameValidPattern = Pattern.compile("[A-Za-z0-9_.]{1,16}");
1818
private final List<String> mobs;
1919

2020
public DeathMessageSchemaInstance(final String schemaRaw, final List<String> mobs) {

src/main/java/com/zenith/via/ZenithViaInitializer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public void init() {
3636

3737
public void clientViaChannelInitializer(Channel channel) {
3838
if (!CONFIG.client.viaversion.enabled) return;
39-
if (true) return;
4039
if (CONFIG.client.viaversion.autoProtocolVersion) updateClientViaProtocolVersion();
4140
if (CONFIG.client.viaversion.protocolVersion == MinecraftCodec.CODEC.getProtocolVersion()) {
4241
CLIENT_LOG.warn("ViaVersion enabled but the protocol is the same as ours, connecting without ViaVersion");
@@ -55,7 +54,6 @@ public void clientViaChannelInitializer(Channel channel) {
5554

5655
public void serverViaChannelInitializer(final Channel channel) {
5756
if (!CONFIG.server.viaversion.enabled) return;
58-
if (true) return;
5957
init();
6058
var userConnection = new UserConnectionImpl(channel, false);
6159
new ProtocolPipelineImpl(userConnection);

src/main/resources/META-INF/native-image/reachability-metadata.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,9 @@
373373
{
374374
"type": "com.aayushatharva.brotli4j.Brotli4jLoader"
375375
},
376+
{
377+
"type": "com.aayushatharva.brotli4j.decoder.BrotliInputStream"
378+
},
376379
{
377380
"type": "com.collarmc.pounce.MethodAccessor",
378381
"methods": [
@@ -592,6 +595,9 @@
592595
{
593596
"type": "com.github.luben.zstd.Zstd"
594597
},
598+
{
599+
"type": "com.github.luben.zstd.ZstdInputStream"
600+
},
595601
{
596602
"type": "com.google.common.util.concurrent.AbstractFuture",
597603
"fields": [
@@ -1148,6 +1154,9 @@
11481154
{
11491155
"type": "com.viaversion.viaversion.api.minecraft.data.StructuredData[]"
11501156
},
1157+
{
1158+
"type": "com.viaversion.viaversion.api.minecraft.data.predicate.DataComponentPredicate[]"
1159+
},
11511160
{
11521161
"type": "com.viaversion.viaversion.api.minecraft.item.DataItem",
11531162
"allDeclaredFields": true,
@@ -1176,6 +1185,9 @@
11761185
{
11771186
"type": "com.viaversion.viaversion.api.minecraft.item.data.BlockPredicate[]"
11781187
},
1188+
{
1189+
"type": "com.viaversion.viaversion.api.minecraft.item.data.Consumable1_21_2$ConsumeEffect[]"
1190+
},
11791191
{
11801192
"type": "com.viaversion.viaversion.api.minecraft.item.data.FilterableString[]"
11811193
},
@@ -3482,6 +3494,12 @@
34823494
{
34833495
"type": "int[]"
34843496
},
3497+
{
3498+
"type": "io.airlift.compress.v3.zstd.ZstdInputStream"
3499+
},
3500+
{
3501+
"type": "io.airlift.compress.zstd.ZstdInputStream"
3502+
},
34853503
{
34863504
"type": "io.jsonwebtoken.impl.security.StandardSecureDigestAlgorithms",
34873505
"methods": [
@@ -5525,6 +5543,9 @@
55255543
}
55265544
]
55275545
},
5546+
{
5547+
"type": "org.brotli.dec.BrotliInputStream"
5548+
},
55285549
{
55295550
"type": "org.cloudburstmc.math.immutable.vector.ImmutableVectorProvider"
55305551
},

src/main/resources/META-INF/native-image/resource-config.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/test/java/com/zenith/feature/chatschema/ChatSchemaParserTest.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public class ChatSchemaParserTest {
1616
"rfresh2", UUID.fromString("572e683c-888a-4a0d-bc10-5d9cfa76d892")
1717
);
1818

19+
PlayerListEntry rfresh2BedrockEntry = new PlayerListEntry(
20+
".rfresh2", UUID.fromString("00000000-0000-0000-0009-01f6c03c69e5")
21+
);
22+
1923
PlayerListEntry arrfreshEntry = new PlayerListEntry(
2024
"aRRfresh", UUID.fromString("7cb31e32-65dc-494e-b812-3391670374c3")
2125
);
@@ -35,6 +39,7 @@ public class ChatSchemaParserTest {
3539
public void setUp() {
3640
CACHE.getTabListCache().add(rfresh2Entry);
3741
CACHE.getTabListCache().add(arrfreshEntry);
42+
CACHE.getTabListCache().add(rfresh2BedrockEntry);
3843
CACHE.getProfileCache().setProfile(new GameProfile(rfresh2Entry.getProfileId(), rfresh2Entry.getName()));
3944
}
4045

@@ -56,6 +61,18 @@ public void test2b2tPublicChat() {
5661
assertEquals("what's up?", result.messageContent());
5762
}
5863

64+
@Test
65+
public void test2b2tBedrockPublicChat() {
66+
String input = "<.rfresh2> what's up?";
67+
var result = ChatSchemaParser.parse(input, schema2b2t);
68+
assertNotNull(result);
69+
assertEquals(ChatType.PUBLIC_CHAT, result.type());
70+
assertEquals(rfresh2BedrockEntry, result.sender());
71+
assertNull(result.receiver());
72+
assertEquals("what's up?", result.messageContent());
73+
}
74+
75+
5976
@Test
6077
public void test2b2tWhisperOutgoing() {
6178
String input = "to aRRfresh: what's up?";

src/test/java/com/zenith/feature/deathmessages/DeathMessageParserTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ public void pushedByMobTest() {
144144
"LavamanHero", null, null, "Discount code Egg @ Rusherhack.org");
145145
}
146146

147+
@Test
148+
public void bedrockUserTest() {
149+
parseTest(".yakyyakyyou was assassinated by pillagers.",
150+
".yakyyakyyou", "pillagers", KillerType.MOB, null);
151+
}
152+
147153
private void parseTest(final String rawInput, final String victim, final String killerName, final KillerType killerType, final String weapon) {
148154
final var componentBuilder = Component.text();
149155
componentBuilder.append(Component.text(victim).clickEvent(ClickEvent.suggestCommand("/w " + victim)));

0 commit comments

Comments
 (0)