Fix entity handling crash (#1241)

Fix #1237
* Fix crash
* Update Entity.cs
* Update Entitycmd.cs
* Update McClient.cs
This commit is contained in:
Рома Данилов 2020-08-27 22:33:45 +05:00 committed by GitHub
parent 2649e61a88
commit 02e294e3e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 8 deletions

View file

@ -92,6 +92,7 @@ namespace MinecraftClient.Mapping
this.Location = location;
this.Health = 1.0f;
this.Equipment = new Dictionary<int, Item>();
this.Item = new Item(ItemType.Air, 0, null);
}
/// <summary>
/// Create a new entity based on Entity ID, Entity Type, location, name and UUID
@ -110,6 +111,7 @@ namespace MinecraftClient.Mapping
this.Name = name;
this.Health = 1.0f;
this.Equipment = new Dictionary<int, Item>();
this.Item = new Item(ItemType.Air, 0, null);
}
}
}