Conversation
|
Added the new FML2 packet types in protocol/forge.rs, can parse the packets from the server but not complete yet, need to serialize the packets to the server. FML2 reuses the packet structure within the plugin channels — effectively "nested" packets, steven_protocol wasn't originally set up for this, requires some refactoring to reuse the same packet parsing (and serialization) code in the inner packet |
|
Expected server output with <?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="debug">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>expected server output with a successful handshake: actual, gets as far as Update: problem was sending play::PluginMessageServerbound instead of login::LoginPluginResponse. There is a different message for plugin channels in the Login state instead of the Play. Fixing this, server now receives ?{"translate":"disconnect.genericReason","with":["Internal Exception: net.minecraft.util.ResourceLocationException: Non [a-z0-9/._-] character in path of location: minecraft:\u0003\t"]} Update 2: next problem was not sending the outer packet, fixing it now hits: |
|
Need to handle forgeid:modid and forge:enum command nodes properly. Example packet: '\x10!\x00\x0b\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x01\x01\x0c\x06config\x01\x05\r\x0e\x0f\x10\x11\x05forge\x05\x01\x12\x04help\x05\x01\x13\x04list\x01\x01\x14\x02me\x01\x01\x15\x03msg\x01\x01\x16\x07teammsg\t\x00\x06\x04tell\t\x00\x07\x02tm\x01\x01\x17\x07trigger\t\x00\x06\x01w\x01\x01\x18\x08showfile\x05\x00\ndimensions\x01\x00\x06entity\x05\x00\x04mods\x05\x01\x19\x03tps\x01\x02\x1a\x1b\x05track\x06\x00\x07command\x10brigadier:string\x02\x05\x00\x05uuids\x06\x00\x06action\x10brigadier:string\x02\x02\x01\x1c\x07targets\x10minecraft:entity\x02\x06\x00\x07message\x11minecraft:message\x16\x02\x1d\x1e\tobjective\x13minecraft:objective\x14minecraft:ask_server\x02\x01\x1f\x03mod\x0bforge:modid\x06\x00\x03dim\x13minecraft:dimension\x05\x00\x06entity\x05\x00\x02te\x06\x00\x07message\x11minecraft:message\x01\x01 \x03add\x01\x01 \x03set\x06\x00\x04type\nforge:enum,net.minecraftforge.fml.config.ModConfig$Type\x06\x00\x05value\x11brigadier:integer\x00\x00' 0x10 = DeclareCommands packet DeclareCommands {
field nodes: LenPrefixed<VarInt, packet::CommandNode> =,
field root_index: VarInt =,
}
#[derive(Debug, Default)]
pub struct CommandNode {
pub flags: u8,
pub children: LenPrefixed<VarInt, VarInt>,
pub redirect_node: Option<VarInt>,
pub name: Option<String>,
pub parser: Option<String>,
pub properties: Option<CommandProperty>,
pub suggestions_type: Option<String>,
}forge:modid\x06\x00\x03dim\x13 |

Add FML2 protocol support, Forge on 1.13 - Current #400
https://wiki.vg/Minecraft_Forge_Handshake#FML2_protocol_.281.13_-_Current.29
Extends #88 #134 Forge FML (1) support