private void tabSumosCreate_Click(object sender, RoutedEventArgs e)
        {
            AllSelData asd = new AllSelData();
            string sumosText = "ArmorItems:[";
            int equipCount = 0;
            if (mcVersion == "1.8")
            {
                sumosText = "Equipment:[";
                if (sumosEquipmentMainHandId != 0) { equipCount++; sumosText += "{id:" + asd.getItem(sumosEquipmentMainHandId) + ",Count:" + sumosEquipmentMainHandCount + "b,Damage:" + sumosEquipmentMainHandDamage + "s,tag:{" + globalSumosHand + "}},"; }
                if (sumosEquipmentBootId != 0) { equipCount++; sumosText += "{id:" + asd.getItem(sumosEquipmentBootId) + ",Count:" + sumosEquipmentBootCount + "b,Damage:" + sumosEquipmentBootDamage + "s,tag:{" + globalSumosBoot + "}},"; } else { equipCount++; sumosText += "{},"; }
                if (sumosEquipmentLegId != 0) { equipCount++; sumosText += "{id:" + asd.getItem(sumosEquipmentLegId) + ",Count:" + sumosEquipmentLegCount + "b,Damage:" + sumosEquipmentLegDamage + "s,tag:{" + globalSumosLeg + "}},"; } else { equipCount++; sumosText += "{},"; }
                if (sumosEquipmentChestId != 0) { equipCount++; sumosText += "{id:" + asd.getItem(sumosEquipmentChestId) + ",Count:" + sumosEquipmentChestCount + "b,Damage:" + sumosEquipmentChestDamage + "s,tag:{" + globalSumosChest + "}},"; } else { equipCount++; sumosText += "{},"; }
                if (tabSumosHasHeadID.IsChecked.Value == false)
                {
                    if (sumosEquipmentHeadId != 0)
                    {
                        sumosText += "{id:" + asd.getItem(sumosEquipmentHeadId) + ",Count:" + sumosEquipmentHeadCount + "b,Damage:" + sumosEquipmentHeadDamage + "s,tag:{" + globalSumosHead + "}},";
                        equipCount++;
                    }
                    else { equipCount++; sumosText += "{},"; }
                }
                else
                {
                    globalSumosTempSel = tabSumosHead.SelectedIndex;
                    sumosText += "{id:" + asd.getItem(tabSumosHead.SelectedIndex) + ",Count:" + sumosEquipmentHeadCount + "b,Damage:3s,tag:" + tabSumosHeadID.Text + "},";
                    equipCount++;
                }
            }
            else
            {
                tabSumosEgg.IsEnabled = true;
                sumosText += "0:{"; if (sumosEquipmentBootId != 0) { equipCount++; sumosText += "id:" + asd.getItem(sumosEquipmentBootId) + ",Count:" + sumosEquipmentBootCount + "b,Damage:" + sumosEquipmentBootDamage + "s,tag:{" + globalSumosBoot + "}"; } sumosText += "},";
                sumosText += "1:{"; if (sumosEquipmentLegId != 0) { equipCount++; sumosText += "id:" + asd.getItem(sumosEquipmentLegId) + ",Count:" + sumosEquipmentLegCount + "b,Damage:" + sumosEquipmentLegDamage + "s,tag:{" + globalSumosLeg + "}"; } sumosText += "},";
                sumosText += "2:{"; if (sumosEquipmentChestId != 0) { equipCount++; sumosText += "id:" + asd.getItem(sumosEquipmentChestId) + ",Count:" + sumosEquipmentChestCount + "b,Damage:" + sumosEquipmentChestDamage + "s,tag:{" + globalSumosChest + "}"; } sumosText += "},";
                if (tabSumosHasHeadID.IsChecked.Value == false)
                {
                    if (sumosEquipmentHeadId != 0)
                    {
                        sumosText += "3:{id:" + asd.getItem(sumosEquipmentHeadId) + ",Count:" + sumosEquipmentHeadCount + "b,Damage:" + sumosEquipmentHeadDamage + "s,tag:{" + globalSumosHead + "}},";
                        equipCount++;
                    }
                }
                else
                {
                    globalSumosTempSel = tabSumosHead.SelectedIndex;
                    sumosText += "3:{id:" + asd.getItem(tabSumosHead.SelectedIndex) + ",Count:" + sumosEquipmentHeadCount + "b,Damage:3s,tag:" + tabSumosHeadID.Text + "},";
                    equipCount++;
                }
            }
            if (equipCount != 0)
            {
                sumosText = sumosText.Substring(0, sumosText.Length - 1);
                equipCount = 0;
            }
            sumosText += "],";
            sumosText = sumosText.Replace("Equipment:[{},{},{},{}],", "");
            sumosText = sumosText.Replace("Equipment:[0:{},1:{},2:{},3:{}],", "");
            if (mcVersion != "1.8")
            {
                sumosText += "HandItems:[";
                sumosText += "0:{"; if (sumosEquipmentMainHandId != 0) { equipCount++; sumosText += "id:" + asd.getItem(sumosEquipmentMainHandId) + ",Count:" + sumosEquipmentMainHandCount + "b,Damage:" + sumosEquipmentMainHandDamage + "s,tag:{" + globalSumosHand + "}"; } sumosText += "},";
                if (sumosEquipmentOffHandId != 0) { equipCount++; sumosText += "1:{id:" + asd.getItem(sumosEquipmentOffHandId) + ",Count:" + sumosEquipmentOffHandCount + "b,Damage:" + sumosEquipmentOffHandDamage + "s,tag:{" + globalSumosLHand + "}},"; }
                if (equipCount != 0)
                {
                    sumosText = sumosText.Substring(0, sumosText.Length - 1);
                    equipCount = 0;
                }
                sumosText += "],";
                sumosText = sumosText.Replace("ArmorItems:[0:{},1:{},2:{},]", "");
                sumosText = sumosText.Replace(",HandItems:[0:{},]", "");
                sumosText = sumosText.Replace("HandItems:[0:{},]", "");
            }
            if (tabSumosLeftHand.IsChecked.Value) sumosText += "LeftHanded:1b,";
            if (tabSumosDropchance.IsChecked.Value)
            {
                if (mcVersion == "1.8")
                {
                    sumosText += "DropChances:[" + tabSumosDCHand.Value + "F," + tabSumosDCBoot.Value + "F," + tabSumosDCLeg.Value + "F," + tabSumosDCChest.Value + "F," + tabSumosDCHead.Value + "F],";
                }
                else
                {
                    sumosText += "ArmorDropChances:[0:" + tabSumosDCBoot.Value + "F,1:" + tabSumosDCLeg.Value + "F,2:" + tabSumosDCChest.Value + "F,3:" + tabSumosDCHead.Value + "F],";
                    sumosText += "HandDropChances:[0:" + tabSumosDCHand.Value + "F,1:" + tabSumosDCLHand.Value + "F],";
                }
            }
            if (sumosText.Length != 0)
            {
                globalSumosEquipment = sumosText.Substring(0, sumosText.Length - 1).Replace(",tag:{}", "");
            }
            else
            {
                globalSumosEquipment = "";
            }
            sumosText = sumosText.Replace("{,", "{");
            if (tabSumosHasMetaData.IsChecked.Value)
            {
                sumosText += "Attributes:[" + globalAttrStringLess + "],";
            }
            if (tabSumosHasPotion.IsChecked.Value && asd.getAt(tabSumosType.SelectedIndex) != "TippedArrow" && asd.getAt(tabSumosType.SelectedIndex) != "ThrownPotion")
            {
                sumosText += "ActiveEffects:[" + globalPotionString + "],";
            }
            if (tabSumosInvulnerable.IsChecked.Value)
            {
                sumosText += "Invulnerable:1b,";
            }
            if (tabSumosHasName.IsChecked.Value)
            {
                sumosText += "CustomName:\"" + tabSumosName.Text + "\",";
                if (tabSumosNameVisible.IsChecked != null) { if (!tabSumosNameVisible.IsChecked.Value) sumosText += "CustomNameVisible:0,"; else sumosText += "CustomNameVisible:1,"; }
            }
            if (tabSumosNowHealthCheck.IsChecked.Value)
            {
                if (mcVersion == "1.8")
                {
                    sumosText += "HealF:" + tabSumosNowHealth.Value.Value + ",";
                }
                else
                {
                    sumosText += "Health:" + tabSumosNowHealth.Value.Value + "f,";
                }
            }
            if (tabSumosBaby.IsChecked.Value)
            {
                //盔甲架则为Small:1b,村民和可以自然长大的生物则Age:-2147483648,僵尸和猪人等则为IsBaby:1b
                sumosText += "IsBaby:1b,Age:-2147483648,IsBaby:1b,";
            }
            if (tabSumosSilent.IsChecked.Value)
            {
                sumosText += "Silent:1b,";
            }
            if (tabSumosNoAI.IsChecked.Value)
            {
                sumosText += "NoAI:1b,";
            }
            if (tabSumosFireCheck.IsChecked.Value)
            {
                sumosText += "Fire:" + tabSumosFireNum.Value + "s,";
            }
            if (tabSumosGlowing.IsChecked.Value)
            {
                sumosText += "Glowing:1b,";
            }
            if (tabSumosElytra.IsChecked.Value)
            {
                sumosText += "FallFlying:1b,";
            }
            if (tabSumosPersistenceRequired.IsChecked.Value)
            {
                sumosText += "PersistenceRequired:1b,";
            }
            if (tabSumosTeamCheck.IsChecked.Value)
            {
                sumosText += "Team:\"" + tabSumosTeam.Text + "\",";
            }
            if (mcVersion != "1.8")
            {
                if (tabSumosArmorNogravity.IsChecked.Value)
                {
                    sumosText += "NoGravity:1b,";
                }
            }
            if (tabSumosTagsCheck.IsChecked.Value)
            {
                string[] temp = tabSumosTags.Text.Replace("\r", "").Split('\n');
                sumosText += "Tags:[";
                for (int i = 0; i < temp.Length; i++)
                {
                    sumosText += "\"" + temp[i] + "\",";
                }
                sumosText = sumosText.Substring(0, sumosText.Length - 1);
                sumosText += "],";
            }
            if (tabSumosMotionCheck.IsChecked.Value)
            {
                int bx = tabSumosMotionX.Value.ToString().IndexOf('.');
                int by = tabSumosMotionY.Value.ToString().IndexOf('.');
                int bz = tabSumosMotionZ.Value.ToString().IndexOf('.');
                sumosText = sumosText + "Motion:[";
                if (bx == -1) sumosText += tabSumosMotionX.Value + ".0,"; else sumosText += tabSumosMotionX.Value + ",";
                if (by == -1) sumosText += tabSumosMotionY.Value + ".0,"; else sumosText += tabSumosMotionY.Value + ",";
                if (bz == -1) sumosText += tabSumosMotionZ.Value + ".0"; else sumosText += tabSumosMotionZ.Value;
                sumosText += "],";
            }
            if (tabSumosDirection.IsChecked.Value)
            {
                int bx = tabSumosDirectionX.Value.ToString().IndexOf('.');
                int by = tabSumosDirectionY.Value.ToString().IndexOf('.');
                sumosText = sumosText + "Rotation:[";
                if (by == -1) sumosText += tabSumosDirectionY.Value + ".0f,"; else sumosText += tabSumosDirectionY.Value + "f,";
                if (bx == -1) sumosText += tabSumosDirectionX.Value + ".0f,"; else sumosText += tabSumosDirectionX.Value + "f";
                sumosText += "],";
            }
            if (sumosText != null && sumosText != "") sumosText = sumosText.Substring(0, sumosText.Length - 1);
            sumosRidingSelType = asd.getAt(tabSumosType.SelectedIndex);
            //sumosRidingNBT = sumosText;
            globalSumosTypeIndex = tabSumosType.SelectedIndex;
            if (asd.getAt(tabSumosType.SelectedIndex) == "Villager" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:villager")//选择村民
            {
                if (tabVillagerMaxIndex >= globalVillagerMaxValue)
                {
                    tabVillagerMaxIndex = globalVillagerMaxValue - 1;
                }
                string summonVillager = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {Profession:" + asd.getVillagerCareerID(tabVillagerType.SelectedIndex).GetLength(0) + ",Career:" + asd.getVillagerCareerID(tabVillagerType.SelectedIndex).GetLength(1) + ",CareerLevel:9999999";
                summonVillager += "," + sumosText;//可能出现双重逗号
                summonVillager += ",Offers:{Recipes:[";
                string villagerOffers = "";
                string villagerReward = "";
                if (tabVillagerCheckCanCreate == true)
                {
                    if (tabVillagerRewardExp.IsChecked.Value)
                    {
                        villagerReward = ",rewardExp:" + tabVillagerRewardExpValue.Value + "b";
                    }
                    for (int i = 0; i <= tabVillagerMaxIndex; i++)
                    {
                        villagerOffers += "{maxUses:" + globalVillagerMaxUses[i] + villagerReward + ",buy:{id:" + asd.getItem(globalVillagerA[i]) + ",Count:" + globalVillagerACount[i] + "b,Damage:" + globalVillagerAMeta[i] + "s,tag:{" + globalVillagerAStr[i] + "}}";
                        if (globalVillagerBCheck[i] == true) villagerOffers += ",buyB:{id:" + asd.getItem(globalVillagerB[i]) + ",Count:" + globalVillagerBCount[i] + "b,Damage:" + globalVillagerBMeta[i] + "s,tag:{" + globalVillagerBStr[i] + "}}";
                        villagerOffers += ",sell:{id:" + asd.getItem(globalVillagerC[i]) + ",Count:" + globalVillagerCCount[i] + "b,Damage:" + globalVillagerCMeta[i] + "s,tag:{" + globalVillagerCStr[i] + "}}},";
                    }
                    if (villagerOffers.Length >= 1)
                    {
                        villagerOffers = villagerOffers.Remove(villagerOffers.Length - 1, 1);
                    }
                    summonVillager += villagerOffers;
                }
                else
                {
                    this.ShowMessageAsync("", SummonVAtLeastOnce, MessageDialogStyle.Affirmative, new MetroDialogSettings() { AffirmativeButtonText = FloatConfirm, NegativeButtonText = FloatCancel });
                }
                summonVillager += "]}}";
                summonVillager = summonVillager.Replace(",tag:{}", "").Replace(",,", ",");//fix double comma
                if (mcVersion == "1.8")
                {
                    summonVillager = summonVillager.Replace("splash_potion", "potion").Replace("lingering_potion", "potion");
                }
                sumosFinalStr = summonVillager;
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "ArmorStand" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:armor_stand")//盔甲架
            {
                string amtemp = "";
                if (tabSumosArmorCheck.IsChecked.Value)
                {
                    amtemp = "Pose:{Body:[" + tabSumosArmorBodyX.Value + "F," + tabSumosArmorBodyY.Value + "F," + tabSumosArmorBodyZ.Value + "F],"
                        + "LeftArm:[" + tabSumosArmorLArmX.Value + "F," + tabSumosArmorLArmY.Value + "F," + tabSumosArmorLArmZ.Value + "F],"
                        + "RightArm:[" + tabSumosArmorRArmX.Value + "F," + tabSumosArmorRArmY.Value + "F," + tabSumosArmorRArmZ.Value + "F],"
                        + "LeftLeg:[" + tabSumosArmorLLegX.Value + "F," + tabSumosArmorLLegY.Value + "F," + tabSumosArmorLLegZ.Value + "F],"
                        + "RightLeg:[" + tabSumosArmorRLegX.Value + "F," + tabSumosArmorRLegY.Value + "F," + tabSumosArmorRLegZ.Value + "F],"
                        + "Head:[" + tabSumosArmorHeadX.Value + "F," + tabSumosArmorHeadY.Value + "F," + tabSumosArmorHeadZ.Value + "F]},";
                }
                if (tabSumosArmorRotationCheck.IsChecked.Value)
                {
                    amtemp += "Rotation:[" + tabSumosArmorRotationX.Value + "F," + tabSumosArmorRotationY.Value + "F," + tabSumosArmorRotationZ.Value + "F],";
                }
                if (tabSumosArmorNochestplate.IsChecked.Value)
                {
                    amtemp += "NoBasePlate:1b,";
                }
                if (mcVersion == "1.8")
                {
                    if (tabSumosArmorNogravity.IsChecked.Value)
                    {
                        amtemp += "NoGravity:1b,";
                    }
                }
                if (tabSumosArmorCant.IsChecked.Value)
                {
                    amtemp += "DisabledSlots:2039583,";
                }
                if (tabSumosArmorShowarmor.IsChecked.Value)
                {
                    amtemp += "ShowArms:1b,";
                }
                if (tabSumosMarker.IsChecked.Value)
                {
                    amtemp += "Marker:1b,Invisible:1b,";
                }
                if (amtemp.Length > 1) { amtemp = amtemp.Substring(0, amtemp.Length - 1); }
                if (sumosText.Length > 0) { sumosText += "," + amtemp; } else { sumosText = amtemp; }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "ThrownPotion" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:potion")//选择扔出的药水瓶
            {
                if (tabSumosMotionCheck.IsChecked.Value)
                {
                    string tempPotion = "";
                    int xx = tabSumosMotionX.Value.ToString().IndexOf('.');
                    int yy = tabSumosMotionY.Value.ToString().IndexOf('.');
                    int zz = tabSumosMotionZ.Value.ToString().IndexOf('.');
                    string x = "", y = "", z = "";
                    if (xx == -1) x = tabSumosMotionX.Value.ToString() + ".0"; else x = tabSumosMotionX.Value.ToString();
                    if (yy == -1) y = tabSumosMotionY.Value.ToString() + ".0"; else x = tabSumosMotionY.Value.ToString();
                    if (zz == -1) z = tabSumosMotionZ.Value.ToString() + ".0"; else x = tabSumosMotionZ.Value.ToString();
                    if (globalSumosPotion.Length >= 2)
                    {
                        tempPotion = globalSumosPotion.Remove(globalSumosPotion.Length - 1, 1);
                        sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ " + tempPotion + ",Motion:[" + x + "," + y + "," + z + "]}";
                    }
                    else
                    {
                        sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ " + "{Motion:[" + x + "," + y + "," + z + "]}";
                    }

                }
                else
                {
                    sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ " + globalSumosPotion;
                }
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "AreaEffectCloud" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:area_effect_cloud")//选择滞留药水
            {
                if (sumosText.Length > 0) { sumosText += ","; }
                sumosText += "Effects:[" + globalPotionString + "],Duration:" + tabSumosEDuration.Value + ",Radius:" + tabSumosERadius.Value + "f,ParticleParam1:" + globalParticlePara1 + ",ParticleParam2:" + globalParticlePara2 + ",Color:" + globalParticleColor;
                if (globalParticleSel != 0) { sumosText += ",Particle:\"" + asd.getParticle(globalParticleSel) + "\""; }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Chicken" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:chicken")
            {
                if (tabSumosBaby.IsChecked.Value) { if (sumosText.Length > 0) { sumosText += ",IsChickenJockey:1b"; } else { sumosText = "IsChickenJockey:1b"; } }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Enderman" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:enderman")
            {
                if (sumosEndermanCarried != -1)
                {
                    if (sumosText.Length > 0)
                    {
                        sumosText += ",carried:\"" + asd.getItem(sumosEndermanCarried) + "\",carriedData:" + sumosEndermanCarriedMeta + "s";
                    }
                    else
                    {
                        sumosText = "carried:\"" + asd.getItem(sumosEndermanCarried) + "\",carriedData:" + sumosEndermanCarriedMeta + "s";
                    }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Ozelot" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:ocelot")
            {
                if (sumosText.Length > 0)
                {
                    sumosText += ",CatType:" + tabSumosECatType.Value.Value;
                }
                else
                {
                    sumosText = "CatType:" + tabSumosECatType.Value.Value;
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Wolf" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:wolf")
            {
                string temp = "";
                if (tabSumosEUUID.Text != null || tabSumosEUUID.Text != "") { if (mcVersion == "1.8") { temp = "Owner:" + tabSumosEUUID.Text; } else { temp = "OwnerUUID:" + tabSumosEUUID.Text; } }
                if (tabSumosEAngry.IsChecked.Value) { temp += ",Angry:1b"; }
                if (sumosText.Length > 0)
                {
                    sumosText += "," + temp;
                    if (tabSumosEWoolColor.SelectedIndex != -1) {sumosText += ",CollarColor:" + tabSumosEWoolColor.SelectedIndex; }
                }
                else
                {
                    sumosText += temp;
                    if (tabSumosEWoolColor.SelectedIndex != -1) { sumosText += ",CollarColor:" + tabSumosEWoolColor.SelectedIndex; }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Sheep" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:sheep")
            {
                if (sumosText.Length > 0)
                {
                    if (tabSumosEWoolColor.SelectedIndex != -1) { sumosText += ",Color:" + tabSumosEWoolColor.SelectedIndex; }
                    if (tabSumosESheared.IsChecked.Value) { sumosText += ",Sheared:1b"; }
                }
                else
                {
                    if (tabSumosEWoolColor.SelectedIndex != -1) { sumosText = "Color:" + tabSumosEWoolColor.SelectedIndex; }
                    if (tabSumosESheared.IsChecked.Value) { sumosText += ",Sheared:1b"; }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Creeper" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:creeper")
            {
                if (sumosText.Length > 0)
                {
                    sumosText += ",ExplosionRadius:" + tabSumosEExplosionRadius.Value.Value + "b,Fuse:" + tabSumosEFuse.Value.Value + "s";
                    if (tabSumosEPowered.IsChecked.Value) { sumosText += ",powered:1b"; }
                }
                else
                {
                    sumosText = "ExplosionRadius:" + tabSumosEExplosionRadius.Value.Value + "b,Fuse:" + tabSumosEFuse.Value.Value + "s";
                    if (tabSumosEPowered.IsChecked.Value) { sumosText += ",powered:1b"; }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Slime" || asd.getAt(tabSumosType.SelectedIndex) == "LavaSlime" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:slime" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:magma_cube")
            {
                if (sumosText.Length > 0)
                {
                    sumosText += ",Size:" + tabSumosESize.Value.Value;
                }
                else
                {
                    sumosText = "Size:" + tabSumosESize.Value.Value;
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Shulker" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:shulker")
            {
                if (sumosText.Length > 0)
                {
                    sumosText += ",Peek:" + tabSumosEShulkerPeek.Value.Value + "b";
                }
                else
                {
                    sumosText = "Peek:" + tabSumosEShulkerPeek.Value.Value + "b";
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "EnderDragon" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:ender_dragon")
            {
                if (tabSumosEDragon.Value.Value != -1)
                {
                    if (sumosText.Length > 0)
                    {
                        sumosText += ",DragonPhase:" + tabSumosEDragon.Value.Value;
                    }
                    else
                    {
                        sumosText = "DragonPhase:" + tabSumosEDragon.Value.Value;
                    }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Ghast" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:ghast")
            {
                if (sumosText.Length > 0)
                {
                    sumosText += ",ExplosionPower:" + tabSumosEExplosionPower.Value.Value;
                }
                else
                {
                    sumosText = "ExplosionPower:" + tabSumosEExplosionPower.Value.Value;
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Rabbit" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:rabbit")
            {
                if (sumosText.Length > 0)
                {
                    sumosText += ",RabbitType:" + tabSumosERabbitType.Value.Value;
                }
                else
                {
                    sumosText = "RabbitType:" + tabSumosERabbitType.Value.Value;
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "WitherBoss" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:wither")
            {
                if (sumosText.Length > 0)
                {
                    sumosText += ",Invul:" + tabSumosEInvul.Value.Value;
                }
                else
                {
                    sumosText = "Invul:" + tabSumosEInvul.Value.Value;
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Endermite" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:endermite")
            {
                if (tabSumosEAtkByEnderman.IsChecked.Value)
                {
                    if (sumosText.Length > 0)
                    {
                        sumosText += ",PlayerSpawned:1b";
                    }
                    else
                    {
                        sumosText = "PlayerSpawned:1b";
                    }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Zombie" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:zombie")
            {
                if (tabSumosECanBreakDoor.IsChecked.Value) { sumosText += ",CanBreakDoors:1b"; }
                if (tabSumosEZombieType.Value.Value != -1) { sumosText += ",ZombieType:" + tabSumosEZombieType.Value.Value; }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "PigZombie" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:zombie_pigman")
            {
                if (tabSumosECanBreakDoor.IsChecked.Value) { sumosText += ",CanBreakDoors:1b"; }
                if (tabSumosEZombieType.Value.Value != -1) { sumosText += ",ZombieType:" + tabSumosEZombieType.Value.Value; }
                if (tabSumosEAngry.IsChecked.Value) { sumosText += ",Anger:32767s"; }
                if (tabSumosEUUID.Text != "") { sumosText += ",HurtBy:" + tabSumosEUUID.Text; }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "VillagerGolem" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:villager_golem")
            {
                if (tabSumosEPlayerCreated.IsChecked.Value)
                {
                    if (sumosText.Length > 0)
                    {
                        sumosText += ",PlayerCreated:1b";
                    }
                    else
                    {
                        sumosText = "PlayerCreated:1b";
                    }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Pig" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:pig")
            {
                if (tabSumosESaddle.IsChecked.Value)
                {
                    if (sumosText.Length > 0)
                    {
                        sumosText += ",Saddle:1b";
                    }
                    else
                    {
                        sumosText = "Saddle:1b";
                    }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Skeleton" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:skeleton")
            {
                if (sumosText.Length > 0)
                {
                    if (tabSumosEZombieType.Value.Value != -1) { sumosText += ",SkeletonType:" + tabSumosEZombieType.Value.Value; }
                }
                else
                {
                    if (tabSumosEZombieType.Value.Value != -1) { sumosText += "SkeletonType:" + tabSumosEZombieType.Value.Value; }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Guardian" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:guardian")
            {
                if (tabSumosEElder.IsChecked.Value)
                {
                    if (sumosText.Length > 0)
                    {
                        sumosText += ",Elder:1b";
                    }
                    else
                    {
                        sumosText = "Elder:1b";
                    }
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "EntityHorse" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:horse")
            {
                if (sumosText.Length > 0) { sumosText += ","; }
                if (mcVersion != "latest") if (HorseTypeDonkey.IsChecked.Value) { sumosText += "Type:1"; } else if (HorseTypeMule.IsChecked.Value) { sumosText += "Type:2"; } else if (HorseTypeZombie.IsChecked.Value) { sumosText += "Type:3"; } else if (HorseTypeSkeleton.IsChecked.Value) { sumosText += "Type:4"; } else { sumosText += "Type:0"; }
                sumosText += ",Variant:" + HorseVariantValue.Value.Value;
                if (HorseTypeDonkey.IsChecked.Value || HorseTypeMule.IsChecked.Value) { sumosText += ",ChestedHorse:1b"; }
                if (HorseTamed.IsChecked.Value) { sumosText += ",Tame:1b"; if (HorseTamedUUID.Text != null || HorseTamedUUID.Text != "") { if (mcVersion == "1.8") { sumosText += ",OwnerName:" + HorseTamedUUID.Text; } else { sumosText += ",OwnerUUID:" + HorseTamedUUID.Text; } } }
                if (mcVersion != "latest") if (HorseSaddle.IsChecked.Value) { sumosText += ",Saddle:1b"; }
                if (HorseSkeletonTrap.IsChecked.Value) { sumosText += ",SkeletonTrap:1b,SkeletonTrapTime:" + HorseSkeletonTrapTime.Value.Value; }
                sumosText += ",Items:[";
                if (HorseChestList[0] != null && HorseChestList[0] != "") { sumosText += HorseChestList[0] + ","; }
                if (HorseChestList[1] != null && HorseChestList[1] != "") { sumosText += HorseChestList[1] + ","; }
                if (HorseChestList[2] != null && HorseChestList[2] != "") { sumosText += HorseChestList[2] + ","; }
                if (HorseChestList[3] != null && HorseChestList[3] != "") { sumosText += HorseChestList[3] + ","; }
                if (HorseChestList[4] != null && HorseChestList[4] != "") { sumosText += HorseChestList[4] + ","; }
                if (HorseChestList[5] != null && HorseChestList[5] != "") { sumosText += HorseChestList[5] + ","; }
                if (HorseChestList[6] != null && HorseChestList[6] != "") { sumosText += HorseChestList[6] + ","; }
                if (HorseChestList[7] != null && HorseChestList[7] != "") { sumosText += HorseChestList[7] + ","; }
                if (HorseChestList[8] != null && HorseChestList[8] != "") { sumosText += HorseChestList[8] + ","; }
                if (HorseChestList[9] != null && HorseChestList[9] != "") { sumosText += HorseChestList[9] + ","; }
                if (HorseChestList[10] != null && HorseChestList[10] != "") { sumosText += HorseChestList[10] + ","; }
                if (HorseChestList[11] != null && HorseChestList[11] != "") { sumosText += HorseChestList[11] + ","; }
                if (HorseChestList[12] != null && HorseChestList[12] != "") { sumosText += HorseChestList[12] + ","; }
                if (HorseChestList[13] != null && HorseChestList[13] != "") { sumosText += HorseChestList[13] + ","; }
                if (HorseChestList[14] != null && HorseChestList[14] != "") { sumosText += HorseChestList[14] + ","; }
                sumosText += "]";
                if (HorseChestList[15] != null && HorseChestList[15] != "") { sumosText += ",SaddleItem:" + HorseChestList[15] + ","; }
                if (HorseChestList[16] != null && HorseChestList[16] != "") { sumosText += ",ArmorItem:" + HorseChestList[16] + ","; }
                sumosText = sumosText.Replace(",,", ",");
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "TippedArrow" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:arrow")
            {
                if (sumosText.Length > 0) { sumosText += ","; }
                if (tabSumosHasPotion.IsChecked.Value)
                {
                    sumosText += "CustomPotionEffects:[" + globalPotionString + "]";
                }
                if (sumosText.Length > 0) { sumosText += ",pickup:" + tabSumosEpickup.Value.Value + "b"; } else { sumosText += "pickup:" + tabSumosEpickup.Value.Value + "b"; }
                if (sumosText.Length > 0) { sumosText += ",damage:" + tabSumosEdamage.Value.Value + "d"; } else { sumosText += "damage:" + tabSumosEdamage.Value.Value + "d"; }
                sumosFinalStr = "/summon Arrow ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "SpectralArrow" || asd.getAt(tabSumosType.SelectedIndex) == "Arrow" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:spectral_arrow" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:arrow")
            {
                if (sumosText.Length > 0) { sumosText += ",pickup:" + tabSumosEpickup.Value.Value + "b"; } else { sumosText += "pickup:" + tabSumosEpickup.Value.Value + "b"; }
                if (sumosText.Length > 0) { sumosText += ",damage:" + tabSumosEdamage.Value.Value + "d"; } else { sumosText += "damage:" + tabSumosEdamage.Value.Value + "d"; }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Fireball" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:fireball")
            {
                if (sumosText.Length > 0) { sumosText += ",ExplosionPower:" + tabSumosEExplosionPower.Value.Value; } else { sumosText += "ExplosionPower:" + tabSumosEExplosionPower.Value.Value; }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Snowball" || asd.getAt(tabSumosType.SelectedIndex) == "ThrownEgg" || asd.getAt(tabSumosType.SelectedIndex) == "ThrownEnderpearl" || asd.getAt(tabSumosType.SelectedIndex) == "ThrownExpBottle" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:snowball" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:egg" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:ender_pearl" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:xp_bottle")
            {
                if (tabSumosEUUID.Text != "")
                {
                    if (sumosText.Length > 0) { sumosText += ","; }
                    sumosText += "ownerName:" + tabSumosEUUID.Text;
                }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "Item" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:item")
            {
                if (tabSummonItem.SelectedIndex == 0)
                {
                    summonFinalStr = SummonSNotChooseItemType;
                }
                else
                {
                    string summonText = "";
                    if (tabSummonPickupdelayCheck.IsChecked.Value)
                    {
                        summonText += "PickupDelay:" + tabSummonPickupdelay.Value + ",";
                    }
                    if (tabSummonAgeCheck.IsChecked.Value)
                    {
                        summonText += "Age:" + tabSummonAge.Value + ",";
                    }
                    summonText += "Item:{id:\"" + asd.getItem(tabSummonItem.SelectedIndex) + "\",Count:" + tabSummonCount.Value + "b,Damage:" + tabSummonMeta.Value + "s";
                    summonText += ",tag:{";
                    if (tabSummonHide.SelectedIndex != 0)
                    {
                        summonText += "HideFlags: " + tabSummonHide.SelectedIndex + ",";
                    }
                    if (tabSummonUnbreaking.IsChecked.Value)
                    {
                        summonText += "Unbreakable:1,";
                    }
                    if (tabSummonHasEnchant.IsChecked.Value || tabSummonHasNL.IsChecked.Value || tabSummonHasAttr.IsChecked.Value)
                    {
                        string meta = tabSummonGetBackMeta();
                        summonText += meta + ",";
                    }
                    summonText += "}}";
                    summonText = summonText.Replace(",tag:{,}", "");
                    if (tabSumosEOwner.Text != "") { summonText += ",Owner:" + tabSumosEOwner.Text; }
                    if (tabSumosEThrower.Text != "") { summonText += ",Thrower:" + tabSumosEThrower.Text; }
                    //ridingText = ",Riding:{id:\"" + asd.getItem(tabSummonItem.SelectedIndex) + "\",Count:" + tabSummonCount.Value + "b,Damage:" + tabSummonMeta.Value + "s";
                    sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + summonText + "}";
                }
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "XPOrb" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:xp_orb")
            {
                if (sumosText.Length > 0) { sumosText += ","; }
                sumosText += "Value:" + tabSumosEExp.Value.Value + "s";
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "PrimedTnt" || asd.getAt(tabSumosType.SelectedIndex) == "MinecartTNT" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:tnt_minecart")
            {
                if (sumosText.Length > 0) { sumosText += ","; }
                sumosText += "Fuse:" + tabSumosEFuse.Value.Value;
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "FallingSand" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:falling_block")
            {
                if (sumosText.Length > 0) { sumosText += ","; }
                string sands = "";
                if (asd.getItem(FallingSandItemSel.SelectedIndex) != "minecraft:sand") sands += "Block:\"" + asd.getItem(FallingSandItemSel.SelectedIndex) + "\",";
                if (FallingSandMeta.Value.Value != 0) sands += "Data:" + FallingSandMeta.Value.Value + "s,";
                sands += "Time:" + FallingSandLifeTime.Value.Value + ",";
                if (!FallingSandIsDrop.IsChecked.Value) sands += "DropItem:0b,";
                if (FallingSandIsDamage.IsChecked.Value) { sands += "HurtEntities:1b,FallHurtMax:" + FallingSandMaxDamage.Value.Value + ",FallHurtAmount:" + FallingSandDamageCount.Value.Value + "f,"; }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + sands.Substring(0, sands.Length - 1) + "}";
            }
            else if (asd.getAt(tabSumosType.SelectedIndex) == "ItemFrame" || asd.getAt(tabSumosType.SelectedIndex) == "minecraft:item_frame")
            {
                if (sumosText.Length > 0) { sumosText += ","; }
                string frame = "ItemDropChance:" + FrameDropChance.Value.Value + "f,ItemRotation:" + FrameRouteCount.Value.Value + "b,";
                if (FrameCoCheck.IsChecked.Value) { frame += "TileX:" + FrameX.Value.Value + ",TileY:" + FrameY.Value.Value + ",TileZ:" + FrameZ.Value.Value + ","; }
                if (FrameFacing.Value.Value != -1) { frame += "Facing:" + FrameFacing.Value.Value + "b,"; }
                if (FrameHasItem.IsChecked.Value) { frame += "Item:{Count:" + globalFrameItem[0] + "b,Damage:" + globalFrameItem[1] + "s,id:\"" + globalFrameItem[2] + "\",tag:{" + globalFrameItem[3] + "}},"; } else { frame += "Item:{},"; }
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + frame.Substring(0, frame.Length - 1) + "}";
            }
            else
            {
                sumosFinalStr = "/summon " + asd.getAt(tabSumosType.SelectedIndex) + " ~ ~1 ~ {" + sumosText + "}";
            }
            sumosFinalStr = sumosFinalStr.Replace(",tag:{}", "").Replace("{,", "{").Replace(" {}", "");
            if (sumosFinalStr.IndexOf("{") == -1)
            {
                sumosRidingNBT = sumosText;
            }
            else
            {
                sumosRidingNBT = sumosFinalStr.Substring(sumosFinalStr.IndexOf("{") + 1, sumosFinalStr.Length - sumosFinalStr.IndexOf("{") - 2);
            }
            //我也不知道为什么要写这么复杂
            //判断是否含有颜色代码
            if (sumosFinalStr.IndexOf("§") != -1)
            {
                FixColorCode fcc = new FixColorCode();
                fcc.setStr(sumosFinalStr);
                fcc.ShowDialog();
                sumosFinalStr = fcc.getStr();
            }
        }