private void createBtn_Click(object sender, RoutedEventArgs e) { if (SFCheckCanCreate) { AllSelData asd = new AllSelData(); string version = "3"; string blockStack = ""; string biome = ""; string other = ""; //blockStack for (int i = 0; i < SFMaxIndex; i++) { if (globalSFBlockCount[i] != 1) { blockStack += globalSFBlockCount[i].ToString() + "*"; } if (globalSFBlockID[i] != 0) { blockStack += asd.getItem(globalSFBlockID[i]); } else { blockStack += "minecraft:air"; } if (globalSFBlockDamage[i] != 0) { blockStack += ":" + globalSFBlockDamage[i]; } blockStack += ","; } if (SFMaxIndex > 1) { blockStack = blockStack.Remove(blockStack.Count() - 1, 1); } //biome biome = asd.getBiomeID(biomeSel.SelectedIndex).ToString(); //other if (CheckVillage.IsChecked.Value) { other += "village"; if (CheckVillageSize.IsChecked.Value || CheckVillageDistance.IsChecked.Value) { string add = "("; if (CheckVillageSize.IsChecked.Value) { add += "size=" + VillageSize.Value.ToString() + " "; } if (CheckVillageDistance.IsChecked.Value) { add += "distance=" + VillageDistance.Value.ToString() + " "; } add = add.Remove(add.Count() - 1, 1); add += ")"; other += add; } other += ","; } if (CheckMineshaft.IsChecked.Value) { other += "mineshaft"; if (CheckMineshaftChance.IsChecked.Value) { string add = "("; add += "chance=" + MineshaftChance.Value.ToString(); add += ")"; other += add; } other += ","; } if (CheckStronghold.IsChecked.Value) { other += "stronghold"; if (CheckStrongholdCount.IsChecked.Value || CheckStrongholdDistance.IsChecked.Value || CheckStrongholdSpread.IsChecked.Value) { string add = "("; if (CheckStrongholdCount.IsChecked.Value) { add += "count=" + StrongholdCount.Value.ToString() + " "; } if (CheckStrongholdDistance.IsChecked.Value) { add += "distance=" + StrongholdDistance.Value.ToString() + " "; } if (CheckStrongholdSpread.IsChecked.Value) { add += "spread=" + StrongholdSpread.Value.ToString() + " "; } add = add.Remove(add.Count() - 1, 1); add += ")"; other += add; } other += ","; } if (CheckBiome.IsChecked.Value) { other += "biome_1"; if (CheckBiomeChance.IsChecked.Value) { string add = "("; add += "distance=" + BiomeChance.Value.ToString(); add += ")"; other += add; } other += ","; } if (CheckDungeon.IsChecked.Value) { other += "dungeon,"; } if (CheckDecoration.IsChecked.Value) { other += "decoration,"; } if (CheckLake.IsChecked.Value) { other += "lake,"; } if (CheckLavaLake.IsChecked.Value) { other += "lava_lake,"; } if (CheckOceanmonument.IsChecked.Value) { other += "oceanmonument,"; } if (other.Count() > 0) { other = other.Remove(other.Count() - 1, 1); } //create finalStr = version + ";" + blockStack + ";" + biome + ";" + other; } else { this.ShowMessageAsync("", SuperflatAtLeastClickOnce, MessageDialogStyle.Affirmative, new MetroDialogSettings() { AffirmativeButtonText = FloatConfirm, NegativeButtonText = FloatCancel, AnimateShow = true }); } }