Skip to content

Commit 0c96ea6

Browse files
committed
update to .NET 8
1 parent eeca5e3 commit 0c96ea6

File tree

10 files changed

+19
-22
lines changed

10 files changed

+19
-22
lines changed

.github/workflows/dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v3
1818
with:
19-
dotnet-version: 6.0.x
19+
dotnet-version: 8.0.x
2020
- name: Restore dependencies
2121
working-directory: src/MiNET/MiNET.Console
2222
run: dotnet restore
@@ -38,5 +38,5 @@ jobs:
3838
file: src/MiNET/MiNET.Console/minet.zip
3939
asset_name: MiNET.zip
4040
tag: ${{ github.ref }}
41-
release_name: MiNET-CobwebSMP 1.13.0.10 (1.20.80)
41+
release_name: MiNET-CobwebSMP 1.13.0.11 (1.20.80)
4242
body: ${{ github.event.head_commit.message }}

src/MiNET/MiNET.Client/MiNET.Client.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
1+
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44
<ApplicationIcon />
55
<OutputType>Exe</OutputType>
66
<StartupObject></StartupObject>

src/MiNET/MiNET.Console/MiNET.Console.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66
<PropertyGroup>
77
<OutputType>Exe</OutputType>
8-
<TargetFramework>net6.0</TargetFramework>
8+
<TargetFramework>net8.0</TargetFramework>
99
</PropertyGroup>
1010
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
1111
<DebugType>full</DebugType>

src/MiNET/MiNET/MiNET.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
44
<PackageId>MiNET-CobwebSMP</PackageId>
5-
<Version>1.13.0.10</Version>
5+
<Version>1.13.0.11</Version>
66
<Authors>gurun</Authors>
77
<Company>Niclas Olofsson</Company>
88
<Description>MiNET - a Minecraft PocketEdition Server</Description>
@@ -17,7 +17,7 @@
1717
<LangVersion>latest</LangVersion>
1818
<NoWarn>1701;1702;1701;CA1416</NoWarn>
1919
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
20-
<TargetFramework>net6.0</TargetFramework>
20+
<TargetFramework>net8.0</TargetFramework>
2121
<NeutralLanguage>en</NeutralLanguage>
2222
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2323
</PropertyGroup>

src/MiNET/MiNET/Net/Items/ItemTranslator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@ public bool TryGetName(string input, out string output)
214214
}
215215
}
216216

217-
public class metaToName<metaId, name> :
218-
Dictionary<metaId, name>
217+
public class metaToName<metaId, metaName> :
218+
Dictionary<metaId, metaName>
219219
{
220220
}
221221

222-
public class metaToName<map, meta, name> :
223-
Dictionary<map, metaToName<meta, name>>
222+
public class metaToName<metaMap, metaId, metaName> :
223+
Dictionary<metaMap, metaToName<metaId, metaName>>
224224
{
225225
}
226226

src/MiNET/MiNET/Net/MCPE Protocol.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,11 @@
3030
using System;
3131
using System.Net;
3232
using System.Numerics;
33-
using System.Threading;
3433
using MiNET.Utils;
3534
using MiNET.Utils.Skins;
3635
using MiNET.Items;
3736
using MiNET.Crafting;
3837
using MiNET.Net.RakNet;
39-
using little = MiNET.Utils.Int24; // friendly name
40-
using LongString = System.String;
4138
using MiNET.Utils.Metadata;
4239
using MiNET.Utils.Vectors;
4340
using MiNET.Utils.Nbt;

src/MiNET/MiNET/Net/Packet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3412,7 +3412,7 @@ public pixelList ReadPixelList()
34123412
var listSize = ReadInt();
34133413
for (int i = 0; i < listSize; i++)
34143414
{
3415-
mapData.mapData.Add(new pixels { pixel = ReadUnsignedVarInt(), index = ReadShort()});
3415+
mapData.mapData.Add(new pixelsData { pixel = ReadUnsignedVarInt(), index = ReadShort()});
34163416
}
34173417
return mapData;
34183418
}

src/MiNET/MiNET/Plugins/Commands/VanillaCommands.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -708,17 +708,17 @@ public string Weather(Player commander, WeatherManager.weatherTypes weather)
708708

709709
[Command(Name = "fog", Description = "Change level fog settings")]
710710
[Authorize(Permission = 4)]
711-
public void fog(Player commander, mode action, string fogID)
711+
public void fog(Player commander, fogMode action, string fogID)
712712
{
713-
if (action == mode.push)
713+
if (action == fogMode.push)
714714
{
715715
McpePlayerFog msg = McpePlayerFog.CreateObject();
716716
msg.fogstack = new fogStack(fogID);
717717
commander.Level.RelayBroadcast(msg);
718718
commander.Level.fog = fogID;
719719
commander.SendMessage("Fog setting was added successfully");
720720
}
721-
else if(action == mode.remove)
721+
else if(action == fogMode.remove)
722722
{
723723
McpePlayerFog msg = McpePlayerFog.CreateObject();
724724
msg.fogstack = new fogStack("minecraft:fog_default");
@@ -728,7 +728,7 @@ public void fog(Player commander, mode action, string fogID)
728728
}
729729
}
730730

731-
public enum mode
731+
public enum fogMode
732732
{
733733
remove, push
734734
}

src/MiNET/MiNET/Utils/Cryptography/CryptoUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static byte[] ToDerEncoded([NotNull] this ECDiffieHellmanPublicKey key)
7575
{
7676
byte[] asn = new byte[24] {0x30, 0x76, 0x30, 0x10, 0x6, 0x7, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x2, 0x1, 0x6, 0x5, 0x2b, 0x81, 0x4, 0x0, 0x22, 0x3, 0x62, 0x0, 0x4};
7777

78-
return asn.Concat(key.ToByteArray().Skip(8)).ToArray();
78+
return asn.Concat(key.ExportSubjectPublicKeyInfo().Skip(8)).ToArray();
7979
}
8080

8181
//public static ECDiffieHellmanPublicKey FromDerEncoded(byte[] keyBytes)

src/MiNET/MiNET/Utils/pixelList.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ namespace MiNET.Utils
44
{
55
public class pixelList
66
{
7-
public List<pixels> mapData = new List<pixels>();
7+
public List<pixelsData> mapData = new List<pixelsData>();
88
}
9-
public class pixels
9+
public class pixelsData
1010
{
1111
public uint pixel;
1212
public short index;

0 commit comments

Comments
 (0)