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 + "}"); }
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 + "}"); }
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"; } }
private void Button_Click(object sender, RoutedEventArgs e) { if (sender == clear) { CmdGenWindow.AddCommand("/title " + ES.GetEntity() + " clear"); } else { CmdGenWindow.AddCommand("/title " + ES.GetEntity() + " reset"); } }
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"); } }
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); }
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 + "}"); }
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"); } }
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(""); } } }
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()); }
private void Obj_list_Click(object sender, RoutedEventArgs e) { CmdGenerator.AddCommand("/scoreboard objectives list"); }
private void Button_Click(object sender, RoutedEventArgs e) { CmdGenerator.AddCommand(GetTag()); CmdGenerator.nowCmd = "book"; }
private void generate(object sender, RoutedEventArgs e) { CmdGenerator.AddCommand(BlockName.Text + "{Damage:" + Meta.Value + "}"); }