Add entity_summon and other missing CommandData nodes. Fix #119

Match to 4428409d41/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java (L514)
Not all were documented on https://wiki.vg/Command_Data
This commit is contained in:
ice_iix 2019-03-17 15:22:42 -07:00
parent 0d5c1478a5
commit acc086bf27
1 changed files with 10 additions and 0 deletions

View File

@ -2584,6 +2584,7 @@ pub enum CommandProperty {
}, },
GameProfile, GameProfile,
BlockPos, BlockPos,
ColumnPos,
Vec3, Vec3,
Vec2, Vec2,
BlockState, BlockState,
@ -2614,7 +2615,11 @@ pub enum CommandProperty {
Range { Range {
decimals: bool, decimals: bool,
}, },
IntRange,
FloatRange,
ItemEnchantment, ItemEnchantment,
EntitySummon,
Dimension,
} }
@ -2679,6 +2684,7 @@ impl Serializable for CommandNode {
}, },
"minecraft:game_profile" => CommandProperty::GameProfile, "minecraft:game_profile" => CommandProperty::GameProfile,
"minecraft:block_pos" => CommandProperty::BlockPos, "minecraft:block_pos" => CommandProperty::BlockPos,
"minecraft:column_pos" => CommandProperty::ColumnPos,
"minecraft:vec3" => CommandProperty::Vec3, "minecraft:vec3" => CommandProperty::Vec3,
"minecraft:vec2" => CommandProperty::Vec2, "minecraft:vec2" => CommandProperty::Vec2,
"minecraft:block_state" => CommandProperty::BlockState, "minecraft:block_state" => CommandProperty::BlockState,
@ -2709,7 +2715,11 @@ impl Serializable for CommandNode {
"minecraft:range" => { "minecraft:range" => {
CommandProperty::Range { decimals: Serializable::read_from(buf)? } CommandProperty::Range { decimals: Serializable::read_from(buf)? }
}, },
"minecraft:int_range" => CommandProperty::IntRange,
"minecraft:float_range" => CommandProperty::FloatRange,
"minecraft:item_enchantment" => CommandProperty::ItemEnchantment, "minecraft:item_enchantment" => CommandProperty::ItemEnchantment,
"minecraft:entity_summon" => CommandProperty::EntitySummon,
"minecraft:dimension" => CommandProperty::Dimension,
_ => panic!("unsupported command node parser {}", parse), _ => panic!("unsupported command node parser {}", parse),
}) })
} else { } else {