示例#1
0
        private void checkBtn_Click(object sender, RoutedEventArgs e)
        {
            Check cbox = new Check();

            cbox.showText(createText);
            cbox.Show();
        }
示例#2
0
        private void tabOther1ItemFlyCreate_Click(object sender, RoutedEventArgs e)
        {
            if (tabOther1ItemFlySel.SelectedIndex < 0)
            {
                tabOther1ItemFlySel.SelectedIndex = 0;
            }
            string canget = "";

            if (tabOther1ItemFlyCantGet.IsChecked.Value)
            {
                canget = "32767";
            }
            else
            {
                canget = "0";
            }
            AllSelData asd = new AllSelData();

            if (mcVersion == "1.8" || mcVersion == "1.9/1.10")
            {
                finalStr = "/summon ArmorStand ~ ~1 ~ {Tags:[\"HoloItems\"],PersistenceRequired:1b,DisabledSlots:2039583,NoGravity:1b,Marker:1b,Invulnerable:1b,Invisible:1b,Passengers:[{id:Item,Tags:[\"HoloItems\"],Item:{id:\"" + asd.getItem(tabOther1ItemFlySel.SelectedIndex) + "\",Count:" + tabOther1ItemFlyCount.Value + "b,Damage:" + tabOther1ItemFlyDamage.Value + "s},PickupDelay:" + canget + ",Age:-32768}]}";
            }
            else
            {
                finalStr = "/summon armor_stand ~ ~1 ~ {Tags:[\"HoloItems\"],PersistenceRequired:1b,DisabledSlots:2039583,NoGravity:1b,Marker:1b,Invulnerable:1b,Invisible:1b,Passengers:[{id:Item,Tags:[\"HoloItems\"],Item:{id:\"" + asd.getItem(tabOther1ItemFlySel.SelectedIndex) + "\",Count:" + tabOther1ItemFlyCount.Value + "b,Damage:" + tabOther1ItemFlyDamage.Value + "s},PickupDelay:" + canget + ",Age:-32768}]}";
            }
            Check checkbox = new Check();

            checkbox.showText(finalStr);
            checkbox.Show();
        }
示例#3
0
        private void checkBtn_Click(object sender, RoutedEventArgs e)
        {
            Check checkbox = new Check();

            checkbox.showText(finalStr);
            checkbox.Show();
        }
示例#4
0
 private void tabOther1GetHeadCreate_Click(object sender, RoutedEventArgs e)
 {
     if (tell2)
     {
         this.ShowMessageAsync(OtherHelpGetHeadNeedInternet, OtherHelpGetHeadHelp, MessageDialogStyle.Affirmative, new MetroDialogSettings()
         {
             AffirmativeButtonText = FloatConfirm, NegativeButtonText = FloatCancel, AnimateShow = true
         });
         tell2 = false;
     }
     else
     {
         if (!tabOther1GetHeadCode.IsChecked.Value)
         {
             string       playerName = tabOther1GetHeadName.Text;
             string       com        = HeadBack(playerName);
             BitmapSource img        = HeadBackImg(playerName);
             Check        checkbox   = new Check();
             checkbox.showTextAndImage(com, playerName, img, tabOther1GetHeadFullBody.IsChecked.Value);
             checkbox.Show();
         }
         else
         {
             string pngURL = tabOther1GetHeadName.Text;
             string com    = "{textures:{SKIN:{url:\"" + pngURL + "\"}}}";
             com = Base64Encode(com);
             string give     = "/give @p minecraft:skull 1 3 {display:{Name:\"Head\"},SkullOwner:{Properties:{textures:[{Value:\"" + com + "\"}]}}}";
             Check  checkbox = new Check();
             checkbox.showText(give, OtherHelpGetHeadTitle + pngURL);
             checkbox.Show();
         }
     }
 }
示例#5
0
        private void tabOther1TestforHotCreate_Click(object sender, RoutedEventArgs e)
        {
            string temp = "/testfor @p {SelectedItemSlot:" + tabOther1TestforHotNum.Value + "}";

            finalStr = temp;
            Check checkbox = new Check();

            checkbox.showText(finalStr);
            checkbox.Show();
        }
