change .NET version to 4.0

This commit is contained in:
BruceChen 2022-07-24 22:03:02 +08:00
parent 735d182468
commit 3429989527
5 changed files with 9 additions and 17 deletions

View file

@ -153,11 +153,11 @@ namespace MinecraftClient.Mapping
this.logicalHeight = (int)nbt["logical_height"]; this.logicalHeight = (int)nbt["logical_height"];
if (nbt.ContainsKey("coordinate_scale")) if (nbt.ContainsKey("coordinate_scale"))
{ {
var coordinate_scale_obj = nbt["coordinate_scale"]; var coordinateScaleObj = nbt["coordinate_scale"];
if (coordinate_scale_obj.GetType() == typeof(float)) if (coordinateScaleObj.GetType() == typeof(float))
this.coordinateScale = (float)coordinate_scale_obj; this.coordinateScale = (float)coordinateScaleObj;
else else
this.coordinateScale = (double)coordinate_scale_obj; this.coordinateScale = (double)coordinateScaleObj;
} }
if (nbt.ContainsKey("ultrawarm")) if (nbt.ContainsKey("ultrawarm"))
this.ultrawarm = 1 == (byte)nbt["ultrawarm"]; this.ultrawarm = 1 == (byte)nbt["ultrawarm"];

View file

@ -85,7 +85,7 @@ namespace MinecraftClient.Mapping
get get
{ {
if (world.GetDimension() == null) if (world.GetDimension() == null)
return (int)Math.Floor(Y / Chunk.SizeY); // old version, always start at zero return (int)Math.Floor(Y / Chunk.SizeY); // below 1.16.2, Y coordinate always start from zero
else else
return (int)Math.Floor((Y - world.GetDimension().minY) / Chunk.SizeY); return (int)Math.Floor((Y - world.GetDimension().minY) / Chunk.SizeY);
} }

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@ -10,9 +10,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MinecraftClient</RootNamespace> <RootNamespace>MinecraftClient</RootNamespace>
<AssemblyName>MinecraftClient</AssemblyName> <AssemblyName>MinecraftClient</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>Client</TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
@ -39,7 +38,6 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -49,7 +47,6 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup /> <PropertyGroup />
<PropertyGroup> <PropertyGroup>
@ -422,7 +419,6 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="Resources\config\MinecraftClient.ini" /> <None Include="Resources\config\MinecraftClient.ini" />
<None Include="Resources\lang\de.ini" /> <None Include="Resources\lang\de.ini" />
<None Include="Resources\lang\en.ini" /> <None Include="Resources\lang\en.ini" />

View file

@ -302,7 +302,6 @@ namespace MinecraftClient.Protocol.Handlers
for (int i = 0; i < worldCount; i++) for (int i = 0; i < worldCount; i++)
dataTypes.ReadNextString(packetData); // World Names - 1.16 and above dataTypes.ReadNextString(packetData); // World Names - 1.16 and above
dataTypes.ReadNextNbt(packetData); // Dimension Codec - 1.16 and above dataTypes.ReadNextNbt(packetData); // Dimension Codec - 1.16 and above
} }
string currentDimensionName = null; string currentDimensionName = null;

View file

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>