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

@ -23,12 +23,12 @@ namespace MinecraftClient.Mapping
/// Nickname of the entity if it is a player.
/// </summary>
public string? Name;
/// <summary>
/// CustomName of the entity.
/// </summary>
public string CustomNameJson;
public string? CustomNameJson;
/// <summary>
/// IsCustomNameVisible of the entity.
/// </summary>
@ -37,8 +37,8 @@ namespace MinecraftClient.Mapping
/// <summary>
/// CustomName of the entity.
/// </summary>
public string CustomName;
public string? CustomName;
/// <summary>
/// Latency of the entity if it is a player.
/// </summary>
@ -77,21 +77,21 @@ namespace MinecraftClient.Mapping
/// Health of the entity
/// </summary>
public float Health;
/// <summary>
/// Item of the entity if ItemFrame or Item
/// </summary>
public Item Item;
/// <summary>
/// Entity pose in the Minecraft world
/// </summary>
public EntityPose Pose;
/// <summary>
/// Entity metadata
/// </summary>
public Dictionary<int, object?> Metadata;
public Dictionary<int, object?>? Metadata;
/// <summary>
/// Entity equipment
@ -107,11 +107,11 @@ namespace MinecraftClient.Mapping
public Entity(int ID, EntityType type, Location location)
{
this.ID = ID;
this.Type = type;
this.Location = location;
this.Health = 1.0f;
this.Equipment = new Dictionary<int, Item>();
this.Item = new Item(ItemType.Air, 0, null);
Type = type;
Location = location;
Health = 1.0f;
Equipment = new Dictionary<int, Item>();
Item = new Item(ItemType.Air, 0, null);
}
/// <summary>
@ -123,14 +123,14 @@ namespace MinecraftClient.Mapping
public Entity(int ID, EntityType type, Location location, byte yaw, byte pitch, int objectData)
{
this.ID = ID;
this.Type = type;
this.Location = location;
this.Health = 1.0f;
this.Equipment = new Dictionary<int, Item>();
this.Item = new Item(ItemType.Air, 0, null);
this.Yaw = yaw * (1 / 256) * 360; // to angle in 360 degree
this.Pitch = pitch * (1 / 256) * 360;
this.ObjectData = objectData;
Type = type;
Location = location;
Health = 1.0f;
Equipment = new Dictionary<int, Item>();
Item = new Item(ItemType.Air, 0, null);
Yaw = yaw * (1 / 256) * 360; // to angle in 360 degree
Pitch = pitch * (1 / 256) * 360;
ObjectData = objectData;
}
/// <summary>
@ -144,15 +144,15 @@ namespace MinecraftClient.Mapping
public Entity(int ID, EntityType type, Location location, Guid uuid, string? name, byte yaw, byte pitch)
{
this.ID = ID;
this.Type = type;
this.Location = location;
this.UUID = uuid;
this.Name = name;
this.Health = 1.0f;
this.Equipment = new Dictionary<int, Item>();
this.Item = new Item(ItemType.Air, 0, null);
this.Yaw = yaw * (1 / 256) * 360; // to angle in 360 degree
this.Pitch = pitch * (1 / 256) * 360;
Type = type;
Location = location;
UUID = uuid;
Name = name;
Health = 1.0f;
Equipment = new Dictionary<int, Item>();
Item = new Item(ItemType.Air, 0, null);
Yaw = yaw * (1 / 256) * 360; // to angle in 360 degree
Pitch = pitch * (1 / 256) * 360;
}
}
}