예제 #1
0
        private void GetINBT_Click(object sender, RoutedEventArgs e)
        {
            string nbt = GetNBT();
            string id  = "minecraft:";

            if (type.SelectedIndex == 0)
            {
                id += "potion";
            }
            else if (type.SelectedIndex == 1)
            {
                id += "splash_potion";
            }
            else if (type.SelectedIndex == 2)
            {
                id += "lingering_potion";
            }
            else if (type.SelectedIndex == 4)
            {
                id += "tipped_arrow";
            }
            if (nbt != "")
            {
                nbt = ",tag:" + nbt.Substring(1);
            }
            Tmp.AddCommand("{id:" + id + ",Count:1,Damage:0" + nbt + "}");
        }
예제 #2
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            string nbt = GetNBT();

            if (nbt != "")
            {
                nbt = ",tag:{" + nbt + "}";
            }
            Tmp.AddCommand("{id:\"mob_spawner\",Count:1,Damage:0" + nbt + "}");
        }
예제 #3
0
 private void GetTag_Click(object sender, RoutedEventArgs e)
 {
     if (sender == getTag_Item)
     {
         give.IsChecked = true; CmdGenerator.AddCommand(GetTag()); CmdGenerator.nowCmd = "sign_item";
     }
     else
     {
         block.IsChecked = true; CmdGenerator.AddCommand(GetTag()); CmdGenerator.nowCmd = "sign_block";
     }
 }
예제 #4
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (sender == clear)
     {
         CmdGenWindow.AddCommand("/title " + ES.GetEntity() + " clear");
     }
     else
     {
         CmdGenWindow.AddCommand("/title " + ES.GetEntity() + " reset");
     }
 }
예제 #5
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button btn = (Button)e.Source;

            if (btn == list)
            {
                CmdGenerator.AddCommand("/scoreboard teams list");
            }
            if (btn == Leave)
            {
                CmdGenerator.AddCommand("/scoreboard teams leave");
            }
        }
예제 #6
0
        private void Get_Click(object sender, RoutedEventArgs e)
        {
            string Tag = GetTag();

            if (Tag != "")
            {
                Tag = "," + Tag.Substring(0, Tag.Length - 1);
            }
            CmdGenerator.AddCommand("{id:" + ((TreeViewItem)view.SelectedItem).ToolTip + Tag + "}");
        }
        private void Clear_Click(object sender, RoutedEventArgs e1)
        {
            string show = "";

            if (showParticle.IsChecked == true)
            {
                show = " true";
            }
            else
            {
                show = " false";
            }
            TreeViewItem e = (TreeViewItem)effect.SelectedItem;

            if (e == eff1 || e == eff2 || e == eff3 || e == eff4 || e == eff5 || e == null)
            {
                CmdGenerator.AddCommand("请选择效果"); return;
            }
            CmdGenerator.AddCommand("/effect " + EntitySelector.GetEntity() + " minecraft:" + e.Name + " 0 " + level.Value + show);
        }
예제 #8
0
        private void GetINBT(object sender, RoutedEventArgs e)
        {
            string nbt = GetNBT();

            if (nbt != "")
            {
                nbt = "{BlockEntityTag:" + nbt + "}";
            }
            if (itemNBT.Text != "")
            {
                if (nbt != "")
                {
                    nbt = nbt.Substring(0, nbt.Length - 1) + "," + itemNBT.Text.Substring(1);
                }
                else
                {
                    nbt = " " + itemNBT.Text;
                }
            }
            Tmp.AddCommand("{id:\"" + (banner.IsChecked == true ? "banner" : "shield") + "\",Damage:" + BgColor.SelectedIndex + ",tag:{" + nbt + "}");
        }
예제 #9
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button b = (Button)e.Source;

            if (b == list)
            {
                CmdGenerator.AddCommand("/scoreboard players list");
            }
            if (b == reset1)
            {
                CmdGenerator.AddCommand("/scoreboard players reset " + Target.GetEntity());
            }
            if (b == reset2)
            {
                CmdGenerator.AddCommand("/scoreboard players reset " + Target.GetEntity() + " " + board2.Text);
            }
            if (b == tagList)
            {
                CmdGenerator.AddCommand("/scoreboard players tag " + Target.GetEntity() + " list");
            }
        }
예제 #10
0
 private void OtherGenerate(object sender, RoutedEventArgs e)
 {
     if (sender == get)
     {
         CmdGenerator.AddCommand(GenerateNBT());
     }
     else
     {
         string ench = GetEnchant();
         ItemName.Text = "minecraft:enchanted_book";
         if (sender == getBook && ench.Length != 0)
         {
             CmdGenerator.AddCommand(GenerateCommand().Replace(ench.Substring(0, ench.Length - 1), "StoredEnchantments:" + ench.Substring(4, ench.Length - 5)));
         }
         else if (ench.Length != 0)
         {
             CmdGenerator.AddCommand(GenerateNBT().Replace(ench.Substring(0, ench.Length - 1), "StoredEnchantments:" + ench.Substring(4, ench.Length - 5)));
         }
         else
         {
             CmdGenerator.AddCommand("");
         }
     }
 }
예제 #11
0
 private void AddCommand(object sender, RoutedEventArgs e)
 {
     CmdGenerator.AddCommand((string)((Button)sender).ToolTip);
 }
 private void Level_min_Click(object sender, RoutedEventArgs e)
 {
     CmdGenerator.AddCommand("/xp -2147483648L " + PlayerSelector.GetPlayer());
 }
예제 #13
0
 private void Obj_list_Click(object sender, RoutedEventArgs e)
 {
     CmdGenerator.AddCommand("/scoreboard objectives list");
 }
예제 #14
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     CmdGenerator.AddCommand(GetTag());
     CmdGenerator.nowCmd = "book";
 }
예제 #15
0
 private void generate(object sender, RoutedEventArgs e)
 {
     CmdGenerator.AddCommand(BlockName.Text + "{Damage:" + Meta.Value + "}");
 }