File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -692,6 +692,8 @@ impl Server {
692692
693693 self . write_plugin_message ( "REGISTER" , "FML|HS\0 FML\0 FML|MP\0 FML\0 FORGE" . as_bytes ( ) ) ;
694694 self . write_plugin_message ( "FML|HS" , & plugin_messages:: FmlHs :: ClientHello { fml_protocol_version } . as_message ( ) ) ;
695+ let mods: HashMap < & str , & str > = HashMap :: new ( ) ;
696+ self . write_plugin_message ( "FML|HS" , & plugin_messages:: FmlHs :: ModList { mods } . as_message ( ) ) ;
695697 } ,
696698 _ => ( ) ,
697699 }
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use std::collections::HashMap;
44use crate :: protocol:: Serializable ;
55use crate :: protocol:: packet:: play:: serverbound:: PluginMessageServerbound ;
66use crate :: protocol:: packet:: play:: serverbound:: PluginMessageServerbound_i16 ;
7+ use crate :: protocol:: VarInt ;
78
89#[ derive( Debug ) ]
910pub enum FmlHs < ' a > {
@@ -36,6 +37,14 @@ impl<'a> FmlHs<'a> {
3637 FmlHs :: ClientHello { fml_protocol_version } => {
3738 vec ! [ 1 , * fml_protocol_version as u8 ]
3839 } ,
40+ FmlHs :: ModList { mods } => {
41+ let mut buf = vec ! [ 2 ] ;
42+ let number_of_mods = VarInt ( mods. len ( ) as i32 ) ;
43+ number_of_mods. write_to ( & mut buf) . unwrap ( ) ;
44+ // TODO: write mods
45+
46+ buf
47+ } ,
3948 _ => unimplemented ! ( )
4049 }
4150 }
You can’t perform that action at this time.
0 commit comments