From eb9b4bcef290952b741db0d28e2735125d65b2c2 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 9 Nov 2017 18:07:41 +1100 Subject: [PATCH] Fix bot models not having chat tokens. --- MCGalaxy/Entity/Entities.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MCGalaxy/Entity/Entities.cs b/MCGalaxy/Entity/Entities.cs index bf4fe9169..7a1a84129 100644 --- a/MCGalaxy/Entity/Entities.cs +++ b/MCGalaxy/Entity/Entities.cs @@ -126,7 +126,8 @@ namespace MCGalaxy { internal static void Spawn(Player dst, PlayerBot b) { string name = Chat.Format(b.color + b.DisplayName, dst, true, false); if (b.DisplayName.CaselessEq("empty")) name = ""; - string skin = Chat.Format(b.SkinName, dst, true, false), model = b.Model; + string skin = Chat.Format(b.SkinName, dst, true, false); + string model = Chat.Format(b.Model, dst, true, false); OnEntitySpawnedEvent.Call(b, ref name, ref skin, ref model, dst); SpawnRaw(dst, b.id, skin, name, model, b.Pos, b.Rot); @@ -195,9 +196,9 @@ namespace MCGalaxy { byte id = (pl == entity) ? Entities.SelfID : entity.EntityID; // Fallback block models for clients that don't support block definitions - string modelSend = model; + string modelSend = Chat.Format(model, pl, true, false); byte block; - if (byte.TryParse(model, out block) && !pl.hasBlockDefs) { + if (byte.TryParse(modelSend, out block) && !pl.hasBlockDefs) { modelSend = pl.level.RawFallback(block).ToString(); }