示例#6
0
        private void tabOther1ItemFlyRemove_Click(object sender, RoutedEventArgs e)
        {
            string temp = "/kill @e[tag=HoloItems,r=1]";

            finalStr = temp;
            Check checkbox = new Check();

            checkbox.showText(finalStr);
            checkbox.Show();
        }
示例#7
0
        private void tabOther1HatCreate_Click(object sender, RoutedEventArgs e)
        {
            if (tabOther1HatSel.SelectedIndex < 0)
            {
                tabOther1HatSel.SelectedIndex = 0;
            }
            string nbt = "{";

            if (globalEnchString != "")
            {
                nbt += globalEnchString + ",";
            }
            if (globalNLString != "")
            {
                nbt += globalNLString + ",";
            }
            if (globalAttrString != "")
            {
                nbt += globalAttrString + ",";
            }
            if (globalHideflag != "")
            {
                nbt += globalHideflag + ",";
            }
            if (globalEnchString != "" || globalNLString != "" || globalAttrString != "" || globalHideflag != "")
            {
                if (nbt.Length >= 1)
                {
                    nbt = nbt.Remove(nbt.Length - 1, 1);
                }
                else
                {
                    //errorC = true;
                }
            }
            nbt += "}";
            AllSelData asd  = new AllSelData();
            string     temp = "/replaceitem entity @e[type=Player,c=1] slot.armor.head " + asd.getItem(tabOther1HatSel.SelectedIndex) + " " + tabOther1HatNum.Value + " " + tabOther1HatDamage.Value;

            if (tabOther1HatNBT.IsChecked.Value)
            {
                temp = temp + " " + nbt;
            }
            finalStr = temp;
            Check checkbox = new Check();

            checkbox.showText(finalStr);
            checkbox.Show();
        }
示例#8
0
        private void tabOther1WordRemove_Click(object sender, RoutedEventArgs e)
        {
            if (mcVersion == "1.8" || mcVersion == "1.9/1.10")
            {
                finalStr = "/kill @e[tag=HoloText,type=ArmorStand,r=3,c=1]";
            }
            else
            {
                finalStr = "/kill @e[tag=HoloText,type=armor_stand,r=3,c=1]";
            }
            Check checkbox = new Check();

            checkbox.showText(finalStr);
            checkbox.Show();
        }
示例#9
0
        private void tabOther1TestforInvCreate_Click(object sender, RoutedEventArgs e)
        {
            AllSelData asd  = new AllSelData();
            string     temp = "/testfor @p {Inventory:[{Slot:" + tabOther1TestforInvSlot.Value + "b,id:\"" + asd.getItem(tabOther1TestforInvItem.SelectedIndex) + "\"";

            if (tabOther1TestforInvCount.Value > 1)
            {
                temp = temp + ",Count:" + tabOther1TestforInvCount.Value + "b";
            }
            if (tabOther1TestforInvMeta.Value > 0)
            {
                temp = temp + ",Damage:" + tabOther1TestforInvMeta.Value + "s";
            }
            if (globalNLString.Length > 0 || globalEnchString.Length > 0 || globalAttrString.Length > 0)
            {
                string tagTemp = "";
                if (globalNLString.Length > 0)
                {
                    tagTemp = tagTemp + globalNLString + ",";
                }
                if (globalEnchString.Length > 0)
                {
                    tagTemp = tagTemp + globalEnchString + ",";
                }
                if (globalAttrString.Length > 0)
                {
                    tagTemp = tagTemp + globalAttrString + ",";
                }
                if (globalHideflag != "")
                {
                    tagTemp += globalHideflag + ",";
                }
                if (tagTemp.Length >= 1)
                {
                    tagTemp = tagTemp.Remove(tagTemp.Length - 1, 1);
                }
                temp = temp + ",tag:{" + tagTemp + "}";
            }
            temp    += "}]}";
            finalStr = temp;
            Check checkbox = new Check();

            checkbox.showText(finalStr);
            checkbox.Show();
        }
