diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java index a821fb545..7da127fb3 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java @@ -37,6 +37,7 @@ public class ProtocolConstants public static final int MINECRAFT_1_17 = 755; public static final int MINECRAFT_1_17_1 = 756; public static final int MINECRAFT_1_18 = 757; + public static final int MINECRAFT_1_18_2 = 758; public static final List SUPPORTED_VERSIONS; public static final List SUPPORTED_VERSION_IDS; @@ -85,7 +86,8 @@ public class ProtocolConstants ProtocolConstants.MINECRAFT_1_16_4, ProtocolConstants.MINECRAFT_1_17, ProtocolConstants.MINECRAFT_1_17_1, - ProtocolConstants.MINECRAFT_1_18 + ProtocolConstants.MINECRAFT_1_18, + ProtocolConstants.MINECRAFT_1_18_2 ); if ( SNAPSHOT_SUPPORT ) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java index 26edbca85..633e557cd 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java @@ -498,6 +498,20 @@ public class Commands extends DefinedPacket return "brigadier:string"; } }; + private static final ArgumentSerializer RAW_STRING = new ArgumentSerializer() + { + @Override + protected String read(ByteBuf buf) + { + return DefinedPacket.readString( buf ); + } + + @Override + protected void write(ByteBuf buf, String t) + { + DefinedPacket.writeString( t, buf ); + } + }; static { @@ -551,6 +565,8 @@ public class Commands extends DefinedPacket PROVIDERS.put( "minecraft:test_argument", VOID ); // 1.16, debug PROVIDERS.put( "minecraft:test_class", VOID ); // 1.16, debug PROVIDERS.put( "minecraft:angle", VOID ); // 1.16.2 + PROVIDERS.put( "minecraft:resource", RAW_STRING ); // 1.18.2 + PROVIDERS.put( "minecraft:resource_or_tag", RAW_STRING ); // 1.18.2 } private static ArgumentType read(String key, ByteBuf buf) diff --git a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java index 23715f68c..75164c67f 100644 --- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java +++ b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java @@ -72,6 +72,7 @@ public abstract class EntityMap case ProtocolConstants.MINECRAFT_1_17_1: return EntityMap_1_16_2.INSTANCE_1_17; case ProtocolConstants.MINECRAFT_1_18: + case ProtocolConstants.MINECRAFT_1_18_2: return EntityMap_1_16_2.INSTANCE_1_18; } throw new RuntimeException( "Version " + version + " has no entity map" );