Fix all warnings & Trim (#2226)

* Fix AutoFishing crash
* Fix all warnings
* Remove DotNetZip.
* Fix the usage of HttpClient.
This commit is contained in:
BruceChen 2022-10-02 18:31:08 +08:00 committed by GitHub
parent 4aa6c1c99f
commit 1d52d1eadd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
227 changed files with 2201 additions and 43564 deletions

View file

@ -1,14 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Generic;
namespace MinecraftClient.Inventory.ItemPalettes
{
public abstract class ItemPalette
{
protected abstract Dictionary<int, ItemType> GetDict();
private readonly Dictionary<ItemType, int> DictReverse = new Dictionary<ItemType, int>();
private readonly Dictionary<ItemType, int> DictReverse = new();
public ItemPalette()
{

View file

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
namespace MinecraftClient.Inventory.ItemPalettes
@ -9,7 +8,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
/// </summary>
public class ItemPalette115 : ItemPalette
{
private static Dictionary<int, ItemType> mappings = new Dictionary<int, ItemType>();
private static readonly Dictionary<int, ItemType> mappings = new();
static ItemPalette115()
{

View file

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
namespace MinecraftClient.Inventory.ItemPalettes
@ -9,7 +8,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
/// </summary>
public class ItemPalette1161 : ItemPalette
{
private static Dictionary<int, ItemType> mappings = new Dictionary<int, ItemType>();
private static readonly Dictionary<int, ItemType> mappings = new();
static ItemPalette1161()
{

View file

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
namespace MinecraftClient.Inventory.ItemPalettes
@ -9,7 +8,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
/// </summary>
public class ItemPalette1162 : ItemPalette
{
private static Dictionary<int, ItemType> mappings = new Dictionary<int, ItemType>();
private static readonly Dictionary<int, ItemType> mappings = new();
static ItemPalette1162()
{

View file

@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
namespace MinecraftClient.Inventory.ItemPalettes
{
public class ItemPalette117 : ItemPalette
{
private static Dictionary<int, ItemType> mappings = new Dictionary<int, ItemType>();
private static readonly Dictionary<int, ItemType> mappings = new();
static ItemPalette117()
{

View file

@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
namespace MinecraftClient.Inventory.ItemPalettes
{
public class ItemPalette118 : ItemPalette
{
private static Dictionary<int, ItemType> mappings = new Dictionary<int, ItemType>();
private static readonly Dictionary<int, ItemType> mappings = new();
static ItemPalette118()
{

View file

@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
namespace MinecraftClient.Inventory.ItemPalettes
{
public class ItemPalette119 : ItemPalette
{
private static Dictionary<int, ItemType> mappings = new Dictionary<int, ItemType>();
private static readonly Dictionary<int, ItemType> mappings = new();
static ItemPalette119()
{

View file

@ -1,8 +1,4 @@
using MinecraftClient.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MinecraftClient.Inventory.ItemPalettes
{
@ -18,8 +14,8 @@ namespace MinecraftClient.Inventory.ItemPalettes
{
DataTypeGenerator.GenerateEnumWithPalette(
registriesJsonFile,
"minecraft:item",
"ItemType",
"minecraft:item",
"ItemType",
"MinecraftClient.Inventory",
"ItemPalette",
"MinecraftClient.Inventory.ItemPalettes");