示例#10
0
        private void tabOther1ClearCreate_Click(object sender, RoutedEventArgs e)
        {
            AllSelData asd  = new AllSelData();
            string     temp = "/clear @p " + asd.getItem(globalItemSel) + " " + globalItemMeta + " " + globalItemCount;

            if (tabOther1ClearHasName.IsChecked.Value || tabOther1ClearHasEnchant.IsChecked.Value || tabOther1ClearHasAttr.IsChecked.Value)
            {
                temp += " {";
            }
            if (tabOther1ClearHasName.IsChecked.Value)
            {
                temp += globalNLString + ",";
            }
            if (tabOther1ClearHasEnchant.IsChecked.Value)
            {
                temp += globalEnchString + ",";
            }
            if (tabOther1ClearHasAttr.IsChecked.Value)
            {
                temp += globalAttrString + ",";
            }
            if (globalHideflag != "")
            {
                temp += globalHideflag + ",";
            }
            if (tabOther1ClearHasName.IsChecked.Value || tabOther1ClearHasEnchant.IsChecked.Value || tabOther1ClearHasAttr.IsChecked.Value || globalHideflag != "")
            {
                if (temp.Length >= 1)
                {
                    temp = temp.Remove(temp.Length - 1, 1);
                }
                else
                {
                    //errorC = true;
                }
                temp += "}";
            }
            finalStr = temp;
            Check checkbox = new Check();

            checkbox.showText(finalStr);
            checkbox.Show();
        }
        private void checkBtn_Click(object sender, RoutedEventArgs e)
        {
            JObject allText = (JObject)JsonConvert.DeserializeObject(finalStr);

            if (!Directory.Exists(Directory.GetCurrentDirectory() + @"\data\"))
            {
                Directory.CreateDirectory(Directory.GetCurrentDirectory() + @"\data\");
            }
            AllSelData asd      = new AllSelData();
            string     filename = asd.getItem(ResultItem.SelectedIndex).Replace("minecraft:", "") + "_" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + DateTime.Now.Millisecond + ".json";

            using (FileStream fs = new FileStream(Directory.GetCurrentDirectory() + @"\data\" + filename, FileMode.Create))
            {
                using (StreamWriter sw = new StreamWriter(fs, System.Text.Encoding.UTF8))
                {
                    sw.Write(allText);
                }
            }
            Check cbox = new Check();

            cbox.showText(finalStr, LootTableSaveTitle + @"\data\" + filename);
            cbox.Show();
        }
示例#12
0
        private void tabOther1WordCreate_Click(object sender, RoutedEventArgs e)
        {
            if (mcVersion == "1.8" || mcVersion == "1.9/1.10")
            {
                finalStr = "/summon ArmorStand ~ ~1 ~ {Tags:[\"HoloText\"],PersistenceRequired:1b,DisabledSlots:2039583,Invulnerable:1b,NoGravity:1b,Invisible:1b,CustomName:\"" + tabOther1Word.Text + "\",CustomNameVisible:true}";
            }
            else
            {
                finalStr = "/summon armor_stand ~ ~1 ~ {Tags:[\"HoloText\"],PersistenceRequired:1b,DisabledSlots:2039583,Invulnerable:1b,NoGravity:1b,Invisible:1b,CustomName:\"" + tabOther1Word.Text + "\",CustomNameVisible:true}";
            }
            //判断是否含有颜色代码
            if (finalStr.IndexOf("§", StringComparison.Ordinal) != -1)
            {
                FixColorCode fcc = new FixColorCode();
                fcc.setStr(finalStr);
                fcc.ShowDialog();
                finalStr = fcc.getStr();
            }
            Check checkbox = new Check();

            checkbox.showText(finalStr);
            checkbox.Show();
        }
 private void tabSumosEgg_Click(object sender, RoutedEventArgs e)
 {
     AllSelData asd = new AllSelData();
     if (sumosFinalStr.IndexOf('{') != -1)
     {
         string temp = sumosFinalStr.Substring(sumosFinalStr.IndexOf('{') + 1, sumosFinalStr.Length - sumosFinalStr.IndexOf('{') - 2);
         sumosFinalStr = "/give @p minecraft:spawn_egg 1 0 {EntityTag:{id:\"" + asd.getAt(tabSumosType.SelectedIndex) + "\"," + temp + "}}";
     }
     else
     {
         sumosFinalStr = "/give @p minecraft:spawn_egg 1 0 {EntityTag:{id:\"" + asd.getAt(tabSumosType.SelectedIndex) + "\"}}";
     }
     Check cbox = new Check();
     cbox.showText(sumosFinalStr);
     cbox.Show();
 }
 private void checkBtn_Click(object sender, RoutedEventArgs e)
 {
     //string temp = "/* API LIST */\r\n";
     //temp += "globalPotionString: \r\n";
     //temp += "\t" + globalPotionString + "\r\n";
     //temp += "globalPotionYN: \r\n";
     //temp += "\t" + globalPotionYN + "\r\n";
     //temp += "globalPotionNBT: \r\n";
     //temp += "\t" + globalPotionNBT + "";
     //Check checkbox = new Check();
     //checkbox.showText(temp);
     //checkbox.ShowDialog();
     Check checkbox = new Check();
     checkbox.showText(finalStr);
     checkbox.Show();
 }
        private void bCreate_Click(object sender, RoutedEventArgs e)
        {
            string fir = "";
            string sec = "";

            if (South.IsChecked.Value)
            {
                fir = "/testforblock ~ ~-1 ~-3 dropper 2";
                sec = "/blockdata ~ ~-1 ~-5";
            }
            else if (North.IsChecked.Value)
            {
                fir = "/testforblock ~ ~-1 ~3 dropper 3";
                sec = "/blockdata ~ ~-1 ~5";
            }
            else if (East.IsChecked.Value)
            {
                fir = "/testforblock ~-3 ~-1 ~ dropper 4";
                sec = "/blockdata ~-5 ~-1 ~";
            }
            else if (West.IsChecked.Value)
            {
                fir = "/testforblock ~3 ~-1 ~ dropper 5";
                sec = "/blockdata ~5 ~-1 ~";
            }
            string firstBlock = "";

            if (CustomNameCheck.IsChecked.Value)
            {
                firstBlock += " {CustomName:\"" + CustomNameBox.Text + "\",Items:[";
            }
            else
            {
                firstBlock += " {Items:[";
            }
            if (item1 != "")
            {
                firstBlock += item1 + ",";
            }
            if (item2 != "")
            {
                firstBlock += item2 + ",";
            }
            if (item3 != "")
            {
                firstBlock += item3 + ",";
            }
            if (item4 != "")
            {
                firstBlock += item4 + ",";
            }
            if (item5 != "")
            {
                firstBlock += item5 + ",";
            }
            if (item6 != "")
            {
                firstBlock += item6 + ",";
            }
            if (item7 != "")
            {
                firstBlock += item7 + ",";
            }
            if (item8 != "")
            {
                firstBlock += item8 + ",";
            }
            if (item9 != "")
            {
                firstBlock += item9 + ",";
            }
            if (firstBlock != " {Items:[")
            {
                firstBlock = firstBlock.Remove(firstBlock.Count() - 1, 1);
            }
            string secondBlock = "";

            if (CustomNameCheck.IsChecked.Value)
            {
                secondBlock += " {CustomName:\"" + CustomNameBox_Copy.Text + "\",Items:[";
            }
            else
            {
                secondBlock += " {Items:[";
            }
            if (item1_Copy != "")
            {
                secondBlock += item1_Copy + ",";
            }
            if (item2_Copy != "")
            {
                secondBlock += item2_Copy + ",";
            }
            if (item3_Copy != "")
            {
                secondBlock += item3_Copy + ",";
            }
            if (item4_Copy != "")
            {
                secondBlock += item4_Copy + ",";
            }
            if (item5_Copy != "")
            {
                secondBlock += item5_Copy + ",";
            }
            if (item6_Copy != "")
            {
                secondBlock += item6_Copy + ",";
            }
            if (item7_Copy != "")
            {
                secondBlock += item7_Copy + ",";
            }
            if (item8_Copy != "")
            {
                secondBlock += item8_Copy + ",";
            }
            if (item9_Copy != "")
            {
                secondBlock += item9_Copy + ",";
            }
            if (secondBlock != " {Items:[")
            {
                secondBlock = secondBlock.Remove(secondBlock.Count() - 1, 1);
            }
            firstBlock  = fir + firstBlock + "]}";
            secondBlock = sec + secondBlock + "]}";
            //判断是否含有颜色代码
            if (firstBlock.IndexOf("§") != -1)
            {
                FixColorCode fcc = new FixColorCode();
                fcc.setStr(firstBlock);
                fcc.fixColor();
                firstBlock = fcc.getStr();
                fcc.Close();
            }
            if (secondBlock.IndexOf("§") != -1)
            {
                FixColorCode fcc = new FixColorCode();
                fcc.setStr(secondBlock);
                fcc.fixColor();
                secondBlock = fcc.getStr();
                fcc.Close();
            }
            Check cbox2 = new Check();

            cbox2.showText(secondBlock, CCBack);
            cbox2.Show();
            Check cbox = new Check();

            cbox.showText(firstBlock, CCFront);
            cbox.Show();
        }
 private void checkBtn_Click(object sender, RoutedEventArgs e)
 {
     Check cbox = new Check();
     cbox.showText(createText);
     cbox.Show();
 }
 private void PoolCheckBtn_Click(object sender, RoutedEventArgs e)
 {
     string output = "{\"pools\":[";
     if (globalPool != "")
     {
         output += globalPool.Substring(0, globalPool.Length - 1);
     }
     output += "]}";
     if (LootTableFileName.Text.IndexOf(':') == -1)
     {
         Check cbox = new Check();
         cbox.showText(LootTableFileName.ToolTip + " Error.");
         cbox.Show();
     }
     else
     {
         string path = LootTableFileName.Text.Split(':')[1];
         string namespacePath = LootTableFileName.Text.Split(':')[0];
         try
         {
             JObject allText = (JObject)JsonConvert.DeserializeObject(output);
             if (!Directory.Exists(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\"))
             {
                 Directory.CreateDirectory(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\");
             }
             path = path.Replace("\\\\\\", "\\");
             path = path.Replace("\\\\", "\\");
             path = path.Replace('/', '\\');
             string[] dirCheck = path.Split('\\');
             string dirCheckPath = "";
             for (int i = 0; i < dirCheck.Length - 1; i++)
             {
                 dirCheckPath += dirCheck[i] + @"\";
             }
             if (!Directory.Exists(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + dirCheckPath))
             {
                 Directory.CreateDirectory(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + dirCheckPath);
             }
             if (File.Exists(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + path + ".json"))
             {
                 File.Delete(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + path + ".json");
             }
             using (FileStream fs = new FileStream(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + path + ".json", FileMode.Create))
             {
                 using (StreamWriter sw = new StreamWriter(fs, System.Text.Encoding.UTF8))
                 {
                     sw.Write(allText);
                 }
             }
         }
         catch (Exception)
         {
             this.ShowMessageAsync(FloatErrorTitle, LootTableError, MessageDialogStyle.Affirmative, new MetroDialogSettings() { AffirmativeButtonText = FloatConfirm, NegativeButtonText = FloatCancel });
         }
         Check cbox = new Check();
         cbox.showText(output, LootTableSaveTitle + @"\data\loot_tables\" + namespacePath + @"\" + path + ".json");
         cbox.Show();
     }
 }
 private void checkBtn_Click(object sender, RoutedEventArgs e)
 {
     Check checkbox = new Check();
     checkbox.showText(finalStr);
     checkbox.Show();
 }
 private void LootTableFileNameList_Click(object sender, RoutedEventArgs e)
 {
     Check cbox = new Check();
     cbox.showText(LootTableWiki, "Wiki");
     cbox.Show();
 }