Fix xxx.Parse

This commit is contained in:
BruceChen 2022-10-04 11:53:07 +08:00
parent ccb4ce51cc
commit 53898f3446
21 changed files with 71 additions and 44 deletions

View file

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using System.Linq;
using System.Globalization;
namespace MinecraftClient.Inventory
{
@ -105,7 +106,7 @@ namespace MinecraftClient.Inventory
object damage = NBT["Damage"];
if (damage != null)
{
return int.Parse(damage.ToString() ?? string.Empty);
return int.Parse(damage.ToString() ?? string.Empty, NumberStyles.Any, CultureInfo.CurrentCulture);
}
}
return 0;