@@ -1475,7 +1475,7 @@ private void tabSumosCreate_Click(object sender, RoutedEventArgs e)
1475
1475
if ( sumosText . Length > 0 ) { sumosText += "," ; }
1476
1476
if ( tabSumosHasPotion . IsChecked . Value )
1477
1477
{
1478
- sumosText += "tags:{ CustomPotionEffects:[" + globalPotionString + "]} " ;
1478
+ sumosText += "CustomPotionEffects:[" + globalPotionString + "]" ;
1479
1479
}
1480
1480
if ( sumosText . Length > 0 ) { sumosText += ",pickup:" + tabSumosEpickup . Value . Value + "b" ; } else { sumosText += "pickup:" + tabSumosEpickup . Value . Value + "b" ; }
1481
1481
if ( sumosText . Length > 0 ) { sumosText += ",damage:" + tabSumosEdamage . Value . Value + "d" ; } else { sumosText += "damage:" + tabSumosEdamage . Value . Value + "d" ; }
@@ -1620,12 +1620,20 @@ private void tabSumosRidingClear_Click(object sender, RoutedEventArgs e)
1620
1620
private void tabSumosEgg_Click ( object sender , RoutedEventArgs e )
1621
1621
{
1622
1622
AllSelData asd = new AllSelData ( ) ;
1623
- string temp = sumosFinalStr . Substring ( sumosFinalStr . IndexOf ( '{' ) + 1 ) ;
1624
- string temp2 = temp . Substring ( 0 , temp . Length - 1 ) ;
1625
- string sumosEggNBT = "{EntityTag:{id:\" " + asd . getAt ( tabSumosType . SelectedIndex ) + "\" ," + temp2 + "}}" ;
1626
- sumosFinalStr = "/give @p minecraft:spawn_egg 1 0 " + sumosEggNBT ;
1623
+ if ( sumosFinalStr . IndexOf ( '{' ) != - 1 )
1624
+ {
1625
+ string temp = sumosFinalStr . Substring ( sumosFinalStr . IndexOf ( '{' ) + 1 , sumosFinalStr . Length - sumosFinalStr . IndexOf ( '{' ) - 2 ) ;
1626
+ sumosFinalStr = "/give @p minecraft:spawn_egg 1 0 {EntityTag:{id:\" " + asd . getAt ( tabSumosType . SelectedIndex ) + "\" ," + temp + "}}" ;
1627
+ }
1628
+ else
1629
+ {
1630
+ sumosFinalStr = "/give @p minecraft:spawn_egg 1 0 {EntityTag:{id:\" " + asd . getAt ( tabSumosType . SelectedIndex ) + "\" }}" ;
1631
+ }
1632
+ //string temp = sumosFinalStr.Substring(sumosFinalStr.IndexOf('{') + 1);
1633
+ //string temp2 = temp.Substring(0, temp.Length - 1);
1634
+ //string sumosEggNBT = "{" + temp + "}";
1627
1635
Check cbox = new Check ( ) ;
1628
- cbox . showText ( sumosEggNBT , "" ) ;
1636
+ cbox . showText ( sumosFinalStr ) ;
1629
1637
cbox . Show ( ) ;
1630
1638
}
1631
1639
@@ -2646,6 +2654,14 @@ private void saveFavBtn_Click(object sender, RoutedEventArgs e)
2646
2654
saveFavStr += "|" + HorseChestList [ 14 ] . Replace ( "|" , "[MCH_SPLIT]" ) ;
2647
2655
saveFavStr += "|" + HorseChestList [ 15 ] . Replace ( "|" , "[MCH_SPLIT]" ) ;
2648
2656
saveFavStr += "|" + HorseChestList [ 16 ] . Replace ( "|" , "[MCH_SPLIT]" ) ;
2657
+ //FallingSands
2658
+ saveFavStr += "|" + FallingSandItemSel . SelectedIndex ;
2659
+ saveFavStr += "|" + FallingSandMeta . Value . Value ;
2660
+ saveFavStr += "|" + FallingSandLifeTime . Value . Value ;
2661
+ saveFavStr += "|" + FallingSandIsDrop . IsChecked . Value ;
2662
+ saveFavStr += "|" + FallingSandIsDamage . IsChecked . Value ;
2663
+ saveFavStr += "|" + FallingSandMaxDamage . Value . Value ;
2664
+ saveFavStr += "|" + FallingSandDamageCount . Value . Value ;
2649
2665
//
2650
2666
List < string > wtxt = new List < string > ( ) ;
2651
2667
wtxt . Add ( saveFavStr ) ;
@@ -2878,7 +2894,16 @@ private void readFavBtn_Click(object sender, RoutedEventArgs e)
2878
2894
HorseChestList [ 13 ] = readFavStr [ 178 ] . Replace ( "|" , "[MCH_SPLIT]" ) ;
2879
2895
HorseChestList [ 14 ] = readFavStr [ 179 ] . Replace ( "|" , "[MCH_SPLIT]" ) ;
2880
2896
HorseChestList [ 15 ] = readFavStr [ 180 ] . Replace ( "|" , "[MCH_SPLIT]" ) ;
2881
- HorseChestList [ 16 ] = readFavStr [ 171 ] . Replace ( "|" , "[MCH_SPLIT]" ) ;
2897
+ HorseChestList [ 16 ] = readFavStr [ 181 ] . Replace ( "|" , "[MCH_SPLIT]" ) ;
2898
+ //FallingSands
2899
+ FallingSandItemSel . SelectedIndex = int . Parse ( readFavStr [ 182 ] ) ;
2900
+ FallingSandMeta . Value = int . Parse ( readFavStr [ 183 ] ) ;
2901
+ FallingSandLifeTime . Value = int . Parse ( readFavStr [ 184 ] ) ;
2902
+ FallingSandIsDrop . IsChecked = bool . Parse ( readFavStr [ 185 ] ) ;
2903
+ FallingSandIsDamage . IsChecked = bool . Parse ( readFavStr [ 186 ] ) ;
2904
+ FallingSandMaxDamage . Value = int . Parse ( readFavStr [ 187 ] ) ;
2905
+ FallingSandDamageCount . Value = int . Parse ( readFavStr [ 188 ] ) ;
2906
+ //
2882
2907
this . ShowMessageAsync ( "" , "已读取:" + loadNameList [ loadResultIndex ] , MessageDialogStyle . Affirmative , new MetroDialogSettings ( ) { AffirmativeButtonText = FloatConfirm , NegativeButtonText = FloatCancel , AnimateShow = false , AnimateHide = false } ) ;
2883
2908
}
2884
2909
loadResultIndex ++ ;
0 commit comments