public static void ReceiveClientSendTEUpdate(BinaryReader reader, int sender) { if (Main.netMode == 2) { int id = reader.ReadInt32(); TileEntity ent = TileEntity.Read(reader, true); ent.ID = id; TileEntity.ByID[id] = ent; TileEntity.ByPosition[ent.Position] = ent; if (ent is TEStorageUnit) { TEStorageHeart heart = ((TEStorageUnit)ent).GetHeart(); if (heart != null) { heart.ResetCompactStage(); } } NetMessage.SendData(MessageID.TileEntitySharing, -1, sender, null, id, ent.Position.X, ent.Position.Y); } else if (Main.netMode == 1) { //Still need to read the data reader.ReadInt32(); } }