From acc086bf276e5f254546c7d3efc3258fea5c2042 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 17 Mar 2019 15:22:42 -0700 Subject: [PATCH] Add entity_summon and other missing CommandData nodes. Fix #119 Match to https://github.com/SpigotMC/BungeeCord/blob/4428409d41acef5495c6d41c9640c99dbb0d6468/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java#L514 Not all were documented on https://wiki.vg/Command_Data --- src/protocol/packet.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/protocol/packet.rs b/src/protocol/packet.rs index 90dc89f..41da4ef 100644 --- a/src/protocol/packet.rs +++ b/src/protocol/packet.rs @@ -2584,6 +2584,7 @@ pub enum CommandProperty { }, GameProfile, BlockPos, + ColumnPos, Vec3, Vec2, BlockState, @@ -2614,7 +2615,11 @@ pub enum CommandProperty { Range { decimals: bool, }, + IntRange, + FloatRange, ItemEnchantment, + EntitySummon, + Dimension, } @@ -2679,6 +2684,7 @@ impl Serializable for CommandNode { }, "minecraft:game_profile" => CommandProperty::GameProfile, "minecraft:block_pos" => CommandProperty::BlockPos, + "minecraft:column_pos" => CommandProperty::ColumnPos, "minecraft:vec3" => CommandProperty::Vec3, "minecraft:vec2" => CommandProperty::Vec2, "minecraft:block_state" => CommandProperty::BlockState, @@ -2709,7 +2715,11 @@ impl Serializable for CommandNode { "minecraft:range" => { CommandProperty::Range { decimals: Serializable::read_from(buf)? } }, + "minecraft:int_range" => CommandProperty::IntRange, + "minecraft:float_range" => CommandProperty::FloatRange, "minecraft:item_enchantment" => CommandProperty::ItemEnchantment, + "minecraft:entity_summon" => CommandProperty::EntitySummon, + "minecraft:dimension" => CommandProperty::Dimension, _ => panic!("unsupported command node parser {}", parse), }) } else {