Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit aa296c4

Browse files
committed
v2.8.5.1
1 parent 8df2114 commit aa296c4

File tree

12 files changed

+318
-158
lines changed

12 files changed

+318
-158
lines changed

WpfMinecraftCommandHelper2/AllSelData.cs

Lines changed: 195 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ namespace WpfMinecraftCommandHelper2
99
public class AllSelData
1010
{
1111
private string nowLang = "cn";
12+
private string mcVersion = "latest";
1213

1314
public AllSelData()
1415
{
1516
Config config = new Config();
1617
nowLang = config.getSetting("[Personalize]", "Language");
18+
mcVersion = config.getSetting("[Personalize]", "MCVersion");
1719
}
1820

1921
private string[] itemNameList = {
@@ -1016,6 +1018,164 @@ public AllSelData()
10161018
"猪"
10171019
};
10181020

1021+
string[] atSel111 = {
1022+
"minecraft:tnt",
1023+
"minecraft:ocelot",
1024+
"minecraft:polar_bear",
1025+
"minecraft:bat",
1026+
"minecraft:boat",
1027+
"minecraft:villager",
1028+
"minecraft:egg",
1029+
"minecraft:wither",
1030+
"minecraft:wither_skull",
1031+
"minecraft:falling_block",
1032+
"minecraft:silverfish",
1033+
"minecraft:ghast",
1034+
"minecraft:painting",
1035+
"minecraft:fireball",
1036+
"minecraft:dragon_fireball",
1037+
"minecraft:small_fireball",
1038+
"minecraft:chicken",
1039+
"minecraft:arrow",
1040+
"minecraft:spectral_arrow",
1041+
"minecraft:zombie",
1042+
"minecraft:giant",
1043+
"minecraft:husk",
1044+
"minecraft:zombie_villager",
1045+
"minecraft:zombie_pigman",
1046+
"minecraft:xp_bottle",
1047+
"minecraft:xp_orb",
1048+
"minecraft:skeleton",
1049+
"minecraft:wither_skeleton",
1050+
"minecraft:stray",
1051+
"minecraft:minecart",
1052+
"minecraft:tnt_minecart",
1053+
"minecraft:furnace_minecart",
1054+
"minecraft:hopper_minecart",
1055+
"minecraft:commandblock_minecart",
1056+
"minecraft:spawner_minecart",
1057+
"minecraft:chest_minecart",
1058+
"minecraft:armor_stand",
1059+
"minecraft:wolf",
1060+
"minecraft:blaze",
1061+
"minecraft:horse",
1062+
"minecraft:zombie_horse",
1063+
"minecraft:skeleton_horse",
1064+
"minecraft:mule",
1065+
"minecraft:donkey",
1066+
"minecraft:mooshroom",
1067+
"minecraft:ender_dragon",
1068+
"minecraft:endermite",
1069+
"minecraft:enderman",
1070+
"minecraft:ender_crystal",
1071+
"minecraft:ender_pearl",
1072+
"minecraft:eye_of_ender_signal",
1073+
"minecraft:cow",
1074+
"minecraft:witch",
1075+
"minecraft:creeper",
1076+
"minecraft:shulker",
1077+
"minecraft:shulker_bullet",
1078+
"minecraft:lightning_bolt",
1079+
"minecraft:slime",
1080+
"minecraft:guardian",
1081+
"minecraft:elder_guardian",
1082+
"minecraft:leash_knot",
1083+
"minecraft:villager_golem",
1084+
"minecraft:rabbit",
1085+
"minecraft:item",
1086+
"minecraft:item_frame",
1087+
"minecraft:snowball",
1088+
"minecraft:snowman",
1089+
"minecraft:fireworks_rocket",
1090+
"minecraft:magma_cube",
1091+
"minecraft:sheep",
1092+
"minecraft:potion",
1093+
"minecraft:area_effect_cloud",
1094+
"minecraft:squid",
1095+
"minecraft:spider",
1096+
"minecraft:cave_spider",
1097+
"minecraft:pig"
1098+
};
1099+
1100+
string[] atSelNameList111 = {
1101+
"TNT",
1102+
"豹猫",
1103+
"北极熊",
1104+
"蝙蝠",
1105+
"船",
1106+
"村民",
1107+
"蛋",
1108+
"凋零骷髅",
1109+
"凋零骷髅头",
1110+
"掉落沙",
1111+
"蠹虫",
1112+
"恶魂",
1113+
"画",
1114+
"火焰弹",
1115+
"火焰弹 - 龙息火球",
1116+
"火焰弹 - 小火球",
1117+
"鸡",
1118+
"箭矢",
1119+
"箭矢 - 光灵箭",
1120+
"僵尸",
1121+
"僵尸 - 巨型僵尸",
1122+
"僵尸 - 尸壳",
1123+
"僵尸村民",
1124+
"僵尸猪人",
1125+
"经验瓶",
1126+
"经验球",
1127+
"骷髅",
1128+
"骷髅 - 凋零骷髅",
1129+
"骷髅 - 流髑",
1130+
"矿车",
1131+
"矿车 - TNT矿车",
1132+
"矿车 - 动力矿车",
1133+
"矿车 - 漏斗矿车",
1134+
"矿车 - 命令方块矿车",
1135+
"矿车 - 刷怪笼矿车",
1136+
"矿车 - 运输矿车",
1137+
"盔甲架",
1138+
"狼",
1139+
"烈焰人",
1140+
"马",
1141+
"马 - 僵尸马",
1142+
"马 - 骷髅马",
1143+
"马 - 骡子",
1144+
"马 - 驴子",
1145+
"蘑菇牛",
1146+
"末影龙",
1147+
"末影螨",
1148+
"末影人",
1149+
"末影水晶",
1150+
"末影珍珠",
1151+
"末影之眼",
1152+
"牛",
1153+
"女巫",
1154+
"爬行者",
1155+
"潜影贝",
1156+
"潜影弹",
1157+
"闪电",
1158+
"史莱姆",
1159+
"守卫者",
1160+
"守卫者 - 远古守卫者",
1161+
"栓绳结",
1162+
"铁傀儡",
1163+
"兔子",
1164+
"物品",
1165+
"物品展示框",
1166+
"雪球",
1167+
"雪人",
1168+
"烟花火箭",
1169+
"岩浆怪",
1170+
"羊",
1171+
"药水瓶",
1172+
"药水云",
1173+
"鱿鱼",
1174+
"蜘蛛",
1175+
"蜘蛛 - 洞穴蜘蛛",
1176+
"猪"
1177+
};
1178+
10191179
string[] effectStr = {
10201180
"<请选择一项>",
10211181
"<清除效果>",
@@ -2675,29 +2835,57 @@ public string getEffectStr(int index)
26752835

26762836
public string getAt(int index)
26772837
{
2678-
if (index < 0 || index > (atSel.Count() - 1))
2838+
if (mcVersion == "latest")
26792839
{
2680-
return "IndexError";
2840+
if (index < 0 || index > (atSel111.Count() - 1))
2841+
{
2842+
return "IndexError";
2843+
}
2844+
else
2845+
{
2846+
return atSel111[index];
2847+
}
26812848
}
26822849
else
26832850
{
2684-
return atSel[index];
2851+
if (index < 0 || index > (atSel.Count() - 1))
2852+
{
2853+
return "IndexError";
2854+
}
2855+
else
2856+
{
2857+
return atSel[index];
2858+
}
26852859
}
26862860
}
26872861

26882862
public string getAtNameList(int index)
26892863
{
2690-
if (index >= 0 && index < atSelNameList.Count())
2864+
if (mcVersion == "latest")
26912865
{
2692-
if (nowLang != "cn") { return atSel[index]; } else { return atSelNameList[index]; }
2866+
if (index >= 0 && index < atSelNameList111.Count())
2867+
{
2868+
if (nowLang != "cn") { return atSel111[index]; } else { return atSelNameList111[index]; }
2869+
}
2870+
else
2871+
{
2872+
return "IndexError";
2873+
}
26932874
}
26942875
else
26952876
{
2696-
return "IndexError";
2877+
if (index >= 0 && index < atSelNameList.Count())
2878+
{
2879+
if (nowLang != "cn") { return atSel[index]; } else { return atSelNameList[index]; }
2880+
}
2881+
else
2882+
{
2883+
return "IndexError";
2884+
}
26972885
}
26982886
}
26992887

2700-
public int getAtListCount() { return atSel.Count(); }
2888+
public int getAtListCount() { if (mcVersion == "latest") { return atSel111.Count(); } else { return atSel.Count(); } }
27012889

27022890
public string getHideList(int index)
27032891
{

WpfMinecraftCommandHelper2/At.xaml.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public At()
2929
rideEntity.Items.Add(asd.getAtNameList(i));
3030
}
3131
clear();
32+
Config config = new Config();
33+
mcVersion = config.getSetting("[Personalize]", "MCVersion");
3234
}
3335

3436
private string FloatTipTitle = "提示";
@@ -514,11 +516,6 @@ private void MetroWindow_PreviewKeyDown(object sender, System.Windows.Input.KeyE
514516
}
515517
}
516518

