diff --git a/MinecraftClient/Mapping/Entity.cs b/MinecraftClient/Mapping/Entity.cs
index 1b913dd6..9feae262 100644
--- a/MinecraftClient/Mapping/Entity.cs
+++ b/MinecraftClient/Mapping/Entity.cs
@@ -60,18 +60,19 @@ namespace MinecraftClient.Mapping
}
///
- /// Create a new entity based on Entity ID, Entity Type and location
+ /// Create a new entity based on Entity ID, Entity Type, location, and UUID
///
/// Entity ID
/// Entity Type ID
/// Entity Type Enum
/// Entity location
- public Entity(int ID, int TypeID, EntityType type, Location location)
+ public Entity(int ID, int TypeID, EntityType type, Location location, Guid uuid)
{
this.ID = ID;
this.TypeID = TypeID;
this.Type = type;
this.Location = location;
+ this.UUID = uuid;
}
///
diff --git a/MinecraftClient/McTcpClient.cs b/MinecraftClient/McTcpClient.cs
index a2257a03..d95af69d 100644
--- a/MinecraftClient/McTcpClient.cs
+++ b/MinecraftClient/McTcpClient.cs
@@ -1211,7 +1211,7 @@ namespace MinecraftClient
public void OnSpawnEntity(int EntityID, int TypeID, Guid UUID, Location location)
{
if (entities.ContainsKey(EntityID)) return;
- Entity entity = new Entity(EntityID, TypeID, EntityType.NonLivingThings, location);
+ Entity entity = new Entity(EntityID, TypeID, EntityType.NonLivingThings, location, UUID);
entities.Add(EntityID, entity);
foreach (ChatBot bot in bots.ToArray())
{
@@ -1241,7 +1241,7 @@ namespace MinecraftClient
public void OnSpawnLivingEntity(int EntityID, int TypeID, Guid UUID, Location location)
{
if (entities.ContainsKey(EntityID)) return;
- Entity entity = new Entity(EntityID, TypeID, EntityType.MobAndAnimal, location);
+ Entity entity = new Entity(EntityID, TypeID, EntityType.MobAndAnimal, location, UUID);
entities.Add(EntityID, entity);
foreach (ChatBot bot in bots.ToArray())
{
@@ -1304,7 +1304,7 @@ namespace MinecraftClient
{
try
{
- bot.OnEntityDespawn(new Entity(entities[a].ID, entities[a].TypeID, entities[a].Type, entities[a].Location));
+ bot.OnEntityDespawn(entities[a]);
}
catch (Exception e)
{
@@ -1342,7 +1342,7 @@ namespace MinecraftClient
{
try
{
- bot.OnEntityMove(new Entity(entities[EntityID].ID, entities[EntityID].TypeID, entities[EntityID].Type, entities[EntityID].Location));
+ bot.OnEntityMove(entities[EntityID]);
}
catch (Exception e)
{
@@ -1375,7 +1375,7 @@ namespace MinecraftClient
{
try
{
- bot.OnEntityMove(new Entity(entities[EntityID].ID, entities[EntityID].TypeID, entities[EntityID].Type, entities[EntityID].Location));
+ bot.OnEntityMove(entities[EntityID]);
}
catch (Exception e)
{