517-
public void setVersion(string mcVersion)
518-
{
519-
this.mcVersion = mcVersion;
520-
}
521-
522519
private void itemCheck_Click(object sender, RoutedEventArgs e)
523520
{
524521
itemCheckBtn.IsEnabled = itemCheck.IsChecked.Value;
@@ -527,7 +524,6 @@ private void itemCheck_Click(object sender, RoutedEventArgs e)
527524
private void itemCheckBtn_Click(object sender, RoutedEventArgs e)
528525
{
529526
Summon summonbox = new Summon();
530-
summonbox.setVersion(mcVersion);
531527
summonbox.ShowDialog();
532528
cmd = summonbox.returnStr()[3];
533529
}

WpfMinecraftCommandHelper2/Language/en_US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@
430430
"PotionEffectName": "Effect Name",
431431
"PotionTime": "Duration",
432432
"PotionLevel": "Level",
433-
"PotionTip": "「Time Unit Tick, default with 5 minutes 20Tick/s」",
433+
"PotionTip": "「Time Unit Tick, default 30 seconds. 20Tick/s」",
434434
"PotionEffect1": "Speed",
435435
"PotionEffect2": "Slowness",
436436
"PotionEffect3": "Haste",

WpfMinecraftCommandHelper2/Language/zh_CN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@
430430
"PotionEffectName": "效果名",
431431
"PotionTime": "持续时间",
432432
"PotionLevel": "效果等级",
433-
"PotionTip": "「时间单位Tick,默认5分钟 20Tick/s」",
433+
"PotionTip": "「时间单位Tick,默认30秒 20Tick/s」",
434434
"PotionEffect1": "速度",
435435
"PotionEffect2": "缓慢",
436436
"PotionEffect3": "急迫",

WpfMinecraftCommandHelper2/Language/zh_TW.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@
430430
"PotionEffectName": "效果名",
431431
"PotionTime": "持續時間",
432432
"PotionLevel": "效果等級",
433-
"PotionTip": "「時間單位Tick,默認5分鍾 20Tick/s」",
433+
"PotionTip": "「時間單位Tick,默認30秒 20Tick/s」",
434434
"PotionEffect1": "速度",
435435
"PotionEffect2": "緩慢",
436436
"PotionEffect3": "急迫",

WpfMinecraftCommandHelper2/MainWindow.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@
9797
</Grid>
9898
<Grid Margin="10,60,0,0">
9999
<RadioButton x:Name="mcvLatest" Content="Latest" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0" ToolTip="MCVersion"/>
100-
<RadioButton x:Name="mcv18" Content="1.8" HorizontalAlignment="Left" Margin="70,0,0,0" VerticalAlignment="Top" ToolTip="MCVersion"/>
100+
<RadioButton x:Name="mcv110" Content="1.9/1.10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="65,0,0,0" ToolTip="MCVersion"/>
101+
<RadioButton x:Name="mcv18" Content="1.8" HorizontalAlignment="Left" Margin="140,0,0,0" VerticalAlignment="Top" ToolTip="MCVersion"/>
101102
</Grid>
102103
</Grid>
103104
<Grid HorizontalAlignment="Left" Height="360" Margin="370,10,0,-57" VerticalAlignment="Top" Width="189">

WpfMinecraftCommandHelper2/MainWindow.xaml.cs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,18 @@ public MainWindow()
3030
private bool isUpdate = false;
3131
private bool isNeedUpdate = false;
3232
private bool preview = false;
33-
private string version = "2.8.4.9";
33+
private string version = "2.8.5.1";
3434
private string getversion = "0.0.0.0";
3535
private string passversion = "0.0.0.0";
3636
private bool error1 = false;
3737
private bool error2 = false;
38-
private string mcVersion = "latest";
3938

4039
private void win_Loaded(object sender, RoutedEventArgs e)
4140
{
4241
SetLang setlang = new SetLang();
4342
lang = setlang.getAllLanguage();
4443
string templang = setlang.getLangFile();
4544
appLanguage(setlang.SetMain(templang));
46-
if (config.getSetting("[Personalize]", "MCVersion") == "latest")
47-
{
48-
mcVersion = "latest";
49-
}
50-
else if (config.getSetting("[Personalize]", "MCVersion") == "1.8")
51-
{
52-
mcVersion = "1.8";
53-
}
5445
if (config.getSetting("[Personalize]", "Avatar") != "sc")
5546
{
5647
pictureBoxClicked();
@@ -77,7 +68,7 @@ private void win_Loaded(object sender, RoutedEventArgs e)
7768
timer.Tick += timer_Tick;
7869
timer.Start();
7970
if (config.getSetting("[Personalize]", "ColorfulFontsUse") != "Sign") { fixColorSelSign.IsChecked = false; fixColorSelCB.IsChecked = true; } else { fixColorSelCB.IsChecked = false; fixColorSelSign.IsChecked = true; }
80-
if (config.getSetting("[Personalize]", "MCVersion") == "1.8") { mcv18.IsChecked = true; } else { mcvLatest.IsChecked = true; }
71+
if (config.getSetting("[Personalize]", "MCVersion") == "1.8") { mcv18.IsChecked = true; } else if(config.getSetting("[Personalize]", "MCVersion") == "1.9/1.10") { mcv110.IsChecked = true; } else { mcvLatest.IsChecked = true; }
8172
}
8273

8374
private int timerticks = 0;
@@ -318,7 +309,6 @@ private void potionBtn_Click(object sender, RoutedEventArgs e)
318309
{
319310
this.Hide();
320311
Potion potionbox = new Potion();
321-
potionbox.setVersion(mcVersion);
322312
potionbox.ShowDialog();
323313
this.Show();
324314
}
@@ -352,7 +342,6 @@ private void tellrawBtn_Click(object sender, RoutedEventArgs e)
352342
{
353343
this.Hide();
354344
Tellraw tell = new Tellraw();
355-
tell.setVersion(mcVersion);
356345
tell.ShowDialog();
357346
this.Show();
358347
}
@@ -369,7 +358,6 @@ private void summonEntityBtn_Click(object sender, RoutedEventArgs e)
369358
{
370359
this.Hide();
371360
Summon summonbox = new Summon();
372-
summonbox.setVersion(mcVersion);
373361
summonbox.ShowDialog();
374362
this.Show();
375363
}
@@ -754,7 +742,7 @@ private void settingsFlyout_ClosingFinished(object sender, RoutedEventArgs e)
754742
config.setSetting(new Dictionary<string, string> { { "ColorfulFontsUse", ColorfulFonts } });
755743
string CheckingUpdate; if (Update.IsChecked.Value) CheckingUpdate = "true"; else CheckingUpdate = "false";
756744
config.setSetting(new Dictionary<string, string> { { "CheckingUpdate", CheckingUpdate } });
757-
string MCVersionSel; if (mcv18.IsChecked.Value) { MCVersionSel = "1.8"; mcVersion = "1.8"; } else { MCVersionSel = "latest"; mcVersion = "latest"; }
745+
string MCVersionSel; if (mcv18.IsChecked.Value) { MCVersionSel = "1.8"; } else if (mcv110.IsChecked.Value) { MCVersionSel = "1.9/1.10"; } else { MCVersionSel = "latest"; }
758746
config.setSetting(new Dictionary<string, string> { { "MCVersion", MCVersionSel } });
759747
}
760748

0 commit comments

Comments
 (0)